chore: dev to main merge#164
Open
Saswato-Microsoft wants to merge 4 commits into
Open
Conversation
…eleted KV conflict Every push to main reuses the static AZURE_ENV_NAME repo variable, which derives a deterministic resourceToken via uniqueString(subscription.id, environmentName, location). The Key Vault created with that token is soft-deleted on each run with purgeProtection=true, blocking redeployment for the full 90-day retention period with ConflictError. Append a UTC HHMMSS suffix to AZURE_ENV_NAME so each run produces a distinct resourceToken, unique resource names, and no soft-delete collision. This matches the proven pattern used by sibling accelerators (content-generation-solution-accelerator and others). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Addresses Copilot review on PR #159: HHMMSS suffix only provides 24-hour uniqueness, but Key Vault soft-delete with purge protection holds names for up to 90 days. GITHUB_RUN_ID is globally unique and short enough to keep env names within azd constraints. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…un-dev fix(ci): generate unique AZURE_ENV_NAME per run to avoid soft-deleted Key Vault conflict
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates GitHub Actions workflows to reduce environment name collisions in Azure Dev deployments and to run AZD template validation on a weekly schedule.
Changes:
- Append a per-run suffix to
AZURE_ENV_NAMEin the Azure dev workflow. - Add a scheduled (cron) trigger to the AZD template validation workflow.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .github/workflows/azure-dev.yml | Adds a step to derive a unique AZURE_ENV_NAME per workflow run. |
| .github/workflows/azd-template-validation.yml | Runs template validation weekly via a cron schedule. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+35
to
+40
| - name: Generate unique env name per run | ||
| shell: bash | ||
| run: | | ||
| SUFFIX="${GITHUB_RUN_ID}" | ||
| echo "AZURE_ENV_NAME=${AZURE_ENV_NAME}-${SUFFIX}" >> "$GITHUB_ENV" | ||
| echo "Using unique AZURE_ENV_NAME: ${AZURE_ENV_NAME}-${SUFFIX}" |
Comment on lines
+38
to
+39
| SUFFIX="${GITHUB_RUN_ID}" | ||
| echo "AZURE_ENV_NAME=${AZURE_ENV_NAME}-${SUFFIX}" >> "$GITHUB_ENV" |
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 introduces improvements to CI/CD workflows to enhance reliability and prevent environment name collisions. The main updates involve scheduling regular template validation and ensuring unique environment names for Azure deployments.
Workflow reliability and scheduling:
.github/workflows/azd-template-validation.ymlto run every Thursday at 7:00 AM IST, ensuring regular validation of AZD templates.Environment isolation for Azure deployments:
.github/workflows/azure-dev.ymlto generate a uniqueAZURE_ENV_NAMEper run by appending theGITHUB_RUN_ID, preventing environment name clashes during parallel or repeated workflow executions.Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information