Skip to content

Update development Docker image base to Ubuntu Resolute - #624

Open
simon-d-bmw wants to merge 4 commits into
mainfrom
agents/update-docker-image-to-ubuntu-resolute
Open

simon-d-bmw wants to merge 4 commits into
mainfrom
agents/update-docker-image-to-ubuntu-resolute

Conversation

@simon-d-bmw

Copy link
Copy Markdown
Contributor

Summary

Follows up on review feedback from #620 (comment #620 (comment) by @Roland-DEV-BMW / Roland Reichwein) suggesting to move the development Docker base image to a newer Ubuntu release that already ships pre-commit-hooks as an apt package.

  • Update docker/development/Dockerfile base image from ubuntu:noble-20251001 to ubuntu:resolute-20260912 (Ubuntu 26.04 LTS "Resolute Raccoon").
  • Add pre-commit-hooks to the apt install list, alongside the existing pre-commit and gitlint packages.
  • Remove the now-redundant pre-commit-hooks pip dependency from docker/development/files/requirements.txt, and regenerate docker/development/files/requirements.lock via pip-compile (also drops the now-unused transitive dependency ruamel-yaml).

Verification

  • Confirmed ubuntu:resolute-20260912 exists on Docker Hub and provides pre-commit-hooks (6.0.0-1), pre-commit (4.5.1-1), and gitlint (0.19.1-7) via its universe apt repository.
  • Confirmed all other apt packages used by the Dockerfile (gcc-14, g++-14, clang-17, clang-format-17, clang-tidy-17, libc++-17-dev, libc++abi-17-dev, cmake, ninja-build, python3, etc.) are still available on Resolute.
  • Built the full development image locally (docker build -f docker/development/Dockerfile .) and verified:
    • pre-commit, gitlint, gcc-14/g++-14, clang-17, cmake, ninja, the ARM GNU toolchain, LLVM-ET-Arm, treefmt, bazelisk/buildifier, Rust/cbindgen, and the esr-rim gem all install and run correctly.
    • pre-commit run --all-files passes hermetically offline inside the container (check-added-large-files, check-case-conflict, check-merge-conflict, check-yaml, treefmt).
    • gitlint --staged --msg-filename correctly accepts a valid commit message and rejects invalid ones via the commit-msg hook.
  • No documentation references the specific base image tag, so no doc updates were needed.

This PR is opened as a draft for review.

@simon-d-bmw
simon-d-bmw marked this pull request as ready for review September 17, 2026 15:59
Update docker/development/Dockerfile to use ubuntu:resolute-20260912
as the base image, replacing ubuntu:noble-20251001. Resolute (Ubuntu
26.04 LTS) provides the pre-commit-hooks package in its universe
repository, so add it to the apt install list alongside the existing
pre-commit and gitlint packages.

Since pre-commit-hooks is now provided at the system level via apt,
remove the redundant pip dependency from
docker/development/files/requirements.txt and regenerate
requirements.lock (via pip-compile) to drop pre-commit-hooks and its
now-unused transitive dependency ruamel-yaml.

Verified that all other apt packages (gcc-14, g++-14, clang-17,
libc++-17-dev, python3, etc.) and the multi-stage external downloads
(arm-gnu-toolchain, LLVM-ET-Arm, treefmt, bazelisk, buildifier) still
install and run correctly on the new base image. Built the development
image locally and confirmed pre-commit, pre-commit-hooks CLIs
(check-yaml, check-added-large-files, check-case-conflict,
check-merge-conflict), gitlint, and treefmt all run hermetically
offline via 'pre-commit run --all-files', and that gitlint correctly
accepts/rejects commit messages via the commit-msg hook.
Ubuntu Resolute's libc++-17-dev package no longer transitively pulls in
libunwind-17-dev the way Ubuntu Noble's did, so every clang++-17 link of
a libc++ executable failed with:

    ld.bfd: cannot find -lunwind: No such file or directory

Add libunwind-17-dev explicitly to docker/development/Dockerfile's apt
install list to restore the previous behavior.

Also update .ci/code_coverage.py: Resolute ships lcov 2.4-3 (vs. 2.0-4
on Noble), which introduced a new 'inconsistent' error category
(mismatched end line for a function definition) distinct from
'mismatch'. Add 'inconsistent' to all --ignore-errors invocations so
coverage generation matches its previous behavior instead of failing
with:

    lcov: ERROR: (inconsistent) mismatched end line for ...
    (use "lcov --ignore-errors inconsistent ..." to bypass this error)

Verified locally: rebuilt the development image and confirmed
clang++-17 successfully links executables/referenceApp/application
(app.referenceApp.elf) against libc++ with no missing-library errors.
The lcov capture/merge steps already ignore the 'inconsistent' error
category (added in a previous commit), but the genhtml invocation that
consumes the merged coverage.info still had no --ignore-errors flag at
all. With lcov 2.4 (shipped by the Ubuntu Resolute development image),
genhtml now rejects the same 'inconsistent' condition, wrapped as a
'corrupt' trace-file error:

    genhtml: ERROR: (corrupt) unable to read trace file
    'code_coverage/coverage.info': genhtml: ERROR: (inconsistent)
    function 'asyncGetTaskConfig' is hit but no contained lines are hit.
    (use "genhtml --ignore-errors inconsistent ..." to bypass this error)
    (use "genhtml --ignore-errors corrupt ..." to bypass this error)

Add --ignore-errors mismatch,inconsistent,corrupt to the genhtml call,
matching the errors genhtml itself reported and suggested ignoring.
The Ubuntu Resolute image build intermittently failed when the Rustup
installer connection was reset by the network. The previous pipeline
then attempted to execute a missing rustup command and stopped with
exit code 127.

Download the installer to a temporary file with curl retries enabled,
including retries for transient errors, before executing it. This
makes the failure explicit at the download step and tolerates transient
connection resets without changing the installed Rust toolchain.
@simon-d-bmw
simon-d-bmw force-pushed the agents/update-docker-image-to-ubuntu-resolute branch from e75b32f to c59fd54 Compare September 21, 2026 07:22

This branch has not been deployed

No deployments
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.

3 participants