Skip to content

Fix nightly build versions using stale ancestor tags#1362

Merged
andrewstucki merged 1 commit intomainfrom
as/nightly-version-fix
Apr 1, 2026
Merged

Fix nightly build versions using stale ancestor tags#1362
andrewstucki merged 1 commit intomainfrom
as/nightly-version-fix

Conversation

@andrewstucki
Copy link
Copy Markdown
Contributor

@andrewstucki andrewstucki commented Mar 31, 2026

Nightly builds on main produce versions like v25.2.1-beta1-152-g39b30399c because git describe picks the nearest ancestor tag, which was our initial beta cut of 25.2.1 which appears to have been tagged directly from main rather than a release branch. Since we now cut release tags (e.g., operator/v25.3.2) on release branches rather than main, the nearest reachable tag on main is super old and we have misleading version strings in nightly artifacts.

This adds support for an optional NEXT_VERSION file per module (e.g., operator/NEXT_VERSION). When the file exists and HEAD is not on an exact tag, ci/scripts/version.sh replaces the stale tag-derived version prefix with the contents of NEXT_VERSION, preserving the commit distance and hash suffix from git describe.

Before: v25.2.1-beta1-152-g39b30399c
After: v26.2.1-152-g39b30399c

Behavior is unchanged when:

  • HEAD is exactly on a tag (release builds)
  • No NEXT_VERSION file exists for the module

@andrewstucki andrewstucki force-pushed the as/nightly-version-fix branch from 82745cf to 6165a13 Compare March 31, 2026 17:57
@andrewstucki andrewstucki reopened this Apr 1, 2026
@andrewstucki andrewstucki merged commit 761b602 into main Apr 1, 2026
11 checks passed
@RafalKorepta RafalKorepta deleted the as/nightly-version-fix branch April 2, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants