Skip to content

chore: dev to main merge#164

Open
Saswato-Microsoft wants to merge 4 commits into
mainfrom
dev
Open

chore: dev to main merge#164
Saswato-Microsoft wants to merge 4 commits into
mainfrom
dev

Conversation

@Saswato-Microsoft
Copy link
Copy Markdown
Contributor

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:

  • Added a scheduled trigger to .github/workflows/azd-template-validation.yml to run every Thursday at 7:00 AM IST, ensuring regular validation of AZD templates.

Environment isolation for Azure deployments:

  • Updated .github/workflows/azure-dev.yml to generate a unique AZURE_ENV_NAME per run by appending the GITHUB_RUN_ID, preventing environment name clashes during parallel or repeated workflow executions.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

Rafi-Microsoft and others added 4 commits May 20, 2026 15:16
…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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_NAME in 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"
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.

5 participants