chore: add VERSION file with base version tag#19421
Conversation
|
Skipping CI for Draft Pull Request. |
cc38a6f to
a9ca808
Compare
a9ca808 to
b8696b1
Compare
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- The VERSION file is added empty in this PR; consider initializing it to the current base version (e.g.,
4.11.x) so that local use and any tooling that reads it before the firststart-releaserun behave as intended. - The workflow only updates VERSION when the release branch does not already exist; if a release branch is re-run or recreated, VERSION may diverge from the intended value—verify this matches the release process expectations or add a guard/update behavior for existing branches.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The VERSION file is added empty in this PR; consider initializing it to the current base version (e.g., `4.11.x`) so that local use and any tooling that reads it before the first `start-release` run behave as intended.
- The workflow only updates VERSION when the release branch does not already exist; if a release branch is re-run or recreated, VERSION may diverge from the intended value—verify this matches the release process expectations or add a guard/update behavior for existing branches.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
b8696b1 to
7470f28
Compare
no, the VERSION file is not empty. This may be a github diff bug/symptom of a new 1 line file being added.
The verification step runs unconditionally (not gated by For patch releases ( |
|
Images are ready for the commit at 1ccb305. To use with deploy scripts, first |
7eecf8f to
33cce69
Compare
Add a VERSION file containing the base version tag (e.g. "4.11.x"), following the same pattern as COLLECTOR_VERSION, SCANNER_VERSION, and FACT_VERSION. The start-release workflow automatically updates VERSION on both the release branch (set to A.B.x) and master (set to A.(B+1).x) when creating a new release. This file enables Go build and test cache optimizations (companion PRs). Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
afff196 to
80518f8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #19421 +/- ##
=======================================
Coverage 49.70% 49.71%
=======================================
Files 2701 2701
Lines 203453 203453
=======================================
+ Hits 101134 101143 +9
+ Misses 94790 94784 -6
+ Partials 7529 7526 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6bf70f1 to
6cde900
Compare
Remove fetch-depth: 0 from build, unit-tests, scanner-build, scanner-db-integration-tests, and style workflows. These jobs use make tag which now falls back to the VERSION file when git describe fails on shallow clones. Kept fetch-depth: 0 for misc-checks (needs git diff --check) and all release/periodic workflows (unchanged). Saves ~12s and ~220MB per job on checkout. Partially generated by AI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6cde900 to
1ccb305
Compare
Description
Add a
VERSIONfile containing the base version tag (4.11.x), following the same pattern asCOLLECTOR_VERSION,SCANNER_VERSION, andFACT_VERSION.Changes
VERSION— new file containing4.11.xmake/env.mk—make tagfalls back to VERSION whengit describefails (enables shallow clones,.git-less builds)start-release.yml— verifies VERSION matches the release being created, updates VERSION on master to the next minor releaseRelease automation
The
start-releaseworkflow:4.11.0requires VERSION to contain4.11.x). Fails early if they don't match.4.12.x) after tagging.The release branch inherits the correct VERSION naturally from the branching point.
Why
This file is the foundation for enabling Go build and test caches across commits. Go's cache keys include
-Xldflags; the per-commitMainVersionfromgit describeinvalidates both the link cache (re-links all binaries) and test cache (re-runs all tests) on every commit.With a VERSION file, companion changes to
go-tool.shcan use the stable base tag for test builds and linking, while release binaries still get the fullgit describeversion.Measured impact (with companion go-tool.sh changes)
Test cache hit rate: 92% (1942/2108 packages). Data from PR #19404 which tested all changes together.
Also enables
make tagfalls back to VERSION whengit describefails)status.sh(read file vsmake tagoverhead)Partially generated by AI.