Deployment fails from time to time as the actions fails to find the function App
See original GitHub issueHi, I am deploying a dotnet-isolated function app using .NET 6 and from time to time the deployment fails with the following error
Using RBAC for authentication, GitHub Action will perform resource validation.
##[debug]try-get AzureCLIAuthorizer
##[debug]"/usr/bin/az" account show
##[debug]"/usr/bin/az" cloud show
##[debug]"/usr/bin/az" account get-access-token
::add-mask::***
##[debug][GET] https://management.azure.com/subscriptions/***/resources?$filter=resourceType EQ 'Microsoft.Web%2FSites' AND name EQ '___FUNCTION__NAME___'&api-version=2016-07-01
Error: Execution Exception (state: ValidateAzureResource) (step: Invocation)
Error: Resource ___FUNCTION__NAME___ doesn't exist.
Error: Error: Resource ___FUNCTION__NAME___ doesn't exist.
at Function.<anonymous> (/home/runner/work/_actions/Azure/functions-action/v1/node_modules/azure-actions-appservice-rest/Utilities/AzureResourceFilterUtility.js:21:23)
at Generator.next (<anonymous>)
at fulfilled (/home/runner/work/_actions/Azure/functions-action/v1/node_modules/azure-actions-appservice-rest/Utilities/AzureResourceFilterUtility.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Deployment Failed!
##[debug]Node Action run completed with exit code 1
I am using RBAC authentication via azure/login@v1
. The service principal has contributor permission on the whole subscription.
When I use Re-run all jobs for the workflow run, then deployment usually works fine.
I am deploying the function app via terraform, before deployment runs. But it also fails, if the function app is already there and exists for hours. So doesn’t seem to be some kind of “race condition”.
As I deploy IaC via terraform using publish-profiles would be overly complicated I would say. There seems to be no native support in terraform’s azurerm to get the profile.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:5
- Comments:21
Top Results From Across the Web
Github action to deploy to Azure Function app cannot find app ...
Hello, I'm getting this (below) error when I run the github workflow to publish an azure function. I have added the AzureWebJobsStorage to ......
Read more >Unable to deploy fresh Azure Function to Linux app
I've tried using the azure cli, VS Code, and Github Actions, but it keeps failing. When I deploy the same function to a...
Read more >Troubleshoot deployment issues in Lambda
General: Cannot find, cannot load, unable to import, class not found, no such file or directory. Error: Cannot find module 'function'. Error: cannot...
Read more >Azure Function APP Deployment error - Visual Studio Feedback
Please check if you have this issue when you deploy Azure Function APP locally without Azure DevOps. And here is a similar ticket:...
Read more >Troubleshooting failed or hanging tasks - Octopus Deploy
If a deployment failed unexpectedly within a built-in step, you may have misconfigured the step. Double check the configuration of your step in ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Wow, no movement since February, really?
Had the same issue, deleting the functions and re-running the pipeline did it, not the best solution in any case…