Repository navigation
[App Service] az functionapp deployment source config-zip : Use default hostname and disable redirects for Flex Consumption health checks - #34286
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no blocking issues in the focused implementation and regression coverage; tests were not executed.
No open issues 🎉
What changed in this PR
This PR hardens Flex Consumption post-deployment health checks for az functionapp deployment source config-zip by restricting where the function host key is sent.
Changes:
- Uses and validates the service-provided default hostname without falling back to custom domains.
- Disables redirects and treats 3xx responses as terminal unhealthy results, preserving the 15-attempt limit and IP-restriction handling.
- Adds regression coverage for hostname validation, redirects, retries, TLS settings, and key isolation using loopback servers.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/appservice/tests/latest/test_functionapp_commands_thru_mock.py | Adds health-check regression tests and updates the redirect expectation. |
| src/azure-cli/azure/cli/command_modules/appservice/custom.py | Validates the default hostname and prevents health-check redirects. |
Review effort: Balanced
Collaborator
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Chandni Patel (patelchandni)
requested a review
from Shreyas Gopalakrishna (shreyas-gopalakrishna)
October 27, 2026 21:57
Shreyas Gopalakrishna (shreyas-gopalakrishna)
approved these changes
Oct 27, 2026
Contributor
JaysonTaiMicrosoft
approved these changes
Oct 28, 2026
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.
🤖 PR Validation — ️✔️ All clear
Related command
az functionapp deployment source config-zip
Description
custom.py:_get_host_url()to use the service-provideddefault_host_nameinstead of the first Standard hostname.check_flex_app_after_deployment()to disable redirects and treat all 3xx responses as terminal unhealthy results.test_functionapp_commands_thru_mock.py:allow_redirects=False.Testing Guide
Deploy a ZIP package to an existing Flex Consumption function app:
az functionapp deployment source config-zip --resource-group <resource-group-name> --name <function-app-name> --src <zip-file-path>The post-deployment health check should use the app's default hostname and should not follow redirects.
History Notes
[App Service]
az functionapp deployment source config-zip: Use the default hostname and disable redirects for Flex Consumption post-deployment health checksThis 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.