fix: fixed ServiceUnavailable errors in Post Deployment Script when executed through Service Principle#2221
Merged
Roopan-Microsoft merged 3 commits intoMay 13, 2026
Conversation
…able errors Co-authored-by: Copilot <copilot@github.com>
…unction app setup
Co-authored-by: Copilot <copilot@github.com>
Roopan-Microsoft
approved these changes
May 13, 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.
Purpose
This pull request improves the reliability and robustness of the post-deployment setup process for Azure Function Apps. The main changes include simplifying the GitHub Actions workflow by removing redundant retry logic from the workflow YAML and moving enhanced retry and recovery logic into the
post_deployment_setup.shscript. The script now includes explicit Function App restarts, better detection and handling of transient host runtime errors, and clearer guidance for manual recovery.Workflow simplification:
.github/workflows/job-post-deployment-setup.yml, so the setup is now attempted only once per workflow run. All retry and recovery logic is now handled within the shell script itself.Post-deployment script robustness:
ServiceUnavailableorInternalServerError) are handled with additional restarts, and host restarts are triggered every 5 failed attempts to clear stuck states.Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information