Skip to content

Upgrade to LLVM 18.1.8 #32801

@gentoo-root

Description

@gentoo-root
  • Build new LLVM images.
  • Update LLVM version in https://github.com/cilium/cilium (example).
    • Update CILIUM_LLVM_IMAGE in images/builder/Dockerfile and images/runtime/Dockerfile.
    • Update LLVM versions in GitHub workflows (to be deprecated at some point).
  • Follow the instruction to update Docker images.
    • git switch -c "pr/$USER/upgrade-llvm-X-Y-Z"
    • git commit -asm 'images: Update LLVM to X.Y.Z'
    • git commit --amen — add Fixes: #NNNNN with this issue number.
    • git push -u origin "pr/$USER/upgrade-llvm-X-Y-Z" and open a pull request — the pull request should not be created from a fork. Label it with release-note/misc.
    • Have a member of team/build approve the build here.
    • The build should push a commit named images: update cilium-{runtime,builder} to your branch automatically (example).
      • Base Image Lint will fail before that commit is pushed. It's expected.
    • Have a member of team/build approve the build here again.
    • Post /test to the pull request.
  • Analyze the CI results.
    • If there are failures due to the LLVM upgrade, such as compilation errors, verifier errors, or other errors that could be caused by the upgrade of LLVM, fix those.
      • The CI checks that all commits are buildable. It means you can't have fixups after the upgrade commit, and it also means that the fixups that come before the upgrade commit have to work with the previous LLVM.
      • Therefore, it's suggested to push the fixes via a separate pull request that will be merged before the upgrade. It also ensures that they run through the CI both on the old and the new LLVM versions.
      • If it's impossible to create a fix that works for both LLVM versions, show your ingenuity, for example, use __clang_major__, __clang_minor__ and __clang_patchlevel__ macros, although it's very undesirable and pretty unlikely to be needed.
    • Repeat the Docker images update if need be.
      • If fixing the new errors takes some time, it's likely that new cilium-builder and cilium-runtime images will have to be generated due to conflicts with other components.
  • Make sure that CI passes, get the reviews and merge the pull request. That's it for the actual upgrade.
  • Update the system requirements in the docs.

Metadata

Metadata

Assignees

Labels

area/datapathImpacts bpf/ or low-level forwarding details, including map management and monitor messages.area/llvmRequires upstream work in LLVM.kind/enhancementThis would improve or streamline existing functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions