[Appservice] az functionapp deployment source config-zip: Fix intermittent failure on flex consumption apps due to Kudu restart#33354
Draft
Copilot wants to merge 6 commits into
Draft
Conversation
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
…tus 6) as transient state Agent-Logs-Url: https://github.com/Azure/azure-cli/sessions/d22a7f98-aa7f-43a9-9e3e-a45c36c058b2 Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/azure-cli/sessions/d22a7f98-aa7f-43a9-9e3e-a45c36c058b2 Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
…ent status check Agent-Logs-Url: https://github.com/Azure/azure-cli/sessions/d22a7f98-aa7f-43a9-9e3e-a45c36c058b2 Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
…ce only Agent-Logs-Url: https://github.com/Azure/azure-cli/sessions/d22a7f98-aa7f-43a9-9e3e-a45c36c058b2 Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/azure-cli/sessions/d22a7f98-aa7f-43a9-9e3e-a45c36c058b2 Co-authored-by: a0x1ab <59631311+a0x1ab@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix inconsistent deployment failures for flex consumption function apps
[Appservice] May 12, 2026
az functionapp deployment source config-zip: Fix intermittent failure on flex consumption apps due to Kudu restart
Collaborator
|
Appservice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flex consumption deployments intermittently fail with
"Deployment was partially successful"because the CLI treats deployment status 6 as a terminal error. Status 6 is actually a transient state: Kudu restarts after uploading the package to storage (normal for flex consumption), causing the[Kudu-SyncTriggerStep]to not yet complete when the CLI first polls.Changes to
_check_zip_deployment_status_flex(appservice/custom.py):kudu_restart_in_progress=True, 404 responses continue polling (Kudu is restarting) rather than breaking/raising; first occurrence logs aWARNING, subsequent ones log atINFOto reduce noisekudu_restart_in_progress=True(package was already uploaded to storage successfully)response.json()and.get('status')are now cached; 404 branches consolidated into a singleif/elif/elifblockTesting Guide
Unit tests added in
TestCheckZipDeploymentStatusFlexcovering the key polling sequences:History Notes
[Appservice]
az functionapp deployment source config-zip: Fix intermittent failure for flex consumption function apps when Kudu restarts after package deployment (status 6 treated as transient, not terminal)This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
azcliprod.blob.core.windows.net/usr/bin/python python -m unittest azure.cli.command_modules.appservice.tests.latest.test_functionapp_commands_thru_mock.TestCheckZipDeploymentStatusFlex -v(dns block)If you need me to access, download, or install something from one of these locations, you can either: