chore(dev): split VERSION-dependent packaging targets into Makefile.packaging#25101
chore(dev): split VERSION-dependent packaging targets into Makefile.packaging#25101thomasqueirozb wants to merge 2 commits intomasterfrom
Conversation
There was a problem hiding this comment.
💡 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".
Makefile.packaging
Outdated
| target/%/release/vector.tar.gz: | ||
| $(MAKE) $@ |
There was a problem hiding this comment.
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 👍 / 👎.
pront
left a comment
There was a problem hiding this comment.
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.
Summary
The
VERSIONvariable in the Makefile runscargo vdev versionat parse time via$(shell ...). Because the pattern ruletarget/artifacts/vector-${VERSION}-%.tar.gzreferences${VERSION}in its target, Make must expand it for every invocation — even for targets likecheck-clippyortestthat never need it. This has been causing problems for jobs that should never invoke vdev needing vdev to be installed.This PR moves the
VERSIONdefinition and allpackage-<triple>/ deb / rpm targets intoMakefile.packaging. The main Makefile forwardspackage-%to it. Targets that don't useVERSION(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 triggercargo vdev version.Change Type
Is this a breaking change?
Does this PR include user facing changes?
no-changeloglabel to this PR.References
NA