Skip to content

perf(ci): disable go buildvcs stamping#19585

Merged
davdhacs merged 4 commits intomasterfrom
davdhacs/disable-buildvcs-tests
Mar 26, 2026
Merged

perf(ci): disable go buildvcs stamping#19585
davdhacs merged 4 commits intomasterfrom
davdhacs/disable-buildvcs-tests

Conversation

@davdhacs
Copy link
Copy Markdown
Contributor

@davdhacs davdhacs commented Mar 24, 2026

Problem:

Go 1.18+ silently enabled -buildvcs=auto, which stamps every binary with VCS metadata (commit, modified status) via debug.ReadBuildInfo(). No code in this repo reads this metadata — version info is injected via -X ldflags instead.

The VCS stamping adds unnecessary overhead: Go must query git state for every build/test invocation, and changes to git state (e.g. untracked files) can invalidate build cache entries.

Fix:

Explicitly set -buildvcs=false in invoke_go() in go-tool.sh, which is the single choke point for all Go build/test/run invocations.

Testing and quality

How I validated my change

  • CI-only change (build flags). No functional difference — VCS metadata was never consumed.
  • Verified locally: builds and tests pass with -buildvcs=false.

Go 1.18+ silently enabled -buildvcs=auto, which stamps every binary
with VCS metadata (commit, modified status) via debug.ReadBuildInfo().
No code in this repo reads this metadata — version info is injected
via -X ldflags instead.

The VCS stamping adds unnecessary overhead: Go must query git state
for every build/test invocation, and changes to git state (e.g.
untracked files) can invalidate build cache entries.

Explicitly set -buildvcs=false for both build and test invocations.

Partially generated by AI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 24, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@davdhacs davdhacs changed the title perf(ci): disable buildvcs for builds and tests perf(ci): disable go buildvcs stamping Mar 24, 2026
@rhacs-bot
Copy link
Copy Markdown
Contributor

Images are ready for the commit at 0e04bb8.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-432-g0e04bb8f6f.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.28%. Comparing base (c14d8db) to head (a1b8043).
⚠️ Report is 14 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #19585   +/-   ##
=======================================
  Coverage   49.28%   49.28%           
=======================================
  Files        2735     2735           
  Lines      206215   206215           
=======================================
+ Hits       101627   101630    +3     
+ Misses      97046    97044    -2     
+ Partials     7542     7541    -1     
Flag Coverage Δ
go-unit-tests 49.28% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@davdhacs davdhacs marked this pull request as ready for review March 25, 2026 04:09
@davdhacs davdhacs requested review from a team, janisz, porridge and tommartensen March 25, 2026 04:09
@porridge porridge added the auto-retest PRs with this label will be automatically retested if prow checks fails label Mar 25, 2026
@rhacs-bot
Copy link
Copy Markdown
Contributor

rhacs-bot commented Mar 25, 2026

Images are ready for the commit at a1b8043.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-434-g08dc5ca442.

@davdhacs davdhacs requested a review from porridge March 25, 2026 17:30
Copy link
Copy Markdown
Contributor

@porridge porridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even better ❤️

@davdhacs davdhacs merged commit 699eeed into master Mar 26, 2026
94 checks passed
@davdhacs davdhacs deleted the davdhacs/disable-buildvcs-tests branch March 26, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted auto-retest PRs with this label will be automatically retested if prow checks fails

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants