Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Function deployment fails with WEBSITE_RUN_FROM_PACKAGE setting #718

Open
vjraitila opened this issue Sep 16, 2023 · 5 comments
Open

Comments

@vjraitila
Copy link

The Rider plugin fails to deploy to a Function App configured to use WEBSITE_RUN_FROM_PACKAGE. This setting is the default for e.g. the Azure Functions extension within VS Code.

STEPS TO REPRODUCE

  1. Provision a Function App in Azure (Consumption, .NET 6, Linux)
  2. Generate a (Azure Functions) project within VS Code with an HttpTrigger
  3. Deploy the project from VS Code
  4. Open the same project in Rider
  5. Attempt to deploy the project from Rider

EXPECTED RESULTS

The project is successfully deployed.

ACTUAL RESULTS

Rider fails to deploy with a non-helpful error message.

...
Publishing ZIP file. Attempt 1 of 3...
Publishing ZIP file. Attempt 2 of 3...
Publishing ZIP file. Attempt 3 of 3...
Fail publishing ZIP file. Response code: 409. Response message: Conflict.
Fail publishing ZIP file: java.lang.RuntimeException: Fail publishing ZIP file. Response code: 409. Response message: Conflict.
Fail publishing ZIP file
@maartenba
Copy link

The API unfortunately does not give anything more than a 409 Conflict message, which can be for various reasons.

Can you just deploy from Rider without the WEBSITE_RUN_FROM_PACKAGE setting?

@vjraitila
Copy link
Author

If I drop the WEBSITE_RUN_FROM_PACKAGE setting from app configuration, and clean up the function-releases container from the storage account, the deployment from Rider will obviously succeed.

But what if I want to run the function app from a package?

@maartenba
Copy link

Rider uses zip deployment, other options are not supported

@vjraitila
Copy link
Author

They are not mutually exclusive. Having an app run from a package still relies on zip deploy.

@rgxsjurgis
Copy link

rgxsjurgis commented Jun 3, 2024

Encountered similar issue with (almost) same conditions.
When deploying to Azure functions on Linux (.net 8), consumer plan, rider deployment stops the functions app - which, in turn, results in "broken-pipe" error during deployment.
Verbose output from AZ CLI deployment indicates that a related sub-tool reports error 401 during deployment - might be caused by same whacky error code.
Build #RD-241.14494.325, built on April 16, 2024
And one more thing - AZ CLI docs indicate, that linux/consumption are "special" - they don't have kudu, so the deployment package path must be configured after deployment (https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/azure-functions/run-functions-from-deployment-package.md#benefits-of-running-from-a-package-file , see the consumption/os table) - hopefuly could be useful to fixing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants