Skip to content

chore(dev): split VERSION-dependent packaging targets into Makefile.packaging#25101

Open
thomasqueirozb wants to merge 2 commits intomasterfrom
chore/split-makefile-packaging
Open

chore(dev): split VERSION-dependent packaging targets into Makefile.packaging#25101
thomasqueirozb wants to merge 2 commits intomasterfrom
chore/split-makefile-packaging

Conversation

@thomasqueirozb
Copy link
Copy Markdown
Contributor

@thomasqueirozb thomasqueirozb commented Apr 1, 2026

Summary

The VERSION variable in the Makefile runs cargo vdev version at parse time via $(shell ...). Because the pattern rule target/artifacts/vector-${VERSION}-%.tar.gz references ${VERSION} in its target, Make must expand it for every invocation — even for targets like check-clippy or test that never need it. This has been causing problems for jobs that should never invoke vdev needing vdev to be installed.

This PR moves the VERSION definition and all package-<triple> / deb / rpm targets into Makefile.packaging. The main Makefile forwards package-% to it. Targets that don't use VERSION (release, sha256sum, version, ci-generate-publish-metadata, etc.) stay in the main Makefile.

Vector configuration

NA

How did you test this PR?

Verified that make help, make check-clippy, and other non-packaging targets no longer trigger cargo vdev version.

Change Type

  • Bug fix
  • New feature
  • Dependencies
  • Non-functional (chore, refactoring, docs)
  • Performance

Is this a breaking change?

  • Yes
  • No

Does this PR include user facing changes?

  • Yes. Please add a changelog fragment based on our guidelines.
  • No. A maintainer will apply the no-changelog label to this PR.

References

NA

@thomasqueirozb thomasqueirozb marked this pull request as ready for review April 1, 2026 21:36
@thomasqueirozb thomasqueirozb requested a review from a team as a code owner April 1, 2026 21:36
@thomasqueirozb thomasqueirozb changed the title chore(build): split VERSION-dependent packaging targets into Makefile.packaging chore(dev): split VERSION-dependent packaging targets into Makefile.packaging Apr 1, 2026
@thomasqueirozb thomasqueirozb added the no-changelog Changes in this PR do not need user-facing explanations in the release changelog label Apr 1, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 345abefce2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +19 to +20
target/%/release/vector.tar.gz:
$(MAKE) $@
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Prevent empty TRIPLE leaking into delegated package builds

This delegated sub-make call causes package-* targets to run in a separate make process while inheriting exported vars from Makefile.packaging; in this commit that includes an empty TRIPLE, so the child Makefile keeps TRIPLE= (because its rules use TRIPLE ?=) and emits make -k cross-image- recursively instead of cross-image-<triple>. I reproduced this on this commit with make -n package-x86_64-unknown-linux-gnu, which loops on cross-image- and never resolves a concrete target, so release packaging paths are broken.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member

@pront pront left a comment

Choose a reason for hiding this comment

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

Good improvement!

Some general thoughts: in this repo we used both make and vdev as command hubs. Need some investigation to determine what's the desired long term status but at the very least we should define some clear lines about what belong in Makefile vs what belongs in vdev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog Changes in this PR do not need user-facing explanations in the release changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants