Skip to content

images: Update bpftools and llvm images#41339

Merged
tklauser merged 2 commits intomainfrom
pr/HadrienPatte/update-images
Sep 9, 2025
Merged

images: Update bpftools and llvm images#41339
tklauser merged 2 commits intomainfrom
pr/HadrienPatte/update-images

Conversation

@HadrienPatte
Copy link
Copy Markdown
Member

@HadrienPatte HadrienPatte commented Aug 23, 2025

With #41230, renovate will now handle updating those images, but since they haven't been updated in a while, there's some manual adjustments that are required before renovate can handle those.

With cilium/image-tools#339 and cilium/image-tools#343, these two images no longer include their test files. This PR removes the test stage from the runtime image as it was just rerunning those tests and there are no runtime image tests.

This PR also fixes the tests for the builder image. It turns out that those tests have been broken since #32767 because they haven't been running in CI for years. Those tests aren't running since we switched from the legacy docker engine to buildkit, see details:

The legacy Docker Engine builder processes all stages of a Dockerfile leading up to the selected --target. It will build a stage even if the selected target doesn't depend on that stage.

BuildKit only builds the stages that the target stage depends on.

Future followups:

  • Does it make sense to have a test expect a specific version of libprotoc when this dependency is regularly automatically updated by renovate? With the current setup, this test will break everytime renovate updates libprotoc. I'd argue that the version string should be removed from the expected output so we only test that protoc --version runs successfully without expecting a given version string.
  • Consider either:
    • Update the CI to ensure those container structure tests are run on PRs
    • Remove container structure tests as after this PR, only the builder image will have some and all they test is that protoc is installed in the image

Note: the release note for this PR is more focused on the user-visible change related to the update of the bpftools and llvm images.

images: Update `bpftools` and `llvm` images to reduce the size of the `cilium` image by 39MB (`amd64`) / 35MB (`arm64`)

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Aug 23, 2025
@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/update-images branch from 6b0db0d to 2064b68 Compare August 23, 2025 15:17
@auto-committer auto-committer bot temporarily deployed to release-base-images August 23, 2025 15:53 Inactive
@HadrienPatte
Copy link
Copy Markdown
Member Author

/test

@HadrienPatte HadrienPatte marked this pull request as ready for review August 23, 2025 17:30
@HadrienPatte HadrienPatte requested review from a team as code owners August 23, 2025 17:30
@HadrienPatte HadrienPatte added dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. release-note/misc This PR makes changes that have no direct user impact. labels Aug 24, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Aug 24, 2025
@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/update-images branch from c603b9c to 0f3c813 Compare September 3, 2025 09:19
@auto-committer auto-committer bot temporarily deployed to release-base-images September 3, 2025 11:12 Inactive
@HadrienPatte HadrienPatte removed the dont-merge/needs-rebase This PR needs to be rebased because it has merge conflicts. label Sep 3, 2025
@HadrienPatte
Copy link
Copy Markdown
Member Author

/test

@HadrienPatte HadrienPatte added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 3, 2025
@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/update-images branch from 361c952 to 78e043b Compare September 4, 2025 14:08
@HadrienPatte HadrienPatte removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 4, 2025
@auto-committer auto-committer bot temporarily deployed to release-base-images September 4, 2025 15:47 Inactive
@HadrienPatte
Copy link
Copy Markdown
Member Author

/test

@HadrienPatte HadrienPatte added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 4, 2025
With #41230, renovate will now handle updating those images, but since
they haven't been updated in a while, there's some manual adjustments
that are required before renovate can handle those.

With cilium/image-tools#339 and
cilium/image-tools#343, these two images no
longer include their test files. This PR removes the test stage from the
`runtime` image as it was just rerunning those tests and there are no
`runtime` image tests.

This PR also fixes the tests for the `builder` image. It turns out that
those tests have been broken since #32767 because they haven't been
running in CI for years. Those tests aren't running since we switched
from the legacy docker engine to buildkit, see [details](https://docs.docker.com/build/building/multi-stage/#differences-between-legacy-builder-and-buildkit):

> The legacy Docker Engine builder processes all stages of a Dockerfile leading up to the selected --target. It will build a stage even if the selected target doesn't depend on that stage.
>
> BuildKit only builds the stages that the target stage depends on.

Future followups:
* Does it make sense to have a test expect a specific version of `libprotoc` when this dependency is regularly automatically updated by renovate? With the current setup, this test will break everytime renovate updates `libprotoc`. I'd argue that the version string should be removed from the expected output so we only test that `protoc --version` runs successfully without expecting a given version string.
* Consider either:
  * Update the CI to ensure those container structure tests are run on
    PRs
  * Remove container structure tests as after this PR, only the `builder` image will have [some](https://github.com/cilium/cilium/blob/a7de0143835a080750dbbde7285be37ab8599883/images/builder/test/spec.yaml) and all they test is that `protoc` is installed in the image

Note: the release note for this PR is more focused on the user-visible
change related to the update of the `bpftools` and `llvm` images.

```release
images: Update `bpftools` and `llvm` images to reduce the size of the
`cilium` image by 39MB (`amd64`) / 35MB (arm64)
```

Signed-off-by: Hadrien Patte <hadrien.patte@datadoghq.com>
@HadrienPatte HadrienPatte force-pushed the pr/HadrienPatte/update-images branch from d95b043 to 35dc7b7 Compare September 8, 2025 08:37
@HadrienPatte HadrienPatte removed the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 8, 2025
Signed-off-by: Cilium Imagebot <noreply@cilium.io>
@auto-committer auto-committer bot temporarily deployed to release-base-images September 8, 2025 09:17 Inactive
@HadrienPatte
Copy link
Copy Markdown
Member Author

/test

@HadrienPatte HadrienPatte added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Sep 8, 2025
@tklauser tklauser added this pull request to the merge queue Sep 9, 2025
Merged via the queue into main with commit c0e2162 Sep 9, 2025
326 of 329 checks passed
@tklauser tklauser deleted the pr/HadrienPatte/update-images branch September 9, 2025 14:03
@cilium-release-bot cilium-release-bot bot moved this to Released in cilium v1.19.0 Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.

Projects

No open projects
Status: Released

Development

Successfully merging this pull request may close these issues.

5 participants