fix: recover azd deployments in restricted environments - #85
fix: recover azd deployments in restricted environments#85Naveen Krishnan (navintkr) wants to merge 1 commit into
Conversation
|
Naveen Krishnan (@navintkr) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
There was a problem hiding this comment.
Pull request overview
This PR adds recovery mechanisms for azd up deployments in restricted environments by (1) allowing operators to override the deterministic 5-character uniqueness suffix used in globally-unique resource names, and (2) keeping knowledge-base indexing functional when Blob data-plane access is blocked by using public repository URLs for citations.
Changes:
- Add a
solutionUniqueTextOverrideparameter wired fromAZURE_SOLUTION_UNIQUE_TEXTand propagate it through naming + outputs. - Add a Blob upload fallback in
setup_knowledge_basethat switches citation URLs to raw GitHub URLs when Blob uploads fail withAuthorizationFailure. - Update deployment documentation and maintainer guidance to describe both recovery paths.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| infra/scripts/foundry/step_knowledge_base.py | Adds AuthorizationFailure fallback to use raw GitHub URLs for citations while indexing local PDF content. |
| infra/main.parameters.json | Introduces solutionUniqueTextOverride parameter sourced from AZURE_SOLUTION_UNIQUE_TEXT. |
| infra/main.bicep | Adds override parameter, uses it for suffix computation and passes through to the Foundry module + outputs. |
| docs/fabric/DeploymentGuideFabricManual.md | Mentions citation-URL fallback behavior in the automated deployment path. |
| docs/DeploymentGuide.md | Documents the new env var and the Blob-policy citation fallback in overview/results text. |
| .github/instructions/infra-scripts.instructions.md | Updates maintainer instructions to document the AuthorizationFailure citation fallback behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| except (subprocess.CalledProcessError, FileNotFoundError) as exc: | ||
| raise RuntimeError("Could not determine the GitHub repository for document citations") from exc | ||
|
|
||
| match = re.search(r"github\.com[/:]([^/]+/[^/]+?)(?:\.git)?$", remote) |
| param deployingUserPrincipalType string = 'User' | ||
|
|
||
| // ========== Variables ========== // | ||
| var effectiveSolutionUniqueText = empty(solutionUniqueTextOverride) ? solutionUniqueText : solutionUniqueTextOverride |
|
Hello Naveen Krishnan (@navintkr) |
Purpose
Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
AZURE_SOLUTION_UNIQUE_TEXTis unset.AZURE_SOLUTION_UNIQUE_TEXTconsistently updates resource names and exported outputs.AuthorizationFailurestill fail fast.mainwhenorigin/HEADis unavailable.Other Information
Validated with:
azdprovisioning preview and full East US deployment.python -m compileall -q infra/scripts.infra/main.parameters.json.az bicep build --file infra/main.bicep(existing repository warnings only).git diff --check.