swa version: 2.0.6
Are you accessing the CLI from the default port :4280 ?
Describe the bug
The official and GA way to use streaming in python functions is to use the azurefunctions-extensions-http-fastapi package.
Unfortunately when putting the following line into a function_app.py file
from azurefunctions.extensions.http.fastapi import Request, StreamingResponse
and then running swa deploy results in the managed function not being deployed anymore. It works flawlessly when i remove the above line from the python file.
This issue does not exist when using the AzureStaticWebApp@0 task in Azure DevOps. With this deployment task, both variants work.
- task: AzureStaticWebApp@0
inputs:
app_location: 'site'
output_location: '.'
api_location: 'api'
azure_static_web_apps_api_token: $(apiKey)
config_file_location: '.'
To Reproduce
Steps to reproduce the behavior:
- Clone this swa-deploy-issue repository
- Type in command
swa deploy and watch it deploy the site + managed api correctly
- Insert
from azurefunctions.extensions.http.fastapi import Request, StreamingResponse into src/functionapp
- Type in command
swa deploy and watch it deploy the site but without any managed api
Expected behavior
I expect swa deploy to work with the official python streaming manual.
Additional context
I have attached both verbose logs of the deployments.
broken-swa-deploy.txt
working-swa-deploy.txt
swa version: 2.0.6
Are you accessing the CLI from the default port
:4280?--port) and accessing the CLI from that port:4280Describe the bug
The official and GA way to use streaming in python functions is to use the azurefunctions-extensions-http-fastapi package.
Unfortunately when putting the following line into a
function_app.pyfileand then running
swa deployresults in the managed function not being deployed anymore. It works flawlessly when i remove the above line from the python file.This issue does not exist when using the
AzureStaticWebApp@0task in Azure DevOps. With this deployment task, both variants work.To Reproduce
Steps to reproduce the behavior:
swa deployand watch it deploy the site + managed api correctlyfrom azurefunctions.extensions.http.fastapi import Request, StreamingResponseintosrc/functionappswa deployand watch it deploy the site but without any managed apiExpected behavior
I expect
swa deployto work with the official python streaming manual.Additional context
I have attached both verbose logs of the deployments.
broken-swa-deploy.txt
working-swa-deploy.txt