Skip to content

test: deflake ComplexWorkflowIT - #3611

Merged
csviri merged 1 commit into
mainfrom
deflake-complex-workflow
Sep 11, 2026
Merged

test: deflake ComplexWorkflowIT#3611
csviri merged 1 commit into
mainfrom
deflake-complex-workflow

Conversation

@csviri

@csviri csviri commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

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

Summary by CodeRabbit

  • Tests
    • Updated workflow fixtures to use generic StatefulSet and Service configurations, including port 80 and a pause-container workload.
    • Removed MongoDB-specific persistence, storage mounts, database ports, and related configuration from the fixtures.
    • Removed obsolete sample MongoDB Service and StatefulSet manifests.
    • Stopped adding the K8S_NAME label to the first volume claim template in the test StatefulSet construction.

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>
Copilot AI lite review requested due to automatic review settings September 10, 2026 12:00
@openshift-ci
openshift-ci Bot requested review from metacosm and xstefank September 10, 2026 12:00
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2cffd445-5d45-4dc0-9180-65b8d08dc38d

📥 Commits

Reviewing files that changed from the base of the PR and between 15bc50b and 33f8e7c.

📒 Files selected for processing (5)
  • operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/complexdependent/dependent/BaseStatefulSet.java
  • operator-framework/src/test/resources/io/javaoperatorsdk/operator/sample/complexdependent/dependent/service.yaml
  • operator-framework/src/test/resources/io/javaoperatorsdk/operator/sample/complexdependent/dependent/statefulset.yaml
  • operator-framework/src/test/resources/io/javaoperatorsdk/operator/workflow/complexdependent/service.yaml
  • operator-framework/src/test/resources/io/javaoperatorsdk/operator/workflow/complexdependent/statefulset.yaml
💤 Files with no reviewable changes (3)
  • operator-framework/src/test/resources/io/javaoperatorsdk/operator/sample/complexdependent/dependent/statefulset.yaml
  • operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/complexdependent/dependent/BaseStatefulSet.java
  • operator-framework/src/test/resources/io/javaoperatorsdk/operator/sample/complexdependent/dependent/service.yaml

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

Complex dependent test fixtures

Layer / File(s) Summary
Simplify test workloads
operator-framework/src/test/resources/io/javaoperatorsdk/operator/workflow/complexdependent/service.yaml, operator-framework/src/test/resources/io/javaoperatorsdk/operator/workflow/complexdependent/statefulset.yaml, operator-framework/src/test/resources/io/javaoperatorsdk/operator/sample/complexdependent/dependent/service.yaml, operator-framework/src/test/resources/io/javaoperatorsdk/operator/sample/complexdependent/dependent/statefulset.yaml
The workflow fixtures now define a web service on port 80 and a pause-container StatefulSet. The MongoDB-specific sample Service and StatefulSet resources were deleted.
Remove volume claim labeling
operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/complexdependent/dependent/BaseStatefulSet.java
BaseStatefulSet.desired no longer labels the first volume claim template with K8S_NAME.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: 🟡 Moderate · up to 33f8e

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)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the main change: reducing flakiness in ComplexWorkflowIT by simplifying its StatefulSet test workload.
Docstring Coverage ✅ Passed 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…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deflake-complex-workflow

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 to registry.k8s.io/pause:3.9 with 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/complexdependent test resource path, and drop the now-obsolete PVC label editing in BaseStatefulSet.
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.

@csviri
csviri merged commit 39af5f0 into main Sep 11, 2026
34 checks passed
@csviri
csviri deleted the deflake-complex-workflow branch September 11, 2026 07:26

@xstefank xstefank left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants