Skip to content

build: move dataplane commit metadata to runtime image labels#876

Open
aritrbas wants to merge 1 commit intomasterfrom
abasu-fix-version
Open

build: move dataplane commit metadata to runtime image labels#876
aritrbas wants to merge 1 commit intomasterfrom
abasu-fix-version

Conversation

@aritrbas
Copy link
Collaborator

@aritrbas aritrbas commented Feb 5, 2026

RCA:

We were writing dataplane commit and image tag into calicovppversion, but that file is part of VPP artifacts and can come from a reused vpp-${VPP_HASH}.tar cache (either local or S3 in CI). When the cache is reused, those fields become stale.

Fix:

  • Removed dataplane commit and image tag writes from calicovppversion generation.
  • Kept calicovppversion sourced from VPP-generated metadata (generate.log), so ownership stays with VPP build artifacts.
  • Added --build-arg GIT_COMMIT="$(git log -1 --oneline)" via shared DOCKER_BUILD_ARGS.
  • Added ARG GIT_COMMIT=unknown and LABEL git-commit=$GIT_COMMIT to runtime image Dockerfiles for the following components: agent, calicovppctl, multinet-monitor, vpp, vpp-debug, vclsidecar, vclsidecar-debug, init-eks
  • This way the VPP artifact caching behavior is preserved while the runtime-image commit tracking is now accurate through OCI labels, independent of cached tarball contents.

@aritrbas aritrbas requested a review from sknat February 5, 2026 22:59
@aritrbas aritrbas self-assigned this Feb 5, 2026
Copy link
Collaborator

@sknat sknat left a comment

Choose a reason for hiding this comment

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

Agreed, this would work, but I think I'd be more comfortable with
an approach where we:

  • remove the VPP-dataplane version and Image tag from 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_ARGS referenced everywhere

That way the VPP version file will rightfully belong alongside VPP build

What do you think ?

Do not write image tag and dataplane git commit into calicovppversion.
Keep calicovppversion owned by VPP build metadata (generate.log) and
publish dataplane commit via docker build arg + git-commit label.

- Add shared GIT_COMMIT build arg in DOCKER_BUILD_ARGS
- Add ARG/LABEL git-commit to runtime Dockerfiles:
  agent, calicovppctl, multinet-monitor, vpp, vpp-debug, vclsidecar,
  vclsidecar-debug, init-eks
- Remove image tag/dataplane commit lines from version-file generation
  in agent/multinet-monitor/vpp-manager make paths

Signed-off-by: Aritra Basu <aritrbas@cisco.com>
@aritrbas aritrbas changed the title vpp-manager: update version file even when VPP build is cached build: move dataplane commit metadata to runtime image labels Feb 6, 2026
@aritrbas
Copy link
Collaborator Author

aritrbas commented Feb 6, 2026

What do you think ?

Agreed, fixed in the latest patch. calicovppversion is still sourced from VPP-generated metadata (generate.log), so ownership stays with VPP build artifacts. The runtime-image commit tracking is now accurate through OCI labels, independent of cached tarball contents.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants