Skip to content

build: Include component version in image version tag#413

Merged
aanm merged 1 commit intomasterfrom
pr/HadrienPatte/version-tags
Nov 20, 2025
Merged

build: Include component version in image version tag#413
aanm merged 1 commit intomasterfrom
pr/HadrienPatte/version-tags

Conversation

@HadrienPatte
Copy link
Copy Markdown
Member

@HadrienPatte HadrienPatte commented Nov 3, 2025

Some context in cilium/cilium#41862

Today, images build in this repository have tags with the following structure: <timestamp>-<commit-sha> where commit-sha is the short sha of the last commit to affect the given image directory (images/<image>/) and timestamp is the timestamp of that commit.

This versioning scheme allows ordering of tags by build date, which allows renovate to manage version updates for those images. But this can hide potential major breaking changes in those images. For example when LLVM got upgraded from 18.1.8 to 19.1.7, the corresponding image tag changed from 1732033893-de666b6 to 1747754567-1d8e3ec, which hardly relfects the major version bump.

This PR updates the image tagging mechanism to optionnaly incorporate the main image component version in the image version tag. For images for which there is no major relevant component, the current versionning scheme is preserved.

Image Version Source Example Version
bpftool libbpf/bpftool releases 7.4.0
checkpatch Linux kernel version 5.12
iptables iptables package version 1.8.8-1
llvm llvm-project releases 19.1.7
network-perf iperf version 3.19

Images that keep their current versioning pattern: compilers, maker, startup-script, tester

This leads to the following per image tags:

for image in $(ls images); do echo $image; ./scripts/make-image-tag.sh images/$image; echo "\n";done
bpftool
7.4.0-1758805548-08727cd

checkpatch
5.12-1755701578-b97bd7a

compilers
1758805548-08727cd

iptables
1.8.8-1-1758805548-08727cd

llvm
19.1.7-1758805548-08727cd

maker
1761742433-196d922

network-perf
3.19-1758616553-aad452d

startup-script
1755531540-60ee83e

tester
1761742433-196d922

We can inspect the CI jobs to confirm that the new tagging system is now used:
image

@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/version-tags branch 2 times, most recently from 60ccf70 to ab8602a Compare November 3, 2025 16:00
Some context in cilium/cilium#41862

Today, images build in this repository have tags with the following
structure: `<timestamp>-<commit-sha>` where `commit-sha` is the short
sha of the last commit to affect the given image directory
(`images/<image>/`) and `timestamp` is the timestamp of that commit.

This versioning scheme allows ordering of tags by build date, which
allows renovate to manage version updates for those images. But this
can hide potential major breaking changes in those images. For example
when LLVM got upgraded from `18.1.8` to `19.1.7`, the corresponding
image tag changed from `1732033893-de666b6` to `1747754567-1d8e3ec`,
which hardly relfects the major version bump.

This PR updates the image tagging mechanism to optionnaly incorporate
the main image component version in the image version tag. For images
for which there is no major relevant component, the current versionning
scheme is preserved.

  | Image          | Version Source                        | Example Version |
  |----------------|---------------------------------------|-----------------|
  | bpftool        | libbpf/bpftool releases               | 7.4.0           |
  | checkpatch     | Linux kernel version                  | 5.12            |
  | iptables       | iptables package version              | 1.8.8-1         |
  | llvm           | llvm-project releases                 | 19.1.7          |
  | network-perf   | iperf version                         | 3.19            |

Images that keep their current versioning pattern: `compilers`, `maker`, `startup-script`, `tester`

This leads to the following per image tags:
```
for image in $(ls images); do echo $image; ./scripts/make-image-tag.sh images/$image; echo "\n";done
bpftool
7.4.0-1758805548-08727cd-wip

checkpatch
5.12-1755701578-b97bd7a-wip

compilers
1758805548-08727cd

iptables
1.8.8-1-1758805548-08727cd-wip

llvm
19.1.7-1758805548-08727cd-wip

maker
1761742433-196d922

network-perf
3.19-1758616553-aad452d-wip

startup-script
1755531540-60ee83e

tester
1761742433-196d922
```

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/version-tags branch from ab8602a to 4aadee8 Compare November 3, 2025 16:15
@HadrienPatte HadrienPatte marked this pull request as ready for review November 4, 2025 12:31
@HadrienPatte HadrienPatte requested review from a team as code owners November 4, 2025 12:31
Copy link
Copy Markdown

@rgo3 rgo3 left a comment

Choose a reason for hiding this comment

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

Will we need to teach renovate how to deal with this change or does that work automatically? (Not very familiar with the renovate tooling)

@HadrienPatte
Copy link
Copy Markdown
Member Author

Will we need to teach renovate how to deal with this change or does that work automatically?

Yes, we will have to update this accordingly

Copy link
Copy Markdown

@ldelossa ldelossa left a comment

Choose a reason for hiding this comment

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

👍

@julianwiedmann
Copy link
Copy Markdown
Member

@hemanthmalla hoping this is on your radar? :)

@aanm aanm merged commit c1b57b0 into master Nov 20, 2025
11 checks passed
@aanm aanm deleted the pr/HadrienPatte/version-tags branch November 20, 2025 10:44
HadrienPatte added a commit to cilium/cilium that referenced this pull request Dec 2, 2025
This PR updates the custom versioning regex used for the images from the
`image-tools` repository to reflect image versioning scheme changes from
cilium/image-tools#413.

The existing regex is kept for images that still follow the previous
versioning scheme (`image-compilers`, `image-maker`, `startup-script`
and `image-tester`). Other images now have a slighlty more elaborate
regex to account for their "semantic + timestamp + commit sha" new
versioning scheme.

Reference: https://docs.renovatebot.com/modules/versioning/regex/

Note: we're using the `build` capture group for the timestamp element

Note: Renovate requires that all previous capture groups match (even if
with an empty value), this is why the `patch` capture group is
configured to either match the patch version component or match to an
empty value in case the version does not have a patch number (like for
the `checkpatch` and `network-perf` images).

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
github-merge-queue bot pushed a commit to cilium/cilium that referenced this pull request Dec 2, 2025
This PR updates the custom versioning regex used for the images from the
`image-tools` repository to reflect image versioning scheme changes from
cilium/image-tools#413.

The existing regex is kept for images that still follow the previous
versioning scheme (`image-compilers`, `image-maker`, `startup-script`
and `image-tester`). Other images now have a slighlty more elaborate
regex to account for their "semantic + timestamp + commit sha" new
versioning scheme.

Reference: https://docs.renovatebot.com/modules/versioning/regex/

Note: we're using the `build` capture group for the timestamp element

Note: Renovate requires that all previous capture groups match (even if
with an empty value), this is why the `patch` capture group is
configured to either match the patch version component or match to an
empty value in case the version does not have a patch number (like for
the `checkpatch` and `network-perf` images).

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
HadrienPatte added a commit to cilium/cilium that referenced this pull request Dec 2, 2025
Update those images to their latest version following their new
versioning scheme (see cilium/image-tools#413).
Followup updates for those images will be handled by renovate (see #43087).

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
@chancez
Copy link
Copy Markdown

chancez commented Dec 3, 2025

Thanks for doing this!

HadrienPatte added a commit to cilium/cilium that referenced this pull request Dec 10, 2025
Update those images to their latest version following their new
versioning scheme (see cilium/image-tools#413).
Followup updates for those images will be handled by renovate (see #43087).

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
github-merge-queue bot pushed a commit to cilium/cilium that referenced this pull request Dec 10, 2025
Update those images to their latest version following their new
versioning scheme (see cilium/image-tools#413).
Followup updates for those images will be handled by renovate (see #43087).

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
HadrienPatte added a commit that referenced this pull request Dec 10, 2025
This PR enables renovate to bump `libbpf/bpftool` in the bpftools image.
This is now safe to do since #413 as the bpftools image includes that
`libbpf/bpftool` version in its tag so we can control when we want to
get those upgrades in `cilium/cilium`.

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
HadrienPatte added a commit that referenced this pull request Dec 10, 2025
This PR enables renovate to bump [`iperf`](https://github.com/esnet/iperf)
in the `network-perf` image. This is now safe to do since #413 as the
`network-perf` image tags now include its `iperf` version in it so we can
control when we want to get those upgrades in `cilium/cilium`.

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
HadrienPatte added a commit to cilium/cilium that referenced this pull request Dec 12, 2025
Update default `network-perf` image reference to follow its new
versioning scheme (see cilium/image-tools#413).
The contents of the image is not otherwise changed.

See similar PR: #43098

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
HadrienPatte added a commit to cilium/cilium that referenced this pull request Dec 12, 2025
Update default `network-perf` image reference to follow its new
versioning scheme (see cilium/image-tools#413).
The contents of the image is not otherwise changed.

See similar PR: #43098

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
github-merge-queue bot pushed a commit to cilium/cilium that referenced this pull request Dec 17, 2025
Update default `network-perf` image reference to follow its new
versioning scheme (see cilium/image-tools#413).
The contents of the image is not otherwise changed.

See similar PR: #43098

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
tklauser pushed a commit that referenced this pull request Jan 6, 2026
This PR enables renovate to bump `libbpf/bpftool` in the bpftools image.
This is now safe to do since #413 as the bpftools image includes that
`libbpf/bpftool` version in its tag so we can control when we want to
get those upgrades in `cilium/cilium`.

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
tklauser pushed a commit that referenced this pull request Jan 6, 2026
This PR enables renovate to bump [`iperf`](https://github.com/esnet/iperf)
in the `network-perf` image. This is now safe to do since #413 as the
`network-perf` image tags now include its `iperf` version in it so we can
control when we want to get those upgrades in `cilium/cilium`.

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
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.

6 participants