fix(vdev): emit channel-suffixed version from publish-metadata#25395
Merged
fix(vdev): emit channel-suffixed version from publish-metadata#25395
Conversation
thomasqueirozb
approved these changes
May 8, 2026
cargo vdev build publish-metadata was emitting vector_version without the channel suffix because it called cargo::get_version() (which only reads VERSION env / Cargo.toml). The packaging Makefile and cargo vdev version go through app::version(), which appends .custom.<sha> for custom-channel builds. The mismatch broke deb/rpm packaging in custom-channel CI runs: make package-...-all produced archives named vector-<ver>.custom.<sha>-<target>.tar.gz, but package-deb.sh looked for vector-<ver>-<target>.tar.gz using the suffix-stripped VECTOR_VERSION env from publish-metadata. Release-channel runs were unaffected because the suffix is empty there. Switch publish_metadata.rs to app::version() so all consumers see the same canonical version string. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bf6fe75 to
21dff60
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
cargo vdev build publish-metadatawas emittingvector_versionwithout the channel suffix because it calledcargo::get_version()(which only readsVERSIONenv /Cargo.toml). The packaging Makefile andcargo vdev versiongo throughapp::version(), which appends.custom.<sha>for custom-channel builds.The mismatch breaks deb/rpm packaging in custom-channel CI runs:
make package-...-allproduces archives namedvector-<ver>.custom.<sha>-<target>.tar.gz(viacargo vdev version).package-deb.shlooks forvector-<ver>-<target>.tar.gzusing the suffix-strippedVECTOR_VERSIONenv from publish-metadata.Result: tar fails with
Cannot open: No such file or directoryand the deb/rpm packaging step blows up on every custom-channel build that gets that far.Release-channel runs are unaffected because the suffix is empty there.
Vector configuration
NA. Build-tooling change.
How did you test this PR?
Repro: trigger a custom build, watch the packaging step in the previous run produce one filename and the deb/rpm step look for another.
After this fix:
app::version()is the single source of truth, sovector_version(CI output),cargo vdev version, and the archive filename all agree.Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.Build-tooling fix; no user-visible behavior change.
References