vpp-manager: update version file even when VPP build is cached#876
Open
vpp-manager: update version file even when VPP build is cached#876
Conversation
When VPP tarball is cached (CI or local), the version file baked into the tarball becomes stale. Overwrite it after extraction to always reflect the current commit. Signed-off-by: Aritra Basu <aritrbas@cisco.com>
sknat
reviewed
Feb 6, 2026
Collaborator
There was a problem hiding this comment.
Agreed, this would work, but I think I'd be more comfortable with
an approach where we:
- remove the
VPP-dataplane versionandImage tagfrom the calicovppversion file - Add the following to our dockerfiles
ARG GIT_COMMIT=unknown
LABEL git-commit=$GIT_COMMIT- run our builds with
docker build --build-arg GIT_COMMIT=$(git log -1 --oneline) - This should be relatively easy as we have
DOCKER_BUILD_ARGSreferenced everywhere
That way the VPP version file will rightfully belong alongside VPP build
What do you think ?
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Cached VPP tarballs include the
calicovppversionfile from the time VPP was built. When CI reuses the tarball for later commits, the VPP image reports a stale dataplane commit while the agent image reports the current commit.RCA
The
version-filetarget (which writes the current git commit tocalicovppversion) is only called as a dependency of thevpptarget. The VPP build system caches build artifacts in a tarball (vpp-${VPP_HASH}.tar) to avoid rebuilding VPP when there are no new changes. When the tarball already exists locally or is fetched from S3 in CI, thevpptarget is never invoked. So theversion-filetarget never runs. and the stalecalicovppversionfile baked in the cached tarball gets copied into the final docker images.Fix
After extracting the cached tarball but before running
docker build, overwrite thecalicovppversionfile with the current git commit information. This ensures the version metadata is always up to date while preserving the VPP build caching optimization.