azure.yaml: hydrate local.settings.json in postdeploy#16
Closed
paulyuk wants to merge 1 commit into
Closed
Conversation
Chain hydrate-local-settings before configure-trigger so 'azd up' / 'azd provision' keeps both the deployed Function App app settings AND local.settings.json in sync from the same source of truth (azd env). Today, 'azd env set MAILBOX_OWNER_EMAIL ...' followed by 'azd provision' pushes the new value to the deployed app but leaves local.settings.json stale — the local chat client then reports 'Partial: placeholder' even though the deployed app is correctly LIVE. Stacks on #15. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
Consolidated into a single PR per author preference: https://github.com/Azure-Samples/m365-inbox-serverless-agent-python/pull/(see latest) |
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.
What
Chains
hydrate-local-settings.{sh,ps1}beforeconfigure-trigger.{sh,ps1}in the postdeploy hook, so everyazd up/azd provisionkeeps both the deployed Function App's app settings and the locallocal.settings.jsonin sync from the same source of truth (azd env).Why (the split-brain bug)
Today the env-var flow has three writers and only one auto-syncs:
Reproducible failure mode:
azd upcold (placeholders in azd env)azd env set MAILBOX_OWNER_EMAIL me@tenant.comazd provision(orazd up) — deployed Function App now LIVEuv run python chat.py— doctor reports 🟡 Partial: MAILBOX_OWNER_EMAIL is a placeholderBecause step 3 silently leaves
local.settings.jsonstale, and the chat client reads from there.With this change, step 3's postdeploy rehydrates local.settings.json from the new
azd envvalues, and the chat client correctly shows 🟢 LIVE on next launch.Risk
hydrate-local-settingsfails, the&&(orif ($LASTEXITCODE...)) stops the chain — same behavior as the current single-script hook.azd updo it for them.Stacking
Based on #15 (Go live step). Merge order: #13 → #15 → this.