Skip to content

[App Service] Fix #27506, #29721: az webapp deploy: Add sync deployment support for --src-url#33052

Closed
seligj95 wants to merge 2 commits intoAzure:devfrom
seligj95:fix/27506-29721-src-url-sync-deploy
Closed

[App Service] Fix #27506, #29721: az webapp deploy: Add sync deployment support for --src-url#33052
seligj95 wants to merge 2 commits intoAzure:devfrom
seligj95:fix/27506-29721-src-url-sync-deploy

Conversation

@seligj95
Copy link
Contributor

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

  • Default behavior for --src-url is now synchronous (polls until complete)
  • --async true preserves existing behavior (return immediately)
  • Uses deployment ID extraction from ARM response for tracking (avoids race conditions)
  • Added comprehensive unit tests covering sync, async, and fallback scenarios

Testing

  • Added 4 new unit tests in test_webapp_commands_thru_mock.py
  • All 33 tests pass
  • Style and linting checks pass

Related Issues

Fixes #27506
Fixes #29721

@seligj95 seligj95 requested a review from NoriZC as a code owner March 26, 2026 01:33
Copilot AI review requested due to automatic review settings March 26, 2026 01:33
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Mar 26, 2026

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️postgresql
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link

Hi @seligj95,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Mar 26, 2026

️✔️AzureCLI-BreakingChangeTest
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Mar 26, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-url deployments, with --async true preserving immediate-return behavior.
  • Extract deployment ID from the ARM response (id or properties.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.

@seligj95 seligj95 changed the title [App Service] Fix #27506, #29721: Add sync deployment support for --src-url [App Service] Fix #27506, #29721: az webapp deploy: Add sync deployment support for --src-url Mar 26, 2026
…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>
@seligj95 seligj95 force-pushed the fix/27506-29721-src-url-sync-deploy branch from 9f499ea to a5b59d8 Compare March 26, 2026 02:02
@yonzhan yonzhan assigned yanzhudd and unassigned zhoxing-ms Mar 26, 2026
@seligj95 seligj95 changed the title [App Service] Fix #27506, #29721: az webapp deploy: Add sync deployment support for --src-url [App Service] Fix #27506, #29721: az webapp deploy: Add sync deployment support for --src-url Mar 26, 2026
Wrapped `--src-url` in backticks in PR title to pass format checker.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@seligj95
Copy link
Contributor Author

Consolidated into #33050

@seligj95 seligj95 closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Location Header instead of Latest to get Flex deployment update Support webapp deploy --async false for src-uri deployments

5 participants