fix(ci): make race detection opt-out for pre-push hook#9003
Conversation
Add GO_TEST_FLAGS variable (defaults to -race) so callers can disable race detection when speed matters more than coverage. The pre-push hook now passes GO_TEST_FLAGS= to skip -race, which adds 2-10x overhead and causes hook timeouts on CI pods. Direct `make test` and `make test-shard` keep -race by default. CI sharded jobs in GitHub Actions also keep -race unchanged. Tracks: CNTRLPLANE-3761 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Makefile introduces the configurable Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9003 +/- ##
=======================================
Coverage 44.11% 44.11%
=======================================
Files 772 772
Lines 96109 96109
=======================================
Hits 42399 42399
Misses 50767 50767
Partials 2943 2943
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
/area ci-tooling |
|
Scheduling tests matching the |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bryan-cox, enxebre The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/verified by @enxebre |
|
@enxebre: This PR has been marked as verified by DetailsIn response to this:
Instructions 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 openshift-eng/jira-lifecycle-plugin repository. |
|
@enxebre: Overrode contexts on behalf of enxebre: ci/prow/e2e-aks, ci/prow/e2e-aws, ci/prow/e2e-aws-upgrade-hypershift-operator, ci/prow/e2e-azure-v2-self-managed, ci/prow/e2e-kubevirt-aws-ovn-reduced, ci/prow/e2e-v2-aws, ci/prow/e2e-v2-gke DetailsIn response to this:
Instructions 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. |
Test Resultse2e-aws
Failed TestsTotal failed tests: 2
e2e-aks
|
Summary
GO_TEST_FLAGSvariable to the Makefile (defaults to-race) so callers can opt outGO_TEST_FLAGS=to skip race detectionWhy
The race detector adds 2-10x overhead to test execution. On CI agent pods (currently 500m CPU, being bumped in openshift/release#81875),
make test -raceacross 374 packages takes 30+ minutes and hits the 20-minute Bash tool timeout, causing pre-push hooks to fail with exit 143. This blocks all pushes from agent sessions.Direct
make testand CI sharded jobs keep-raceby default — only the pre-push hook opts out for faster feedback.Related
🤖 Generated with Claude Code
Summary by CodeRabbit