[Bug]: Enforce presence immutability for optional JobSpec fields
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
Research direction
Start with ADR-079 Decision 6 and the field definitions in api/v1alpha1/job_types.go, then inspect Workflow's JobTemplateSpec.Spec in api/v1alpha1/workflow_types.go. Run or extend envtest admission coverage for direct Jobs and Workflow templates, including add, remove, and value-change transitions when fields are absent or present. Done includes reviewed regenerated CRDs and generated code plus the documented compatibility effect.
Written by the indexing model from the issue text.
Description
Prerequisites
- I searched existing issues
- I can reproduce this issue
Code of Conduct
- I agree to follow the project's Code of Conduct
Bug Description
JobSpec.nodeHealthMonitor, goodputMeasurement, and bandwidthMeasurement are documented and marked as immutable, but each optional field has only a field-level CEL rule:
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="... is immutable"
CEL transition rules scoped to an optional field are not evaluated when that field changes between absent and present. A direct Job, or a Workflow carrying the same JobSpec through spec.jobTemplate.spec, can therefore add or remove these fields after creation even though changing an existing value is rejected.
This leaves two meanings of "immutable" in the same CRD. ADR-079 identifies the complete pattern for new optional immutable fields: a parent-level presence rule plus field-level equality.
Expected behavior
For all three fields, admission rejects:
- absent to present;
- present to absent; and
- changes to a present value.
The rule must apply to direct Jobs and propagate through JobTemplateSpec.Spec to Workflows.
Acceptance Criteria
- Add parent-level presence-invariance rules for
nodeHealthMonitor,goodputMeasurement, andbandwidthMeasurementonJobSpec. - Keep the existing field-level equality rules.
- Add envtest admission coverage for add, remove, and value-change transitions on direct Jobs and Workflow Job templates.
- Cover existing objects whose stored specs omit the optional fields.
- Regenerate and review the affected CRDs and generated code.
- Document the compatibility effect: objects created without one of these fields cannot add it later.
Component
API / CRDs
Steps to Reproduce
- Create a Job without one of the three optional fields.
- Update the Job to add the field.
- Observe that API admission accepts the update despite the field's immutable marker.
- Repeat by removing a present field and through
Workflow.spec.jobTemplate.spec.
Environment
- NVCRE version: current
main - Kubernetes version: envtest version pinned by the repository
- GPU architecture: not applicable
- Cloud provider / platform: not applicable
- Deployment method: any
Logs/Output
No controller log is required; this is an API admission behavior gap.
References
- ADR-079, Decision 6
api/v1alpha1/job_types.goapi/v1alpha1/workflow_types.go(JobTemplateSpec.Spec)
- Dominant language
- Go
- Stars
- 55
- Forks
- 19
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 107
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cluster-readiness-engine
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
-
github_actions security
Difficulty 4/5 3-5 days Newbie friendliness 62/100
-
bug needs-triage
Difficulty 4/5 3-5 days Newbie friendliness 45/100
All issues in NVIDIA/cluster-readiness-engine
Similar issues
-
optimization optimization:agents-md-curator
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
githubnext/gh-aw-cao#13143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
blinklabs-io/bursa#904 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yanet-platform/ipfw-go#129 ·
-
bug confmap/provider/googlesecretmanagerprovider needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
open-telemetry/opentelemetry-collector-contrib#51273 · 2 comments ·
-
bug: AI Gateway client filter lists "Unknown" twice when NULL and literal Unknown clients coexist Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100