test: deflake ComplexWorkflowIT - #3611
Conversation
The test timed out waiting for the workflow to report READY. Its StatefulSets ran mongo:4.4 with a 1Gi volumeClaimTemplate, so the ready postcondition (readyReplicas > 0) depended on a ~400MB Docker Hub pull plus PVC provisioning completing inside the 120s budget. In the failing CI run the first StatefulSet's status never changed after creation, so `second` never unblocked and the status stayed NOT_READY. Swap the workload for registry.k8s.io/pause:3.9 and drop the volume claim template. The pod has no readiness probe, so it is ready as soon as it runs, and the image is ~700KB from a registry without anonymous pull rate limits. Also remove the orphaned copies of these templates under resources/io/javaoperatorsdk/operator/sample/complexdependent, left behind when the test classes moved to the workflow package; nothing referenced them. Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
💤 Files with no reviewable changes (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe complex dependent test fixtures now use minimal web and pause workloads. MongoDB-specific resources and persistent storage definitions were removed. The StatefulSet test builder no longer adds a label to the first volume claim template. ChangesComplex dependent test fixtures
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: 🟡 Moderate · up to The test fixture now uses a pause-based StatefulSet to reduce startup time, but the pod may be rejected in CI namespaces enforcing Restricted Pod Security. Confirm the namespace policy or add compatible pod security settings before merging. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
🟢 Approval recommended
Changes are consistent with the test’s intent (readiness-focused), remove known CI flake causes (image pull/PVC provisioning), and references to deleted templates appear fully eliminated.
Pull request overview
This PR deflakes the ComplexWorkflowIT workflow test by making the StatefulSet workload start quickly and predictably in CI, avoiding Docker Hub pull latency and PVC provisioning delays that previously caused readiness timeouts.
Changes:
- Replace the StatefulSet template workload from
mongo:4.4+ PVCs toregistry.k8s.io/pause:3.9with no volume claims. - Update the Service and StatefulSet resource templates to match the new lightweight workload.
- Remove unused/orphaned YAML templates left under the old
sample/complexdependenttest resource path, and drop the now-obsolete PVC label editing inBaseStatefulSet.
File summaries
| File | Description |
|---|---|
| operator-framework/src/test/resources/io/javaoperatorsdk/operator/workflow/complexdependent/statefulset.yaml | Switch StatefulSet template to pause:3.9 and remove PVC template to avoid CI timeouts. |
| operator-framework/src/test/resources/io/javaoperatorsdk/operator/workflow/complexdependent/service.yaml | Update Service template naming/ports to align with the simplified test workload. |
| operator-framework/src/test/resources/io/javaoperatorsdk/operator/sample/complexdependent/dependent/statefulset.yaml | Delete orphaned/unused legacy StatefulSet template resource. |
| operator-framework/src/test/resources/io/javaoperatorsdk/operator/sample/complexdependent/dependent/service.yaml | Delete orphaned/unused legacy Service template resource. |
| operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/complexdependent/dependent/BaseStatefulSet.java | Remove PVC-template metadata editing since the StatefulSet template no longer contains volumeClaimTemplates. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The test timed out waiting for the workflow to report READY. Its StatefulSets
ran mongo:4.4 with a 1Gi volumeClaimTemplate, so the ready postcondition
(readyReplicas > 0) depended on a ~400MB Docker Hub pull plus PVC provisioning
completing inside the 120s budget. In the failing CI run the first StatefulSet's
status never changed after creation, so
secondnever unblocked and the statusstayed NOT_READY.
Swap the workload for registry.k8s.io/pause:3.9 and drop the volume claim
template. The pod has no readiness probe, so it is ready as soon as it runs, and
the image is ~700KB from a registry without anonymous pull rate limits.
Also remove the orphaned copies of these templates under
resources/io/javaoperatorsdk/operator/sample/complexdependent, left behind when
the test classes moved to the workflow package; nothing referenced them.
Signed-off-by: Attila Mészáros a_meszaros@apple.com
Summary by CodeRabbit
K8S_NAMElabel to the first volume claim template in the test StatefulSet construction.