🌱 Enable parallel e2e test execution for faster local dev feedback#2785
🌱 Enable parallel e2e test execution for faster local dev feedback#2785pedjak wants to merge 1 commit into
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
There was a problem hiding this comment.
Pull request overview
Enables running standard and experimental e2e suites concurrently by generating per-variant Makefile target chains (separate KIND clusters, kubeconfigs, and Prometheus host ports) and wiring the summary reporter to use a per-run PROMETHEUS_URL.
Changes:
- Refactors
test-e2e/test-experimental-e2einto ane2e-targetmacro that emits uniquely named per-variant targets and uses per-cluster kubeconfig files. - Updates the e2e summary generator to read Prometheus address from
PROMETHEUS_URLand skip summary generation when it’s unset. - Separates experimental Prometheus NodePort host mapping (30901) and documents/ignores the new
.kubeconfig/directory.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
test/internal/summary/summary.go |
Switches summary Prometheus endpoint to PROMETHEUS_URL and skips when unset. |
Makefile |
Generates per-variant e2e target chains, isolates kubeconfig, sets PROMETHEUS_URL, and adds parallel-run guidance. |
kind-config/kind-config-2node.yaml |
Changes experimental Prometheus hostPort mapping to 30901. |
AGENTS.md |
Documents make -j2 test-e2e test-experimental-e2e parallel workflow and Linux inotify prerequisite. |
.gitignore |
Ignores .kubeconfig/ per-cluster kubeconfig outputs. |
Comments suppressed due to low confidence (1)
test/internal/summary/summary.go:187
defaultPromUrlis read from the environment at package init time, so settingPROMETHEUS_URLlater (e.g., inTestMainbefore callingPrintSummary, or from another caller) will not be observed and summary generation will be skipped unexpectedly. Read the env var insidePrintSummaryinstead.
if defaultPromUrl == "" {
fmt.Printf("PROMETHEUS_URL not set; skipping summary generation")
return nil
}
client, err := api.NewClient(api.Config{
Address: defaultPromUrl,
})
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2785 +/- ##
==========================================
+ Coverage 70.40% 70.42% +0.02%
==========================================
Files 143 143
Lines 10617 10625 +8
==========================================
+ Hits 7475 7483 +8
Misses 2580 2580
Partials 562 562
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| Both suites can run simultaneously on separate KIND clusters: | ||
|
|
||
| ```bash | ||
| make -j2 test-e2e test-experimental-e2e |
There was a problem hiding this comment.
This might be a bit redundant, as test-experimental-e2e should also be running the same tests as test-e2e (basically running the test-e2e with new features)
There was a problem hiding this comment.
Ah... but they're run on separate clusters, and it's not combined?
There was a problem hiding this comment.
Ah... but they're run on separate clusters, and it's not combined?
They are on different clusters with differently deployed OLM (different feature gates). There fwe need two clusters.
| .PHONY: kind-load-% | ||
| kind-load-%: kind-cluster-% | ||
| $(KIND) load docker-image $(OPCON_IMG) --name operator-controller-$* | ||
| $(KIND) load docker-image $(CATD_IMG) --name operator-controller-$* |
There was a problem hiding this comment.
Could the existing kind-load be updated to reference kind-load-%, so we can eliminate drift?
Same with other targets.
There was a problem hiding this comment.
Could the existing
kind-loadbe updated to referencekind-load-%, so we can eliminate drift? Same with other targets.
They could and should, but I would leave that for follow up PR, to avoid widening the scope.
rashmigottipati
left a comment
There was a problem hiding this comment.
Changes look good to me overall. Will add the labels once the other review has been addressed
Run standard and experimental e2e tests simultaneously on separate KIND clusters via `make -j2 test-e2e test-experimental-e2e`, cutting local e2e wall-clock time by ~37% (25m → 16m). This is especially valuable when working with AI coding agents that benefit from faster feedback loops. Key changes: - Use Make pattern rules (kind-cluster-%, kind-load-%, etc.) with the stem identifying the variant. Cluster names, kubeconfig paths, and coverage names are derived by convention from the stem. Only variant-specific deviations need explicit overrides. - Remove .NOTPARALLEL directive (no longer needed with unique targets) - Isolate per-cluster kubeconfig files under .kubeconfig/ - Use separate KIND cluster names and prometheus host ports (30900 vs 30901) to avoid resource conflicts - Make PROMETHEUS_URL configurable via env var in summary reporter; skip summary generation when unset - Conditionally serialize kind-deploy when both targets run together to avoid races on shared files Linux prerequisite for parallel runs: sudo sysctl fs.inotify.max_user_instances=512 Co-Authored-By: Claude <noreply@anthropic.com>
ptal |
Description
Enable running standard and experimental e2e tests simultaneously on separate KIND clusters via
make -j2 test-e2e test-experimental-e2e, cutting local e2e wall-clock time by ~40%. This is especially valuable when working with AI coding agents that benefit from faster feedback loops.Benchmark
make test-e2e && make test-experimental-e2e)make -j2 test-e2e test-experimental-e2e)Measured on a dev workstation (Fedora, 16 cores, 64GB RAM).
Linux prerequisite
Running multiple KIND clusters simultaneously requires sufficient inotify instances:
Reviewer Checklist