-
Notifications
You must be signed in to change notification settings - Fork 74
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
Flex consumption with dotnet fails #245
Comments
Is this being looked at? cc @patelchandni ? |
@davidobrien1985 - You have passed |
@patelchandni I'm confused. This is to deploy to a Flex Consumption plan. According to the readme on this repo that is exactly the config we should pass.
|
@patelchandni are you still monitoring this? I tried again using the exact parameters that the readme on this repo says I should use, but set
That indeed finally uploaded the zip file to the container configured on the Consumption Flex Function App, but the Function App only shows The same package works without any issues on regular Function Apps. (see below)
|
I am getting the same "WarmUp" function displaying after deploying using this action. This Action was previously working for me successfully when deploying to a Flex Consumption plan. In my context, I am using RBAC to deploy with an If I deploy manually from my desktop using VSCode, all the correct functions are visible in the portal. Here are my workflow job steps: # Download artifact
- name: Download artifact
id: download-artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.jobsArtifactName }}
# Login to Azure
- name: Login to Azure
uses: azure/login@v1
with:
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
client-id: ${{ secrets.AZURE_CLIENT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
# Publish application
- name: Publish application
uses: Azure/functions-action@v1
with:
app-name: ${{ needs.deploy_infra.outputs.functionAppName }}
package: ${{ steps.download-artifact.outputs.download-path }} |
@frasermclean does that really deploy a Flex Consumption app? Looks like it's missing the |
According to the docs, the action determines the correct SKU as I am using RBAC auth. |
@patelchandni any idea why this is happening? Now two people get the same incorrect outcome. |
Unfortunately, I have the same issue, I tried with |
@patelchandni or anybody else from Microsoft? Anybody watching this? |
We are still investigating @davidobrien1985's app through a support case. We mitigated the issue to a certain degree by adding WEBSITE_USE_PLACEHOLDER_DOTNETISOLATED app setting and setting a value of 0. Unfortunately, it is not possible to tell if this is the same issue @mangzee, we would need a support ticket to be able to investigate your app as well, as the app is deploying but failing to show the functions. |
@nzthiago @davidobrien1985
|
For dotnet packages, make sure that
Otherwise, you may receive 404 |
FYI, I've tried publish-profile without better success.
Here's the output: Using RBAC for authentication, GitHub Action will perform resource validation. |
I get 404 deployment errors on basically every second deployment.
I rerun the failed jobs, all good.
Get Outlook for Android<https://aka.ms/AAb9ysg>
…________________________________
From: David Maugrion ***@***.***>
Sent: Saturday, October 19, 2024 4:50:23 AM
To: Azure/functions-action ***@***.***>
Cc: David O'Brien ***@***.***>; Mention ***@***.***>
Subject: Re: [Azure/functions-action] Flex consumption with dotnet fails (Issue #245)
FYI, I've tried publish-profile without better success.
Eventually i came to this:
* name: Deploy Azure Functions App
uses: ***@***.***
with:
app-name: ${{ steps.tfoutputs.outputs.functionapp_name }}
package: ohana-server-${{ env.VERSION }}.zip
Here's the output:
Using RBAC for authentication, GitHub Action will perform resource validation.
Successfully acquired site configs from function app!
Detected function app sku: Consumption
Successfully acquired app settings from function app (RBAC)!
Detected function app language: Node
Will directly deploy ohana-server-1.10.0-build.1272.zip as function app content.
Will use WEBSITE_RUN_FROM_PACKAGE to deploy since RBAC is detected and your function app is on Linux Consumption.
Using AzureWebJobsStorage for Blob access.
Package Url will use SAS.
Sync Trigger call was successful.
—
Reply to this email directly, view it on GitHub<#245 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACBIQGLYLZKMOEUENG7G4WDZ4FC57AVCNFSM6AAAAABLZ53EBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRSHE3DCMBXHA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
If you are downloading and artifact, it could it be related to this issue: Azure/azure-functions-dotnet-worker#1240 In the |
For those deploying to a flex consumption plan app from Azure DevOps pipelines, make sure to check the checkbox "Is Function app on Flex Consumption plan", only then the dotnet deployment succeeds. |
Any errors in the function's entry point seem to lead to this state, and because deployment spins up the function app to get its list of triggers, it all looks like issues with deployment rather than our own code. Compounding this (because Flex Consumption functions have done away with app logs and log streaming) there seems to be no way to actually diagnose what is causing the problem. To reproduce: // Program.cs in an otherwise standard function app
var builder = FunctionsApplication.CreateBuilder(args);
builder.ConfigureFunctionsWebApplication();
builder.Services
.AddApplicationInsightsTelemetryWorkerService()
.ConfigureFunctionsApplicationInsights();
// Any exception during startup leads to 'WarmUp' and looks like a deployment issue
throw new InvalidOperationException("You will never see this message");
builder.Build().Run(); Deploying this (using Core Tools here, but I get the same end-state using the action): func azure functionapp publish <flex-function-name> gives an 'operation failed successfully' sort of message:
(note that the SyncTriggerStep never completes) In the portal, the flex function app now has a single HTTP trigger called 'WarmUp'. {"AspNetCoreEnvironment":"Production","MessageTemplate":"FunctionHostSyncTrigger, statusCode = BadGateway","SourceContext":"Kudu.Legion.DeploymentSteps.SyncTriggerStep","deploymentId":"4f9dfe77-86e0-4f17-b8a3-a743cd0cc8eb"} This has cost a lot of time - can we please have the log stream back for flex functions (and include the app's output during deployment)? Or, if it has to all be in app insights, can there be some guidance on how to find these startup errors during deployment? Can the deployment log include the actual exception information rather than Bad Gateway? As it is there is an unobservable gap between deployment logs, and the tracing around a function's triggered execution. |
@john-manktelow This Functions host PR will address the missing startup exceptions and have them flow to App Insights. It should roll out early next year. |
Hi team, For the record, I encountered a similar issue. The same codebase deployed fine via GitHub Actions to a Consumption plan, but I kept getting a "could not retrieve settings" error when switching to a Flexible Consumption plan. What worked for me was similar to the solution mentioned earlier: I initially set these values but still ran into an error:
I also set WEBSITE_WEBDEPLOY_USE_SCM to false in the function app's environment variables. However, then I switched from using a publish profile to RBAC while keeping the same settings as above, it worked. Interesting behavior here. Here is my current action in case helpful.
|
Attempting to deploy a dotnet8 app to a flex consumption Function App:
This is the GitHub Actions output:
I'm confused about two things:
AzureWebJobsStorage
app setting. We never had these on our apps and they always worked.Error: Couldn't detect a version for the platform 'dotnet' in the repo.
- Why is it running oryx if it's set tofalse
?The text was updated successfully, but these errors were encountered: