Skip to content

Use default host name for flex health check - #5462

Merged
sarah (satvu) merged 3 commits into
mainfrom
satvu/health-check-default-hostname
Jul 9, 2026
Merged

sarah (satvu) merged 3 commits into
mainfrom
satvu/health-check-default-hostname

Conversation

@satvu

@satvu sarah (satvu) commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

Issue describing the changes in this PR

Resolves #5465

Leverage defaultHostName instead of .FirstOrDefault() of enabledHostNames property to make sure check goes to the correct site.

Pull request checklist

  • My changes do not require documentation changes
    • Otherwise: Documentation issue linked to PR
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • My changes should not be added to the release notes for the next release
    • [] Otherwise: I've added my notes to release_notes.md
  • I have added all required tests (Unit tests, E2E tests)

Additional Information

Went back through the history w/ an agent, the use of enabledHostNames goes all the way to "day one" and has no documented reasoning for why. One potential reason that enabledHostNames is used is because it only lists hostnames that are currently enabled/accessible, because defaultHostName exists even if the site is stopped or hostname is disabled.

That still seems incorrect to me. Using defaultHostName should be more reliable because it returns the canonical *.azurewebsites.net hostname, avoiding issues with custom domains in enabledHostNames that might have different TLS/routing configurations.

Example of what is returned from each:

{
"defaultHostName": "some-app-name.azurewebsites.net",
"enabledHostNames": [
"some-custom-domain-name.net",
"some-app-name.azurewebsites.net",
"some-app-name.scm.azurewebsites.net"
]
}

Testing

  • Tested locally e2e, deployed flex app and checked that health check logs were written and check succeeded.

@satvu
sarah (satvu) requested a review from a team as a code owner July 6, 2026 21:42
sarah (satvu) and others added 2 commits July 7, 2026 14:21
Add a pre-check step that diffs against origin/main to determine if
eng/build/Packages.props was modified. The worker version validation
(which calls GitHub API) is now skipped for PRs that don't change
host or worker versions, avoiding 429 rate limit errors on shared
CI agents.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Comment thread src/Cli/func/Helpers/AzureHelper.cs Resolved
Comment thread src/Cli/func/Helpers/AzureHelper.cs Resolved
@satvu
sarah (satvu) merged commit 3197518 into main Jul 9, 2026
42 checks passed
@satvu
sarah (satvu) deleted the satvu/health-check-default-hostname branch July 9, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use default host name for flex deployment health check

3 participants