Repository navigation
ci(uat): split readiness gate into its own phase and step - #2989
Conversation
…r output The install phase ran both the apply and the deployment readiness gate, so a gate that never converged read as an install failure (NVIDIA#2630). Add a `readiness` phase (also run by `all`) that owns install_readiness_gate; install is now apply plus the post-install state dump. Each gate attempt now writes its CTRF report instead of --output /dev/null. For a failed attempt, readiness-gate.log gains a "--- failed validator output (attempt N) ---" block with every non-passed test's name, message, and stdout, including expected-resources' "Failed resources:" list, which was previously lost when the validator pods were reaped. On gate failure the phase emits "::error title=UAT readiness gate failed::<validators>: <reason>". Signed-off-by: Nathan Hensley <nhensley@nvidia.com>
Each cloud lane now runs `./tests/uat/<cloud>/run readiness` as "UAT - readiness gate (validate --phase deployment)" (id: readiness) after the install step, so a gate failure is legible from the run list alone (NVIDIA#2630). kind's install step drops "+ readiness gate" from its name. The old combined install budget is split into install (25m; 45m for AWS argocd) and readiness (65m), so per-job totals are unchanged. AWS and Azure refresh credentials before the gate. The conformance step and the pre-validate credential refresh now key off steps.readiness. Debug collection and teardown still run on any failure. daytime-up still runs the gate before holding the cluster. The readiness step gets no GITHUB_TOKEN. Signed-off-by: Nathan Hensley <nhensley@nvidia.com>
Document the install/readiness split in docs/contributor/uat.md: which step fails for what, the "UAT readiness gate failed" annotation, and the per-attempt failed-validator block in readiness-gate.log. aicr-uat-report now tags a failed readiness step as product signal and appends the failing validators from its annotation. It tags an install failure as apply-only (maybe infra) when the job has a readiness step, and as ambiguous for older runs where install still ran the gate. When downloading a bundle, the triage digest echoes the last failed-validator block from readiness-gate.log. Signed-off-by: Nathan Hensley <nhensley@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-ci-uat-readiness-gate-2630.docs.buildwithfern.com/aicr |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA/aicr/.coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review. 📝 WalkthroughWalkthroughUAT installation and deployment readiness now run as separate phases. AWS, Azure, GCP, and kind workflows run readiness after installation and gate later validation or conformance on readiness success. The readiness gate records failed-validator details in logs and workflow annotations. The UAT report tool classifies failures and adds readiness evidence to debug digests. Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to Readiness failures are separated from installation failures, later checks are gated appropriately, and failure diagnostics remain available. No material merge risk is established. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…-kwok-lane Brings in main up to 25a725b, including #2989, which splits the readiness gate out of phase_install into its own phase_readiness and workflow step. Three hand-written files conflicted and were resolved by hand so both sides survive: - uat-azure.yaml, uat-gcp.yaml: the job budget comment keeps #2989's "install 25 + readiness 65" and this branch's "the selected CUJ". - tests/uat/lib/phases.sh: phase_install is #2989's apply-only body; phase_readiness carries this branch's VALIDATE_PHASES condition, so a lane that leaves out the deployment phase still skips the gate and says so; the readiness budget comment points at phase_readiness; the #2096 note keeps "readiness-phase gate" and "before validate launches"; and the `all` arm keeps the intent-and-platform CUJ dispatch with #2989's phase_readiness call added. Goldens did not conflict. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
#2989 moved the readiness gate out of phase_install into its own phase_readiness, and the merge carried this branch's VALIDATE_PHASES condition over with it. Two of this branch's tests still assumed the old shape: - validate-phases_test.sh drove phase_install and expected it to run or skip the gate, so four checks failed once install stopped calling it. They now drive phase_readiness, which is where the knob decides. - cuj-dispatch_test.sh stubs every phase before driving `uat_main all`, but not the new phase_readiness, so the real gate loop ran against AICR_BIN=/bin/true and the test hung until killed. It now stubs phase_readiness too. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
After #2989, phase_install only applies the bundle; the readiness gate runs in phase_readiness. The sim lane's install step was still named "helmfile apply + readiness gate", which the merge made false. It now matches the name #2989 gave the other lanes' install steps. The phases.sh header also gains the one fact the merge added to the readiness phase: it is skipped, with a log line, when VALIDATE_PHASES leaves out the deployment phase. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
#2989 moved the post-install readiness gate out of the install phase into its own readiness phase, and gave each cloud lane a step that calls it. The sim lane did not exist on main then, so after the merge nothing on it calls the readiness phase. The gate stays off here either way, because run-sim sets VALIDATE_PHASES=conformance, but phase_readiness's "readiness gate SKIPPED" line no longer printed, so the skip became silent. The lane now calls run-sim readiness after install, with a 5-minute budget since the step can only announce the skip, and the topology check waits on it as the cloud lanes' later steps wait on theirs. Run locally with no cluster and a failing AICR_BIN, the step exits 0 and prints the skip line. Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Summary
Split the UAT readiness gate out of the install phase into its own
readinessphase and workflow step, so a gate that never converges no longer shows up as an install failure. Each gate attempt now captures the failing validators' own output (for example expected-resources'Failed resources:block) incluster-debug/readiness-gate.log.Motivation / Context
From 2026-09-04 to 2026-09-08, every AKS/EKS/GKE nightly failed at
UAT - install (helmfile apply). The real cause was theexpected-resourcesdeployment validator failing the readiness gate. Because the step name pointed at infra, the failures were written off as noise for four nights. The validator's diagnosis also never made it into the debug bundle, since the validator pods are reaped between gate attempts and the gate ran with--output /dev/null.Fixes: #2630
Related: #2593, #2594, #2597
Type of Change
Component(s) Affected
cmd/aicr,pkg/cli)cmd/aicrd,pkg/server)pkg/recipe)pkg/bundler,pkg/component/*)pkg/collector,pkg/snapshotter)pkg/validator)pkg/errors,pkg/k8s)docs/,examples/)tests/uat/), UAT workflows (.github/workflows/uat-{aws,gcp,azure,kind}.yaml),aicr-uat-reportskillImplementation Notes
New
readinessphase (tests/uat/lib/phases.sh)phase_installnow only applies (helmfile apply or argocd sync) and dumps post-install state. The newphase_readinessrunsinstall_readiness_gate.run readiness <config>dispatches to it, andrun allruns it between install and conformance. The usage text lists the new phase.New workflow step on aws/gcp/azure/kind
UAT - readiness gate (validate --phase deployment)(id: readiness) runs after install, gated onsteps.install.outcome == 'success'.steps.readiness.outcomeinstead ofsteps.install.outcome: the conformance step (UAT - validate (all phases) + emit signed evidence) and the AWS/Azure pre-validate credential refresh. The run-summary table gets aReadiness gaterow. Debug collection and teardown still run on any failure.READINESS_TIMEOUT_SECONDS(60m) plus room for the fail-closed diagnostic.cloud_refresh_credentialshook is unchanged, and the runner comments now point atphase_readiness.GITHUB_TOKEN. Only the argocd apply needs it.+ readiness gatefrom its name.daytime-upstill runs the gate before holding the cluster, so a held cluster has always passed the gate.Per-attempt CTRF report instead of
--output /dev/nullmktemp -dscratch dir. The previous attempt's report is deleted first so stale data can't be misattributed. The scratch dir is removed on every exit path.readiness-gate.loggets a--- failed validator output (attempt N) ---block. It lists each non-passed test's name, status, message, and stdout. For expected-resources, that includes theFailed resources:list that used to be lost when the pods were reaped. A census-regress attempt records the census reason the same way.if/||contexts, so it only adds diagnostics. A missing or malformed report produces a fallback note and can never turn a failed attempt into a pass or abort the gate under errexit.::error title=UAT readiness gate failed::<validators>: <reason>, naming the validators that failed the last attempt. The message goes throughgha_escape_data, so newlines can't truncate or forge an annotation. If the last attempt passed but the streak was still short at the deadline, the annotation saysnone on the last attemptinstead of blaming an earlier failure.Reporting and docs
docs/contributor/uat.mddocuments which step fails for what, the annotation, and the per-attempt failed-validator block.aicr-uat-reportchanges:readiness-gate.log.Testing
TestUATReadinessGateIsItsOwnStep(table-driven over AWS/Azure/GCP/kind) checks four things in each workflow: the readiness step exists with the expected name and id; it runs after install; the install step no longer claims the gate; and it gets noGITHUB_TOKEN. It also checks that everything that needs a gated stack keys offsteps.readiness.phases_test.shgains readiness cases for:readiness,allordering, unknown-phase usage) and install no longer running the gateunknown validator; a short streak with a passing last attempt names no validator; a passing gate logs no failure block; scratch files are cleaned uptests/uatworkflow test changed, so the coverage gate doesn't apply. The workflow changes still need a real UAT run to be exercised end to end; they have not been run yet.Risk Assessment
This touches all four UAT lanes' step graphs and timeouts. The gate logic itself (pass criteria, streak, census fold-in, credential refresh) is unchanged; only where it runs and what it records changed. It is CI-only, with no product code or user-facing surface, and easy to revert.
Rollout notes: N/A for users. Step failures in UAT runs from before this change still show up under
UAT - install ..., andaicr-uat-reportlabels those as ambiguous.Checklist
make testwith-race) — onlygo test -race ./tests/uat/...+phases_test.shrun so farmake lint)git commit -S) — GPG signing info🤖 Generated with Claude Code