Repository navigation
Conversation
…alls.io - pkg/util/coverage: binaries built with -cover flush counters to GOCOVERDIR every 10s (WriteCountersDir + ClearCounters) and on shutdown, since operator and metrics-exporter pods are often killed by e2e tests. - GO_COVER=yes (env / docker build-arg) builds with -cover -covermode=atomic; build the cmd package instead of main.go so profiles carry module paths. - E2E_COVERAGE=yes injects a node hostPath + per-pod GOCOVERDIR into the local operator Deployment; tests/e2e/coverage.sh reset|collect fetches and merges it. Host-run binaries get GOCOVERDIR too (no "GOCOVERDIR not set" warning). - dev/run_coverage_report.sh prints unit, e2e and combined totals locally. - run_tests.yaml uploads unit and e2e profiles as parallel coveralls jobs and finishes the build in a separate job; README gets the coveralls badge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… operator-coverage
…er coverage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage Report for CI Build 46856494850Warning No base build found for commit Coverage: 76.294%Details
Uncovered Changes
Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Collect Go code coverage from both the unit tests and the e2e suite and report the merged result to coveralls.io. Modeled on clickhouse-backup's setup:
-coverbinaries,GOCOVERDIR,go tool covdata, and parallel Coveralls jobs.How
GO_COVER=yes(env, or the Docker build-argGO_COVER) builds operator and metrics-exporter with-cover -covermode=atomic. The build scripts now build thecmd/*package instead ofmain.go, so profiles carry module import paths.pkg/util/coverage): Go writes coverage only on a clean exit, and e2e tests kill operator pods all the time. So instrumented binaries withGOCOVERDIRset flush counters every 10s (WriteCountersDir+ClearCounters, so the files add up exactly) and once more on shutdown. Without-coverorGOCOVERDIRthis is a no-op.E2E_COVERAGE=yesinjects a node hostPath with a per-podGOCOVERDIRinto the local-build operator Deployment. Release images installed by the upgrade tests are left alone.tests/e2e/coverage.sh resetprepares the hostPath, andcollectfetches it and merges it into a text profile.GOCOVERDIRtoo. This avoids thewarning: GOCOVERDIR not setline in their output, and their coverage is collected as well.dev/run_coverage_report.shprints the unit, e2e and combined totals.run_tests.yaml):flag-nameunit/e2e).coveragejob merges them withparallel-finished.fail-on-error: false.Local results (orbstack,
POOL_SIZE=16)-race): green.test_030001,test_030011,test_030015,test_030017) are FIPS host-run tests. They execute the extracted linux binaries on the host, which cannot work on macOS (Exec format error, noreadelf), so they are expected to pass on the Linux runner.Needs attention
run_testsnow also runs on push tomaster, so the badge gets the default branch's coverage. With empty inputs a push run behaves like a PR run (all tests, with retries).coverage.shusesbusybox:1.36for its helper pod, which minikube in CI pulls from Docker Hub.🤖 Generated with Claude Code