[App Service] Fix #27506, #29721: az webapp deploy: Add sync deployment support for --src-url#33052
[App Service] Fix #27506, #29721: az webapp deploy: Add sync deployment support for --src-url#33052
az webapp deploy: Add sync deployment support for --src-url#33052Conversation
️✔️AzureCLI-FullTest
|
|
Hi @seligj95, |
️✔️AzureCLI-BreakingChangeTest
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
There was a problem hiding this comment.
Pull request overview
This PR updates App Service az webapp deploy behavior so deployments using --src-url behave synchronously by default (polling until completion), aligning with the --src-path experience and using a deployment ID from the ARM response to track status via the deploymentStatus API.
Changes:
- Add default synchronous polling behavior for
--src-urldeployments, with--async truepreserving immediate-return behavior. - Extract deployment ID from the ARM response (
idorproperties.deploymentId) and poll the ARM deploymentStatus endpoint to avoid “latest” race conditions. - Add unit tests to cover sync default, explicit
--async false, async, and “no deployment id” fallback behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/appservice/custom.py |
Implements ARM-response deployment ID extraction and polling for --src-url; also introduces a new validation in config_source_control. |
src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_webapp_commands_thru_mock.py |
Adds unit tests validating sync/async behavior and fallback when no deployment ID is present. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
az webapp deploy: Add sync deployment support for --src-url
…rt for --src-url When using az webapp deploy --src-url, the command now polls for deployment completion by default (matching --src-path behavior). Uses the deployment ID from the ARM response to track status via the deploymentStatus API. - Default behavior for --src-url is now synchronous (polls until complete) - --async true preserves existing behavior (return immediately) - Uses deployment ID extraction for tracking (avoids race conditions) Fixes Azure#27506 Fixes Azure#29721 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
9f499ea to
a5b59d8
Compare
az webapp deploy: Add sync deployment support for --src-urlaz webapp deploy: Add sync deployment support for --src-url
Wrapped `--src-url` in backticks in PR title to pass format checker. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Consolidated into #33050 |
Description
When using
az webapp deploy --src-url, the command now polls for deployment completion by default, matching the behavior of--src-path. Uses the deployment ID from the ARM response to track status via the deploymentStatus API.Changes
--src-urlis now synchronous (polls until complete)--async truepreserves existing behavior (return immediately)Testing
Related Issues
Fixes #27506
Fixes #29721