Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.36k stars 2k forks source link

Unexpected deployment status on Azure WebApp Slot using getDeploymentStatusAsync from SupportsOneDeploy #41478

Open vlica-harness opened 3 months ago

vlica-harness commented 3 months ago

We are trying to get the deployment status of a package deployment which has been deployed to azure WebApp slot. During the deployment and once the deployment is successful we are getting only this status in case of linux: BuildSuccessful

We are using this SDK version: azure-resourcemanager-appservice_2.26.1

We are following this example withTrackDeployment(true): https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/azure-resourcemanager-appservice/src/test/java/com/azure/resourcemanager/appservice/OneDeployTests.java#L104, but never got a RuntimeSuccessful.

Any idea why we always get only BuildSuccessful in case of linux? Can we rely on this SupportsOneDeploy implementation in order to see if the application is getting successfully deployed?

Ref: https://github.com/Azure/azure-sdk-for-java/blob/azure-resourcemanager-appservice_2.26.1/sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/models/SupportsOneDeploy.java#L128

We have tried to call the API directly for windows java code WebApp, and there we always get when first time checking the status: BuildSuccessful, and all next time we check the status is: RuntimeStarting, even after the deployment is done on azure WebApp we anyway get: RuntimeStarting and never got RuntimeSuccessful https://learn.microsoft.com/en-us/rest/api/appservice/web-apps/get-production-site-deployment-status?view=rest-appservice-2022-09-01&tabs=HTTP

github-actions[bot] commented 3 months ago

Thank you for your feedback. Tagging and routing to the team member best able to assist.

weidongxu-microsoft commented 3 months ago

Yeah, I can reproduce that. The async deploy on WebApp is good, but seems the slot is forever BuildSuccessful.

This likely a backend problem.

You may create a support ticket to track this problem.

Or I can contact backend via email, to see what their dev think. But this would be all internal communications (this issue is on SDK, backend won't track this), and I cannot guarentee the progress.

XiaofeiCao commented 3 months ago

@vlica-harness

The test is to ensure that SDK can get the latest deployment status of the deployment slot. The behavior of the deployment status is not in SDK's control. This indeed seems a behavioral change of service side. I've created issue for them: https://github.com/Azure/azure-rest-api-specs/issues/30202, though their response is not guarenteed.