[DNM][kuttl] Drop null Job pod template creationTimestamp asserts - #2052
[DNM][kuttl] Drop null Job pod template creationTimestamp asserts#2052nemarjan wants to merge 1 commit into
Conversation
cifmw-multinode-kuttl started failing this test after the GitHub check jobs moved from OCP 4.20 to 4.22. The dataplane deploy itself succeeds; KUTTL then compares live Jobs against a full YAML dump that still has Job.spec.template.metadata.creationTimestamp: null (leftover from oc get -o yaml). On 4.20 the API still serialized that null key, so the assert matched. On 4.22 Kubernetes omits empty creationTimestamp (omitempty), so the key is missing from the live object. KUTTL waits the full timeout for a field that will never appear, then fails with: .spec.template.metadata.creationTimestamp: key is missing from map Remove the dumped null fields from the Job asserts so the test does not depend on that serialization difference. Signed-off-by: Nemanja Marjanovic <nemarjan@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: nemarjan The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
OpenStackControlPlane CRD Size Report
Threshold reference
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughSummary by CodeRabbit
WalkthroughThe Kuttl assertions remove autogenerated ChangesDataplane assertion updates
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to This change removes obsolete null creationTimestamp entries from KUTTL Job assertions, preventing version-dependent test timeouts while leaving dataplane behavior unchanged; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoStabilize KUTTL Job assertions across Kubernetes versions
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
1. Remaining Job asserts still brittle
|
| suspend: false | ||
| template: | ||
| metadata: | ||
| creationTimestamp: null |
There was a problem hiding this comment.
1. Remaining job asserts still brittle 🐞 Bug ≡ Correctness
The PR removes the null pod-template timestamp from only the global-service asserts, while other KUTTL Job asserts still require spec.template.metadata.creationTimestamp: null. Those tests can hit the same missing-key timeout on Kubernetes versions that omit this omitempty field, so the serialization-related failures are not fully eliminated.
Agent Prompt
## Issue description
Other KUTTL Job assertions still contain `spec.template.metadata.creationTimestamp: null`, which can fail when the Kubernetes API omits the empty field.
## Issue Context
The current PR removes this field from `test/kuttl/tests/dataplane-deploy-global-service-test/01-assert.yaml` and `02-assert.yaml`, but equivalent assertions remain in other KUTTL fixtures.
## Fix Focus Areas
- test/kuttl/tests/dataplane-deploy-no-nodes-test/01-assert.yaml[96-96]
- test/kuttl/tests/dataplane-deploy-no-nodes-test/04-assert.yaml[97-97]
- test/kuttl/tests/dataplane-deploy-no-nodes-test/06-assert.yaml[96-96]
- test/kuttl/tests/dataplane-deploy-no-nodes-test/06-assert.yaml[206-206]
- test/kuttl/tests/dataplane-deploy-tls-test/02-assert.yaml[164-164]
- test/kuttl/tests/dataplane-deploy-tls-test/02-assert.yaml[298-298]
- test/kuttl/tests/dataplane-deploy-tls-test/03-assert.yaml[170-170]
- test/kuttl/tests/dataplane-extramounts/00-assert.yaml[58-58]
- test/kuttl/tests/dataplane-service-config/00-assert.yaml[38-38]
- test/kuttl/tests/dataplane-service-custom-image/00-assert.yaml[85-85]
- test/kuttl/tests/dataplane-service-failure/00-assert.yaml[37-37]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
cifmw-multinode-kuttl started failing this test after the GitHub check jobs moved from OCP 4.20 to 4.22. The dataplane deploy itself succeeds; KUTTL then compares live Jobs against a full YAML dump that still has Job.spec.template.metadata.creationTimestamp: null (leftover from oc get -o yaml).
On 4.20 the API still serialized that null key, so the assert matched. On 4.22 Kubernetes omits empty creationTimestamp (omitempty), so the key is missing from the live object. KUTTL waits the full timeout for a field that will never appear, then fails with:
.spec.template.metadata.creationTimestamp: key is missing from map
Remove the dumped null fields from the Job asserts so the test does not depend on that serialization difference.