Skip to content

ci: parity for GH workflows with ADO pipelines + ACR build retry fix#12

Merged
emmanuelknafo merged 2 commits into
mainfrom
feature/gh-workflow-parity-and-acr-retry
Jun 2, 2026
Merged

ci: parity for GH workflows with ADO pipelines + ACR build retry fix#12
emmanuelknafo merged 2 commits into
mainfrom
feature/gh-workflow-parity-and-acr-retry

Conversation

@emmanuelknafo

Copy link
Copy Markdown
Contributor

Summary

Brings the .github/workflows set up to parity with .azuredevops/pipelines and fixes the recent deploy.yml failure where az acr build returned ParentResourceNotFound immediately after azd provision.

New workflows (parity)

ADO pipeline New GH workflow Notes
load-test.yml .github/workflows/load-test.yml Locust against deployed App Services. Auto-discovers URLs from rg-<env>. Publishes JUnit to Checks tab via EnricoMi/publish-unit-test-result-action; full Locust HTML + CSV uploaded as artifact load-test-report.
ui-tests.yml .github/workflows/ui-tests.yml Playwright Chromium against deployed Web. JUnit -> Checks, full playwright-report + screenshots as artifact ui-test-report. ADO wiki-publish step intentionally dropped (no GH-native consumer).
adv-sec.yml .github/workflows/codeql.yml Matrix CodeQL (csharp, javascript, python) using github/codeql-action. C# leg does an explicit dotnet build --no-incremental /p:UseSharedCompilation=false so the extractor sees every csc invocation (mirrors ADO comment). PR runs additionally execute actions/dependency-review-action to cover the ADO AdvancedSecurity-Dependency-Scanning task.

Deploy hardening (root cause of the recent failure)

ParentResourceNotFound from registries/listBuildSourceUploadUrl is a known ARM propagation race right after a fresh ACR is created. Both .github/workflows/deploy.yml and .azuredevops/pipelines/deploy.yml now:

  1. az account set --subscription "$AZURE_SUBSCRIPTION_ID" after azd provision so the az CLI is pinned to the right sub.
  2. Poll az acr show (10s x 30, 5 min cap) until the registry is queryable.
  3. Wrap each az acr build in a 5-attempt retry with 20s backoff to absorb the residual RP window.

Deploy concurrency

Added concurrency: { group: deploy-<azureEnvName>, cancel-in-progress: false } to deploy.yml so back-to-back runs against the same rg-<env> serialize, mirroring the ADO pipeline's lockBehavior: runLatest on the workshop-dev environment. Prevents the DeploymentActive race on shared ARM deployment names.

Validation

  • All five workflow YAMLs parse with PyYAML.
  • Test scripts referenced by the new workflows (tests/load/locustfile.py, tests/load/locust_stats_to_junit.py, tests/ui/playwright.config.ts -> test-results/junit.xml) already exist and have not been touched.

…etry

Adds .github/workflows equivalents for the ADO pipelines that had no GitHub
counterpart:

- load-test.yml  -> mirrors .azuredevops/pipelines/load-test.yml (Locust,
  workshop-dev environment, EnricoMi JUnit publish, HTML/CSV artifact).
- ui-tests.yml   -> mirrors .azuredevops/pipelines/ui-tests.yml (Playwright
  Chromium, EnricoMi JUnit publish, full report artifact). Wiki-publish
  step intentionally dropped; artifact + Checks summary are the GH-native
  equivalent.
- codeql.yml     -> mirrors .azuredevops/pipelines/adv-sec.yml using
  github/codeql-action (matrix csharp/javascript/python with explicit
  --no-incremental /p:UseSharedCompilation=false build for the C# leg)
  plus actions/dependency-review-action on PRs to cover the ADO
  AdvancedSecurity dependency scanning task.

Also fixes the deploy.yml ACR build failure (ParentResourceNotFound on
listBuildSourceUploadUrl right after azd provision) by:

- pinning az CLI to AZURE_SUBSCRIPTION_ID with az account set,
- waiting for ACR ARM propagation via az acr show poll (5 min cap),
- wrapping az acr build in a 5-attempt retry with 20s backoff.

The same retry/propagation guard is applied to .azuredevops/pipelines/deploy.yml
to keep both pipelines in lockstep.

Deploy concurrency: adds concurrency group scoped to the target azd env so
back-to-back runs against the same rg-<env> are serialized (mirrors the ADO
lockBehavior: runLatest on the workshop-dev environment).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Repo has GitHub default code scanning enabled, which rejects SARIF uploads
from advanced configurations with: 'CodeQL analyses from advanced
configurations cannot be processed when the default setup is enabled'.

Default setup already runs CodeQL across all detected languages, providing
full parity with the ADO AdvancedSecurity-Codeql tasks. Keep only the
actions/dependency-review-action piece since GitHub default scanning does
not include a dependency-review-on-PR equivalent.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@emmanuelknafo emmanuelknafo merged commit f126267 into main Jun 2, 2026
9 checks passed
@emmanuelknafo emmanuelknafo deleted the feature/gh-workflow-parity-and-acr-retry branch June 2, 2026 21:00
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.

1 participant