Harden nightly pipeline: timeouts, retries, caching, annotations, Bicep cleanup#531
Merged
MikeWedderburn-Clarke merged 6 commits intomainfrom Apr 13, 2026
Merged
Conversation
Add comprehensive specification addressing all 7 historical nightly pipeline failure modes with defence-in-depth: - P1: Job-level timeouts preventing indefinite hangs - P1: PostgreSQL auto-stop wake before deployment - P1: Idempotent Bicep deployment with what-if validation - P2: Docker layer caching for faster builds - P2: Structured error annotations for fast diagnosis - P2: V8 JIT crash prevention via fork-based test isolation Includes 18 functional requirements, 9 measurable success criteria, 6 user stories with acceptance scenarios, and quality checklist. Builds on and replaces spec 020 nightly workflow. Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Phase 0: research.md — Docker caching (type=gha), job timeouts, structured annotations, retry wrappers, readiness check hardening, Bicep param cleanup, npm cache, test parallelisation (rejected), Bicep pre-validation strategy. Phase 1: data-model.md — pipeline entity model (3 jobs, wake sequence, error annotations, cache entity, Bicep param changes). contracts/nightly-workflow.md — trigger/concurrency/timeout/annotation contracts, readiness check params, PG wake state machine. quickstart.md — step-by-step implementation guide. Agent context updated for copilot. Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
… 021) 17 tasks across 9 phases covering: - Phase 1: Bicep parameter cleanup (4 tasks) - Phase 2: Foundational workflow timeouts (1 task) - Phases 3-8: User Stories 1-6 mapped to spec priorities - Phase 9: Polish and validation (2 tasks) Maps to 6 user stories: reliable pipeline (P1), infrastructure wake-up (P1), idempotent deployment (P1), Docker caching (P2), error annotations (P2), crash-resilient tests (P2). Files modified: nightly.yml, database.bicep, front-door.bicep, container-apps.bicep, main.bicep. No new files created. No test files added. Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
- T003: Note that research.md R-006 says no unused params in container-apps.bicep but code inspection confirms appInsightsConnectionString is declared and never referenced - T004: Note that data-model.md says customDomainHostname isn't passed to front-door but code confirms it IS passed at line 226 - T015: Clarify 4 packages need --pool forks (not 5), since the web package already has it in its vitest config Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
…nd annotations - Phase 1: Remove unused Bicep params (database.bicep, front-door.bicep, container-apps.bicep, main.bicep) - Phase 2: Add job-level timeout-minutes (validate:45, build-and-push:30, deploy:30) - Phase 3: Add ACR login retry (3 attempts, 10s backoff) - Phase 4: Add PostgreSQL wake structured annotations and retry - Phase 5: Add Bicep pre-validation and deploy retry (2 attempts, 60s backoff) - Phase 6: Add Docker BuildKit with GHA layer caching - Phase 7: Add structured error annotations across all jobs - Phase 8: Add --pool forks to all test runners Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/a217fa53-eb40-4449-ae23-2035aad464c7 Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/a217fa53-eb40-4449-ae23-2035aad464c7 Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
MikeWedderburn-Clarke
April 13, 2026 17:58
View session
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.
All 7 nightly runs have failed consecutively. Root causes span OIDC mismatch, Bicep scope errors, location drift, curl timeouts, stopped PostgreSQL, insufficient retry budgets, and V8 JIT crashes. Individual patches landed on main already — this PR adds defence-in-depth to prevent recurrence.
Full spec-kit artifacts in
specs/021-optimized-deployment-pipeline/andspecs/copilot/create-optimized-deployment-pipeline/.Workflow hardening (
.github/workflows/nightly.yml)validate: 45min,build-and-push: 30min,deploy: 30min. No more indefinite hangs.az containerapp showcalls$SECONDS-based elapsed timing, structured annotations for every outcomeaz deployment group validatebeforecreate, fails fast on template errorsdocker/build-push-action@v6withcache-from: type=gha,cache-to: type=gha,mode=max--pool forkson all 5 test runner invocations (defence-in-depth against V8 JIT crashes)::error title=CATEGORY: Step::across all failure-prone steps for instant diagnosis in run summaryBicep cleanup (
infra/)managedIdentityClientIdfromdatabase.bicepcustomDomainHostnamefromfront-door.bicepappInsightsConnectionStringfromcontainer-apps.bicepmain.bicepto stop passing removed paramsEliminates all 5
no-unused-paramsBicep linter warnings that added noise to deploy logs.Not changed
ci.ymlanddeploy.ymlare untouched.