refactor(uat): stable digest-addressed OCI ref for evidence push#1479
Conversation
Switch the UAT evidence push target to the repo-per-recipe layout: the
repo path is the stable recipe identity and the run id moves to a
`:run-<id>` tag, so consumers pin immutably by digest.
before: ghcr.io/nvidia/aicr-uat-eks-h100-training-<run_id>
:h100-eks-ubuntu-training-kubeflow-<fp12>
after: ghcr.io/nvidia/aicr-evidence/h100-eks-ubuntu-training-kubeflow
:run-<run_id>
Eliminates the four redundancies in NVIDIA#1478: run_id no longer fragments
GHCR into a package per run (`oras repo tags` now lists run history,
visibility set once); coordinate dims are no longer duplicated across
repo and tag; the non-verifiable 12-hex fingerprint prefix is dropped
(an explicit tag suppresses the aicr <slug>-<fingerprint> derivation);
and the full recipe slug is the single canonical coordinate.
- tests/uat/{aws,gcp}/tests/h100-training-config.yaml: bare per-recipe
repo
- tests/uat/{aws,gcp}/run: inject_push_target applies :run-${RUN_ID}
idempotently (strips any prior :run-… tag)
- .github/workflows/uat-{aws,gcp}.yaml: summary echo + comments
Closes NVIDIA#1478
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughUAT AWS and GCP evidence references were updated to use stable Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
mchmarny
left a comment
There was a problem hiding this comment.
Clean refactor — moves the CI run_id out of the OCI repo name into a :run-<id> tag on a stable per-recipe repo, killing the per-run package sprawl and the duplicated coordinate dims.
Verified the load-bearing piece: an explicit tag suppresses aicr's <slug>-<fingerprint> derivation (effectiveEvidenceRef, pkg/evidence/attestation/oci.go:159), and the inject_push_target strip-and-reapply (%%:run-*) is idempotent across re-runs and changed RUN_ID (the :run- glob won't clobber a registry port or other tags). No other references to the old aicr-uat-* packages remain. All CI green. LGTM.
One operational reminder (already in your rollout notes): the first run creates a fresh ghcr.io/nvidia/aicr-evidence/<recipe> package — its visibility needs setting once for downstream pulls.
- Restore `case "oci": return "oke"` in parseProvider alongside the new
ocid1. prefix check — both formats must map to oke
- Fix inject_push_target in aws/run, gcp/run, oci/run to use the
:run-${RUN_ID} tag scheme (#1478/#1479), not the repo-suffix approach
- Update apiVersion aicr.nvidia.com/v1alpha1 → aicr.run/v1alpha2 in
l40s-training-config.yaml and assert-recipe.yaml
- Add `ol` to OSDimension comment in pkg/fingerprint/types.go
- Add `ol` and `talos` to Supported values comment in pkg/client/v1/types.go
Signed-off-by: Atif Mahmood <[email protected]>
Signed-off-by: Atif Mahmood <[email protected]>
- Restore `case "oci": return "oke"` in parseProvider alongside the new
ocid1. prefix check — both formats must map to oke
- Fix inject_push_target in aws/run, gcp/run, oci/run to use the
:run-${RUN_ID} tag scheme (#1478/#1479), not the repo-suffix approach
- Update apiVersion aicr.nvidia.com/v1alpha1 → aicr.run/v1alpha2 in
l40s-training-config.yaml and assert-recipe.yaml
- Add `ol` to OSDimension comment in pkg/fingerprint/types.go
- Add `ol` and `talos` to Supported values comment in pkg/client/v1/types.go
Signed-off-by: Atif Mahmood <[email protected]>
Signed-off-by: Atif Mahmood <[email protected]>
Summary
Switch the UAT evidence push target to a stable, digest-addressed repo-per-recipe layout: the repo path is the recipe identity and the run id moves to a
:run-<id>tag.Motivation / Context
The UAT pipeline baked the CI
run_idinto the OCI repository name and duplicated recipe-coordinate dims across both the repo and the derived tag, fragmenting evidence across a new GHCR package per run and making it hard to discover, list, or consume.This adopts the issue's preferred repo-per-recipe layout, eliminating all four redundancies:
run_idno longer in the repo name → one stable package per recipe;oras repo tagslists run history; visibility set once.<recipe-slug>-<fingerprint>derivation; consumers pin immutably via@sha256:….The run id is not lost: the bundle predicate carries
rekorLogIndex+attestedAt, and the tag preserves CI provenance.Fixes: #1478
Related: N/A
Type of Change
Component(s) Affected
tests/uat/{aws,gcp},.github/workflows/uat-{aws,gcp}.yaml)Implementation Notes
tests/uat/{aws,gcp}/tests/h100-training-config.yaml—push:is now the bare per-recipe repo (matching the canonical overlay namesh100-eks-ubuntu-training-kubeflow/h100-gke-cos-training-kubeflow).tests/uat/{aws,gcp}/run—inject_push_targetapplies a:run-${RUN_ID}tag idempotently, stripping any prior:run-…tag first so a re-run (or a changedRUN_ID) in the same workspace does not double-append..github/workflows/uat-{aws,gcp}.yaml— the**Evidence (OCI):**summary echo and surrounding comments reference the new ref.<recipe-slug>-<fingerprint>tag derivation (which only runs when the ref omits a tag); the nested repo path + tag parses cleanly throughoci.ParseOutputTarget(dockerreference.ParseNormalizedNamed).Testing
yamllint tests/uat/{aws,gcp}/tests/h100-training-config.yaml .github/workflows/uat-{aws,gcp}.yaml # clean bash -n tests/uat/{aws,gcp}/run # syntax OKYAML/shell-only change (no Go sources), so the Go test/lint/coverage gates do not apply.
inject_push_targetidempotency verified across fresh, repeat, changed-RUN_ID, andlocal-<ts>forms.Risk Assessment
Rollout notes: First run on the new layout creates the
ghcr.io/nvidia/aicr-evidence/<recipe>package; set its visibility once. No consumer pins the oldaicr-uat-*packages.Checklist
make testwith-race)make lint)git commit -S)