Web App deployment status can't be fetched by azd deploy in GitHub Actions

Arthur T 0 Reputation points
2025-03-02T18:36:24.88+00:00

I have a Web App generated by azd about a year ago.

The code is in GitHub and GitHub Actions are used for deployment. setup-azd@v1.0.0 was used before (the version from the template). Yesterday it failed to run, then I found this issue and upgraded to v2.

After upgrading to GitHub Action v2, the workflow started to publish to Azure successfully (which I can see in Azure Portal). Although, GET management.azure.com/subscriptions/ef0a*** can't fetch the deployment status and it is stuck forever. This ends up with a workflow failure in Github.

I found similar issues, some of them are closed. Although, looks like that the problem is not finally resolved:

This is the last message in GitHub before failing:

2025/03/02 18:06:12 main.go:50: Response: ==> REQUEST/RESPONSE (Try=1/1.228489759s, OpTime=1.22852234s) -- RESPONSE RECEIVED
2467 GET https://management.azure.com/subscriptions/ef***05/resourceGroups/rg-dev/providers/Microsoft.Web/sites/app-web-7***sy/deploymentStatus/7afa***744?api-version=2023-01-01&c=REDACTED&h=REDACTED&s=REDACTED&t=REDACTED
2468 Authorization: REDACTED
2469 User-Agent: azsdk-go-armappservice/v2.3.0 (go1.23.0 X:loopvar; linux),azdev/1.12.0 (Go go1.23.0 X:loopvar; linux/amd64) GhActions
2470 X-Ms-Correlation-Request-Id: 7a***744
2471 --------------------------------------------------------------------------------
2472 RESPONSE Status: 404 Not Found
2473 Cache-Control: no-cache
2474 Content-Length: 481
2475 Content-Type: application/json; charset=utf-8
2476 Date: Sun, 02 Mar 2025 18:06:11 GMT
2477 Etag: "1DB***4CB"
2478 Expires: -1
2479 Pragma: no-cache
2480 Strict-Transport-Security: REDACTED
2481 X-Aspnet-Version: REDACTED
2482 X-Cache: REDACTED
2483 X-Content-Type-Options: REDACTED
2484 X-Ms-Correlation-Request-Id: 7af***744
2485 X-Ms-Ratelimit-Remaining-Subscription-Global-Reads: REDACTED
2486 X-Ms-Ratelimit-Remaining-Subscription-Reads: REDACTED
2487 X-Ms-Request-Id: 9be***b10
2488 X-Ms-Routing-Request-Id: REDACTED
2489 X-Msedge-Ref: REDACTED
2490 X-Powered-By: REDACTED
2491
24922025/03/02 18:06:12 main.go:50: Retry: response 404
24932025/03/02 18:06:12 main.go:50: Retry: exit due to non-retriable status code
24942025/03/02 18:06:12 main.go:50: LongRunningOperation: State Failed
2495 (x) Failed: Deploying service web
2496
2497ERROR: failed deploying service 'web': deploying service web: deployment status API unexpectedly terminated at stage BuildInProgress
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,434 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bhargavi Naragani 1,375 Reputation points Microsoft External Staff
    2025-03-05T19:58:20.39+00:00

    Hi @Arthur T,

    The issue appears to be caused by an outdated or deprecated API endpoint for fetching deployment status. The best approach is to ensure you’re using the latest azd version, verify the API manually, and, if necessary, use an alternative method like az webapp deployment list. Additionally, checking Azure Portal logs can help confirm that the deployment is actually succeeding.

    Your deployment status check is using api-version=2023-01-01, which may no longer be supported or could be returning incorrect responses. Azure APIs are frequently updated, and some older versions may be deprecated. Try replacing it with a newer API version. You can manually test the API version by running an az rest command:  az rest --method get --url

    "https://management.azure.com/subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.Web/sites/<APP_NAME>/deploymentStatus?api-version=2023-01-01" If this command also returns a 404 Not Found error, it likely means that the deployment status API is either unavailable for your app or has been deprecated.

    https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/troubleshoot?tabs=Browser
    https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/configure-devops-pipeline?tabs=GitHub
    https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/common-deployment-errors?

    If the answer is helpful, please click Accept Answer and kindly upvote it so that other people who faces similar issue may get benefitted from it.

    Let me know if you have any further Queries.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.