[App Service] Fix #29290, #27506, #29721: --src-url error messages and sync deploy#33050
[App Service] Fix #29290, #27506, #29721: --src-url error messages and sync deploy#33050
--src-url error messages and sync deploy#33050Conversation
️✔️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
Improves the UX for App Service OneDeploy URL-based deployments by surfacing a more actionable error message when the ARM OneDeploy call fails with HTTP 400 and an empty response body (instead of only showing “Bad Request”).
Changes:
- Added a
_send_deploy_requestwrapper aroundsend_raw_requestto intercept HTTP 400 and raise a guidance-richCLIError. - Routed the
--src-urlARM OneDeploy request path through_send_deploy_requestso the improved message is emitted consistently (including the kudu-warmup/instance flow).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
956a54a to
c9af28e
Compare
…eploy --src-url failures When `az webapp deploy --src-url` receives non-2xx HTTP responses, `send_raw_request` raises `HTTPError` before the deploy-specific error handling code is reached. This results in bare error messages like "Bad Request" with no actionable guidance. This change adds a `_send_deploy_request` wrapper that catches HTTP errors on the --src-url ARM deploy path and provides clear, actionable messages: - 400 Bad Request: troubleshooting guidance for URL accessibility, SAS tokens, and artifact type mismatches - 404 Not Found: guidance to verify resource group, app name, and slot - 409 Conflict: message about in-progress deployments The wrapper uses the server-provided reason phrase and includes any response body details when available. Unhandled status codes re-raise the original HTTPError unchanged. Fixes Azure#29290 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
c9af28e to
278da15
Compare
az webapp deploy: Improve error message for --src-url deployment failures
az webapp deploy: Improve error message for --src-url deployment failuresaz webapp deploy: Improve error message for --src-url deployment failures
Wrapped `--src-url` in backticks in PR title to pass format checker. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…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>
az webapp deploy: Improve error message for --src-url deployment failures--src-url error messages and sync deploy
Description
This PR consolidates fixes for three related
--src-urlissues inaz webapp deploy:Fix #29290: Improve error messages for
--src-urlfailures--src-urldeploy failsFix #27506, #29721: Add sync deployment support for
--src-url--src-urldeploysTesting
Issues
Fixes #29290
Fixes #27506
Fixes #29721