We are seeing exactly the same deploying a web app (not a function), Github deploy hangs for 6h:
...even though the actual deployment completed successfully:
It's a Linux app service instance if that makes a difference.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When I was trying to deploy on Azure Function App, the deployment on Github Actions seems to be freezing on Package deployment using ZIP Deploy initiated.
This goes on for hours, without any success response, hence we are left with no choice but to cancel the operation.
But, when I checked on Azure deployment logs, it seems to be deployed successfully.
What could be the reason for this, and how should we fix it?
We are seeing exactly the same deploying a web app (not a function), Github deploy hangs for 6h:
...even though the actual deployment completed successfully:
It's a Linux app service instance if that makes a difference.
I have experienced the same issue. Logs are listed below.
Successfully parsed SCM credential from publish-profile format.
Using SCM credential for authentication, GitHub Action will not perform resource validation.
(node:1725) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
Successfully acquired app settings from function app (with SCM credential)!
Will archive ./function into /home/runner/work/_temp/temp_web_package_19174212886521258.zip as function app content
Will use Kudu https://<scmsite>/api/zipdeploy to deploy since publish-profile is detected.
Setting SCM_DO_BUILD_DURING_DEPLOYMENT in Kudu container to false
Update using context.kuduService.updateAppSettingViaKudu
Response with status code 204
App setting SCM_DO_BUILD_DURING_DEPLOYMENT propagated to Kudu container
Setting ENABLE_ORYX_BUILD in Kudu container to false
Update using context.kuduService.updateAppSettingViaKudu
Response with status code 204
App setting ENABLE_ORYX_BUILD propagated to Kudu container
Package deployment using ZIP Deploy initiated.
Posted this answer on another thread. Hopefully helps someone.
Also having the same problem (tried both azure/webapps-deploy@v2
and azure/webapps-deploy@v3
). Github has been blowing all budgets with multiple 6-hour deployment runs. I have been able to mitigate to a degree by setting a timeout via timeout-minutes: X
on the job like this:
[...]
deploy:
needs: build
name: Deploy
runs-on: windows-latest
timeout-minutes: 10
steps:
[...]
So the job will get stuck and then be canceled after the timeout hits.
Re-running the CD job with debug logging enabled shows the infinite loop on this section of the log, which repeats until the timeout hits and the job gets killed, note the Deployment successful.
message that apparently GitHub cannot parse correctly:
2024-05-24T08:27:38.8668130Z ##[debug]setting affinity cookie ["ARRAffinity=????????????0f3cd06517910600fe9f841d332f594d199be0459dd3c476329f;Path=/;HttpOnly;Secure;Domain=???????????????????.scm.azurewebsites.net","ARRAffinitySameSite=????????????0f3cd06517910600fe9f841d332f594d199be0459dd3c476329f;Path=/;HttpOnly;SameSite=None;Secure;Domain=???????????????????.scm.azurewebsites.net"]
2024-05-24T08:27:38.8673993Z ##[debug][GET] https://??????????????.scm.azurewebsites.net:443/api/deployments/latest?deployer=GITHUB_ZIP_DEPLOY&time=2024-05-24_08-18-40Z
2024-05-24T08:27:40.2531567Z ##[debug]POLL URL RESULT: {"statusCode":202,"statusMessage":"Accepted","headers":{"content-length":"827","content-type":"application/json; charset=utf-8","date":"Fri, 24 May 2024 08:27:39 GMT","server":"Kestrel","location":"https://??????????????.scm.azurewebsites.net:443/api/deployments/latest?deployer=GITHUB_ZIP_DEPLOY&time=2024-05-24_08-18-40Z"},"body":{"id":"????????-????-????-8591-1823d4ac83f5","status":0,"status_text":"Building and Deploying '????????-????-????-8591-1823d4ac83f5'.","author_email":"N/A","author":"N/A","deployer":"GITHUB_ZIP_DEPLOY","message":"{\"type\":\"deployment\",\"sha\":\"????1a897d95f31e829837bf67739be7fe0ea7ea\",\"repoName\":\"???????????/????????\",\"actor\":\"???????\",\"slotName\":\"production\",\"commitMessage\":\"???????????\"}","progress":"Deployment successful. deployer = GITHUB_ZIP_DEPLOY deploymentPath = ZipDeploy. Extract zip.","received_time":"2024-05-21T21:01:36.362926Z","start_time":"2024-05-21T21:01:37.9507836Z","end_time":null,"last_success_end_time":null,"complete":false,"active":false,"is_temp":false,"is_readonly":true,"url":null,"log_url":null,"site_name":"???????????????????","build_summary":{"errors":[],"warnings":[]}}}
2024-05-24T08:27:40.2542353Z ##[debug]Deployment status: 0 'Building and Deploying '????????-????-????-8591-1823d4ac83f5'.'. retry after 5 seconds
Using @v2
or @v3
does not seem to make a difference. I was kinda hoping that would fix it. The debug logs for both of them indicate the same loop.
Anyone have any ideas?
https://github.com/Azure/functions-action/issues/185
In short, adding WEBSITE_RUN_FROM_PACKAGE=1 to environmental variables solves this issue.