e2e: run tests in parallel - #271
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: cardil 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 |
✅ Deploy Preview for mcp-lifecycle-operator ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @cardil. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Warning Review limit reached
Next review available in: 41 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
📝 WalkthroughWalkthroughThe Makefile now centralizes image substitution through a reusable kustomize macro. The e2e framework adds shared image defaults and prewarming, while the e2e suite enables parallel execution and replaces hardcoded image references. ChangesDeployment and e2e execution
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant TestMain
participant PrewarmImages
participant KubernetesAPI
TestMain->>PrewarmImages: request shared test images
PrewarmImages->>KubernetesAPI: create image DaemonSets
KubernetesAPI-->>PrewarmImages: report ready pods
PrewarmImages->>KubernetesAPI: delete prewarm namespace
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ 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 |
- Add t.Parallel() to all 39 Test* functions - Pre-warm test images via DaemonSet before tests start - Extract image constants to framework package - Use temp overlay dir in deploy targets to avoid mutating tracked kustomization.yaml Fixes: kubernetes-sigs#268 Assisted-by: 🤖 claude-opus-4-6@default
80506b5 to
d983e4d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #271 +/- ##
=======================================
Coverage ? 85.36%
=======================================
Files ? 14
Lines ? 1578
Branches ? 0
=======================================
Hits ? 1347
Misses ? 188
Partials ? 43 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@Makefile`:
- Around line 259-264: Update the deployment macro around _DEPLOY_DIR so setup,
kustomize edit/build, kubectl apply, and cleanup execute within one shell,
registering an EXIT trap to remove the temporary directory on every failure
path. Enable pipefail or render the build output to a temporary manifest, and
explicitly chain commands so kustomize or kubectl failures propagate instead of
being masked.
In `@test/e2e/framework/k8s.go`:
- Around line 201-231: Make cleanup for the prewarm namespace unconditional by
registering it immediately after namespace creation, before any DaemonSet
creation or readiness operations can return. Update the cleanup to delete the
namespace and wait for its ResourceDeleted condition, including the existing
context and timeout behavior, so callers do not proceed while prewarm resources
remain.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: ba7c423e-a76d-42f7-b3d7-e5ac9a7da8f2
📒 Files selected for processing (11)
Makefiletest/e2e/configuration_test.gotest/e2e/failure_scenarios_test.gotest/e2e/framework/builders.gotest/e2e/framework/k8s.gotest/e2e/lifecycle_test.gotest/e2e/main_test.gotest/e2e/manager_test.gotest/e2e/mcp_handshake_test.gotest/e2e/networkpolicy_test.gotest/e2e/reconciliation_test.go
- Makefile: single shell with pipefail, trap, and && chaining - PrewarmImages: defer namespace cleanup, wait for ResourceDeleted Assisted-by: 🤖 claude-opus-4-6@default
- bump golang.org/x/text v0.38.0 -> v0.39.0 - bump golang.org/x/tools v0.46.0 -> v0.47.0 - refactor deploy/deploy-debug with kustomize-set-image macro Extracted from kubernetes-sigs#270 and kubernetes-sigs#271. Assisted-by: 🤖 claude-opus-4-6@default
Assisted-by: 🤖 claude-opus-4-6@default
254434a to
a0a988b
Compare
Add category/speed/scenario labels to all e2e tests for selective filtering. Introduce profile system with priority-based registration for downstream overrides. Labels: category (lifecycle, configuration, resilience, networking, observability), speed (fast, moderate, slow), scenario (crud, spec-update, drift, ownership, storage, port, security, metadata, failure, recovery). Profiles: smoke (lifecycle+configuration/fast), extended (+resilience/+moderate). Speed labels validated against CI execution times from PR kubernetes-sigs#271. Fixes kubernetes-sigs#269 Assisted-by: 🤖 claude-opus-4-6@default
Add category/speed/scenario labels to all e2e tests for selective filtering. Introduce profile system with priority-based registration for downstream overrides. Labels: category (lifecycle, configuration, resilience, networking, observability), speed (fast, moderate, slow), scenario (crud, spec-update, drift, ownership, storage, port, security, metadata, failure, recovery). Profiles: smoke (lifecycle+configuration/fast), extended (+resilience/+moderate). Speed labels validated against CI execution times from PR kubernetes-sigs#271. Assisted-by: 🤖 claude-opus-4-6@default
Changes
t.Parallel()to all 39Test*functions across 7 e2e test filestestenv.Setup()before tests start, preventing thundering-herd registry pulls on cold nodesDefaultMCPServerImage,DefaultMCPServerImageDigest,BusyboxImageconstants to framework packagedeploy/deploy-debugMakefile targets to avoid mutating trackedconfig/manager/kustomization.yamlWhy
Each e2e test creates its own isolated namespace with no shared state. Running them in parallel reduces suite time from ~10min to ~2min.
Verification
config/manager/kustomization.yamlremains unmodified aftermake deployFixes: #268
Assisted-by: 🤖 claude-opus-4-6@default
Summary by CodeRabbit
Deployment
Testing