Uh oh!
There was an error while loading. Please reload this page.
ci: merge unit + integration coverage (credit the real-cluster I/O seams) - #273
Conversation
…ount The integration suite already exercises the real-cluster seams that are 0% in the unit suite by design — cluster.NewClientset, push.SPDYExecutor.Exec, submit.PortForwardJobsManager, cluster.DiscoverInClusterClient — but `go test -cover` (unit only) never credits them, so submit/cluster read artificially low. Add three targets using the built-in `go tool covdata` (no external merger): - `cover` — honest own-coverage per package (NO -coverpkg, so no transitive cross-package inflation). - `cover-integration`— the integration suite under -coverpkg, so it credits the internal packages its tests exercise; also the test gate. - `cover-merge` — unions both data dirs, prints per-package + overall. Wire all three into e2e.yml's kind job. Verified locally for the unit half (own-coverage matches baseline: cluster 78.5, submit 80.4, ui 74.7); the integration half runs on kind in CI — this PR carries the `e2e` label to exercise it. make ci green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
LukasWodka
commented
Jul 14, 2026
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 7a18911. Configure here.
LukasWodka
commented
Jul 14, 2026
👋 Heads-up — Code review queue is at 36 / 30 Above the WIP limit. The team convention is to review existing PRs before opening new work. Open PRs currently in Code review (oldest first):
Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.) |
saadqbal
left a comment
There was a problem hiding this comment.
LGTM 👍 Ran make cover + make cover-merge locally — the -test.gocoverdir + go tool covdata merge works and prints a per-package + overall total, and cover-merge gracefully handles whichever data dirs exist. Importantly the integration gate isn't weakened: cover-integration is still go test -tags integration, so it fails the job on any test failure. Merging the suites to credit the 0%-by-design cluster-I/O seams is the right call. Clean.
Uh oh!
There was an error while loading. Please reload this page.
Summary
The integration suite already exercises the real-cluster seams that are 0%% in the unit suite by design —
cluster.NewClientset,push.SPDYExecutor.Exec,submit.PortForwardJobsManager,cluster.DiscoverInClusterClient— butgo test -cover(unit only) never credits them, sosubmit/clusterread artificially low. This merges unit + integration coverage into one honest picture.Three targets, built-in
go tool covdata(no external merger):make cover— honest own-coverage per package (no-coverpkg, so no transitive cross-package inflation).make cover-integration— the integration suite under-coverpkg(credits the internal packages its tests run); also the integration gate.make cover-merge— unions both, prints per-package + overall.Wired into
e2e.yml's kind job.Test plan
make cigreen; unit half verified locally (own-coverage matches baseline: cluster 78.5, submit 80.4, ui 74.7).e2elabel so the kind job runscover-integration+cover-mergeand prints the merged numbers (the integration half can't run without a cluster).🤖 Generated with Claude Code
Note
Low Risk
Changes are limited to CI workflow, Makefile coverage targets, and gitignore/clean; no application or security-sensitive runtime code is modified.
Overview
CI and tooling now produce a merged unit∪integration coverage picture so packages like
submitandclusterget credit for real-cluster paths that unit tests intentionally mock.The kind e2e job replaces a single
make test-integrationstep withmake cover,make cover-integration, andmake cover-merge. Integration still gates the job becausecover-integrationruns the tagged suite and fails on test errors, while also writing coverage with-coverpkg.The Makefile adds those three targets: unit run uses per-package coverage (no
-coverpkg); integration writes to separate dirs under.coverdata; merge usesgo tool covdataplusgo tool cover -funcfor per-package and total output..gitignoreignores.coverdata/andscratch-cov/;make cleanremoves$(COVERDIR).Reviewed by Cursor Bugbot for commit 7a18911. Bugbot is set up for automated code reviews on this repo. Configure here.