feat(api): propagate SnapshotJob PodSnapshot metadata - #129
Conversation
Signed-off-by: Julien Mancuso <jmancuso@nvidia.com>
|
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 ignored due to path filters (2)
📒 Files selected for processing (8)
Included review availability: Your plan provides up to 12 included reviews per hour; 11 remain after this review. Walkthrough
ChangesSnapshotJob metadata propagation
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to This change propagates validated SnapshotJob metadata to generated PodSnapshots; no actionable merge-blocking risk remains based on the supplied evidence. Sequence Diagram(s)sequenceDiagram
participant SnapshotJob
participant Controller
participant PodSnapshot
SnapshotJob->>Controller: Provide template labels and annotations
Controller->>Controller: Validate and clone metadata
Controller->>PodSnapshot: Create metadata with ownership labels
PodSnapshot-->>Controller: Return existing metadata
Controller->>Controller: Match expected metadata
🚥 Pre-merge checks | ✅ 6 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (6 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 58.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 12 functions across 7 files. (1 skipped: 1 unsupported.) Full details: Breaking Api ChangesExplanation No breaking API change matches the custom check. The PR only adds optional Full details: Rbac Least PrivilegeExplanation No failure condition is present. The pull-request diff changes CRD schemas, API types, generated deepcopy code, and SnapshotJob controller logic; it changes no RBAC marker or Helm RBAC manifest. Existing kubebuilder markers and Helm RBAC templates use explicit resources and verbs. No wildcard grant requires justification.
Comment |
Summary
SnapshotJob.spec.podSnapshotTemplatePodSnapshotand include it in safe adoption checksPart of ai-dynamo/dynamo#13919.
Validation
GOCACHE=/private/tmp/snapshot-metadata-go-cache go test ./...inapi/GOCACHE=/private/tmp/snapshot-metadata-go-cache go test ./...inoperator/GOCACHE=/private/tmp/snapshot-metadata-go-cache go vet ./...inapi/andoperator/controller-gen v0.19.0make lintcould not run locally because the installed golangci-lint binary was built with Go 1.24, below this repository's Go 1.26.6 module version.Summary by CodeRabbit
New Features
Bug Fixes