Repository navigation
fix: upgrade Docker image from Ubuntu 22.04 to 24.04 - #9002
timosachsenberg wants to merge 2 commits into
Conversation
📝 WalkthroughWalkthroughDockerfile stages updated from Ubuntu 22.04 to 24.04; Boost dev packages unpinned in the base stage and upgraded in the library stage; Apache Arrow APT installer switched from Jammy to Noble; runtime Arrow/Parquet packages and wget/apt cleanup were added. Changes
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
dockerfiles/Dockerfile (1)
14-14: Pinubuntu:24.04by digest for build reproducibility.The
24.04tag is mutable, so rebuilding this image later could pull a different rootfs snapshot. For a PR focused on upgrading the container toolchain, pinning bothFROMlines to their manifest-list digest ensures consistent builds across time.Resolve the current digest (e.g., via
docker inspect --format='{{index .RepoDigests 0}}' ubuntu:[email protected]on a system with Docker access or query the Docker Registry API) and update:-FROM ubuntu:24.04 AS base +FROM ubuntu:24.04@sha256:<resolved-digest> AS baseAlso applies to: 159-159
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dockerfiles/Dockerfile` at line 14, Pin the base image by replacing the mutable tag "FROM ubuntu:24.04 AS base" with its immutable manifest digest (e.g., "FROM ubuntu@sha256:... AS base"); resolve the correct digest via docker inspect or the Registry API and update that FROM line and the other identical FROM at the specified location (the second "FROM ubuntu:24.04" reference) so both FROM instructions use the same ubuntu@sha256:... digest for reproducible builds.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@dockerfiles/Dockerfile`:
- Around line 56-59: Replace the floating wget/install steps for
apache-arrow-apt-source-latest-noble.deb with a checksum-verified flow: obtain
the package SHA256 locally, add that constant to the Dockerfile, download the
file with the existing wget command, verify the file against the SHA256 (failing
the build on mismatch), and only then install the package (using dpkg -i or
apt-get install ./apache-arrow-apt-source-latest-noble.deb) and remove the file;
update the lines referencing apache-arrow-apt-source-latest-noble.deb to include
the verification step so builds are reproducible and fail fast on checksum
mismatch.
---
Nitpick comments:
In `@dockerfiles/Dockerfile`:
- Line 14: Pin the base image by replacing the mutable tag "FROM ubuntu:24.04 AS
base" with its immutable manifest digest (e.g., "FROM ubuntu@sha256:... AS
base"); resolve the correct digest via docker inspect or the Registry API and
update that FROM line and the other identical FROM at the specified location
(the second "FROM ubuntu:24.04" reference) so both FROM instructions use the
same ubuntu@sha256:... digest for reproducible builds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c6c1a7eb-9877-4415-a42f-040286eb98f2
📒 Files selected for processing (1)
dockerfiles/Dockerfile
| && wget https://repo1.maven.org/maven2/org/apache/arrow/ubuntu/apache-arrow-apt-source-latest-noble.deb \ | ||
| && apt-get install -y --no-install-recommends ./apache-arrow-apt-source-latest-noble.deb \ | ||
| && apt-get update && apt-get install -y --no-install-recommends --no-install-suggests libparquet-dev \ | ||
| && rm apache-arrow-apt-source-latest-jammy.deb | ||
| && rm apache-arrow-apt-source-latest-noble.deb |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python <<'PY'
import hashlib
import urllib.request
url = "https://repo1.maven.org/maven2/org/apache/arrow/ubuntu/apache-arrow-apt-source-latest-noble.deb"
digest = hashlib.sha256()
with urllib.request.urlopen(url) as resp:
while True:
chunk = resp.read(1024 * 1024)
if not chunk:
break
digest.update(chunk)
print(digest.hexdigest())
PYRepository: OpenMS/OpenMS
Length of output: 2638
🏁 Script executed:
# Locate and examine the Dockerfile
find . -name "Dockerfile" -type f | head -20Repository: OpenMS/OpenMS
Length of output: 108
🏁 Script executed:
# Read the Dockerfile to verify the code snippet and context
cat -n dockerfiles/Dockerfile | sed -n '50,65p'Repository: OpenMS/OpenMS
Length of output: 846
🏁 Script executed:
# Check if there are any references to Arrow packages or checksums elsewhere in the codebase
rg -i "apache-arrow|arrow-apt|sha256" --type dockerfile --type bash --type shRepository: OpenMS/OpenMS
Length of output: 91
🏁 Script executed:
# Look for any documentation or comments about Arrow package versioning
rg -i "noble|ubuntu|apt-source" dockerfiles/ -A 2 -B 2Repository: OpenMS/OpenMS
Length of output: 1484
Pin the Arrow APT source package with a SHA256 checksum.
The floating apache-arrow-apt-source-latest-noble.deb filename can change without warning. Capture the current package's SHA256 hash and add verification to the Dockerfile to ensure reproducible builds:
+ARG ARROW_APT_SOURCE_SHA256=<resolved-sha256>
...
&& wget https://repo1.maven.org/maven2/org/apache/arrow/ubuntu/apache-arrow-apt-source-latest-noble.deb \
+ && echo "${ARROW_APT_SOURCE_SHA256} apache-arrow-apt-source-latest-noble.deb" | sha256sum -c - \
&& apt-get install -y --no-install-recommends ./apache-arrow-apt-source-latest-noble.deb \To obtain the checksum, download and hash the artifact locally.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@dockerfiles/Dockerfile` around lines 56 - 59, Replace the floating
wget/install steps for apache-arrow-apt-source-latest-noble.deb with a
checksum-verified flow: obtain the package SHA256 locally, add that constant to
the Dockerfile, download the file with the existing wget command, verify the
file against the SHA256 (failing the build on mismatch), and only then install
the package (using dpkg -i or apt-get install
./apache-arrow-apt-source-latest-noble.deb) and remove the file; update the
lines referencing apache-arrow-apt-source-latest-noble.deb to include the
verification step so builds are reproducible and fail fast on checksum mismatch.
Ubuntu 22.04 ships Boost 1.74 which does not support the BOOST_PROCESS_USE_STD_FS macro, causing unresolved boost::filesystem symbols when linking TOPP tools. Ubuntu 24.04 ships Boost 1.83 where the macro works correctly and boost::process uses std::filesystem. - Base and runtime images: ubuntu:22.04 → ubuntu:24.04 - Boost packages: version-pinned 1.74 → unversioned (1.83) - Arrow APT source: jammy → noble - Runtime Boost libs: -dev → versioned runtime (1.83.0) Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
cdd5b25 to
0060baa
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
dockerfiles/Dockerfile (1)
56-58:⚠️ Potential issue | 🟠 MajorDon’t mix a floating Arrow repo with fixed
2300runtime packages.
baseandlibraryeach resolveapache-arrow-apt-source-latest-noble.debon their own, butlibraryis pinned tolibarrow2300/libparquet2300. Sincecmake/cmake_findExternalLibs.cmake:190-193only requires Arrow/Parquet 23+, the build stage can drift to a newer Arrow release while the runtime stage stays on2300, or the runtime install can stop resolving entirely when the repo advances. Pin one Arrow release selection and reuse it in both stages.For Apache Arrow's Ubuntu Noble packages, does `apache-arrow-apt-source-latest-noble.deb` track the latest Arrow release, and what runtime package names are published for Arrow 23 versus newer releases (for example `libarrow2300` / `libparquet2300`)?Also applies to: 181-185
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dockerfiles/Dockerfile` around lines 56 - 58, The Dockerfile mixes a floating Arrow apt source (apache-arrow-apt-source-latest-noble.deb) with runtime packages pinned to libarrow2300/libparquet2300, which can cause mismatches; fix it by selecting and pinning a single Arrow release and reusing that pin in both build and runtime stages (e.g., replace the "apache-arrow-apt-source-latest-noble.deb" fetch with a specific release artifact or introduce an ARG like ARROW_VERSION and use it to construct the apt-source filename and the exact runtime package names), ensure both the build stage that downloads the apt source and the runtime stage that installs libparquet-dev/libarrow2300 reference the same ARROW_VERSION identifier so the repository and package names remain consistent across stages.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@dockerfiles/Dockerfile`:
- Around line 181-187: After installing libarrow2300 and libparquet2300 in the
library stage, remove the Apache Arrow APT source so downstream stages don't
depend on the external repo: purge the package
apache-arrow-apt-source-latest-noble (or delete its file in
/etc/apt/sources.list.d/) immediately after the apt-get install of libarrow2300
and libparquet2300 and before running apt-get purge wget/apt-get autoremove;
reference the apache-arrow-apt-source-latest-noble .deb and the installed
packages libarrow2300 and libparquet2300 when making this change so the
tools-thirdparty and test stages no longer inherit the Arrow apt source.
---
Duplicate comments:
In `@dockerfiles/Dockerfile`:
- Around line 56-58: The Dockerfile mixes a floating Arrow apt source
(apache-arrow-apt-source-latest-noble.deb) with runtime packages pinned to
libarrow2300/libparquet2300, which can cause mismatches; fix it by selecting and
pinning a single Arrow release and reusing that pin in both build and runtime
stages (e.g., replace the "apache-arrow-apt-source-latest-noble.deb" fetch with
a specific release artifact or introduce an ARG like ARROW_VERSION and use it to
construct the apt-source filename and the exact runtime package names), ensure
both the build stage that downloads the apt source and the runtime stage that
installs libparquet-dev/libarrow2300 reference the same ARROW_VERSION identifier
so the repository and package names remain consistent across stages.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ef7e8784-dbf0-411e-aa3e-bb350180cded
📒 Files selected for processing (1)
dockerfiles/Dockerfile
| && wget https://repo1.maven.org/maven2/org/apache/arrow/ubuntu/apache-arrow-apt-source-latest-noble.deb \ | ||
| && apt-get install -y --no-install-recommends ./apache-arrow-apt-source-latest-noble.deb \ | ||
| && apt-get update && apt-get install -y --no-install-recommends --no-install-suggests \ | ||
| libarrow2300 \ | ||
| libparquet2300 \ | ||
| && rm apache-arrow-apt-source-latest-noble.deb \ | ||
| && apt-get purge -y wget && apt-get autoremove -y \ |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Verify that `library` adds the Arrow repo and descendant stages still run `apt-get update`.
rg -n -C2 'FROM ubuntu:24\.04 AS library|apache-arrow-apt-source-latest-noble\.deb|FROM library AS tools|FROM tools AS tools-thirdparty|FROM tools-thirdparty AS test|apt-get update' dockerfiles/DockerfileRepository: OpenMS/OpenMS
Length of output: 2392
Remove the Arrow APT source package after installing the shared libraries.
The library stage installs the Apache Arrow APT source via the .deb package, but only removes the .deb file at line 186. The APT source configuration (typically in /etc/apt/sources.list.d/) persists into descendant stages (tools-thirdparty and test), which run apt-get update at lines 211 and 244. Purge the source package with apt-get purge -y apache-arrow-apt-source-latest-noble or manually remove its configuration file once libarrow2300 and libparquet2300 are installed, to avoid making unrelated downstream package updates dependent on an external repository.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@dockerfiles/Dockerfile` around lines 181 - 187, After installing libarrow2300
and libparquet2300 in the library stage, remove the Apache Arrow APT source so
downstream stages don't depend on the external repo: purge the package
apache-arrow-apt-source-latest-noble (or delete its file in
/etc/apt/sources.list.d/) immediately after the apt-get install of libarrow2300
and libparquet2300 and before running apt-get purge wget/apt-get autoremove;
reference the apache-arrow-apt-source-latest-noble .deb and the installed
packages libarrow2300 and libparquet2300 when making this change so the
tools-thirdparty and test stages no longer inherit the Arrow apt source.
The Ubuntu 24.04 upgrade (0060baa) added Arrow/Parquet runtime library download to the library stage but omitted ca-certificates, causing wget to fail TLS verification on repo1.maven.org. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
dockerfiles/Dockerfile (2)
56-59:⚠️ Potential issue | 🟠 MajorChecksum-verify the Arrow APT source in both stages.
Both installs still fetch the floating
apache-arrow-apt-source-latest-noble.deband execute it immediately. That makes the image non-reproducible and trusts an unverified external package.Apply the same checksum gate in
baseandlibrary.Representative hardening
FROM ubuntu:24.04 AS base +ARG ARROW_APT_SOURCE_SHA256=<resolved-sha256> ... && wget https://repo1.maven.org/maven2/org/apache/arrow/ubuntu/apache-arrow-apt-source-latest-noble.deb \ + && echo "${ARROW_APT_SOURCE_SHA256} apache-arrow-apt-source-latest-noble.deb" | sha256sum -c - \ && apt-get install -y --no-install-recommends ./apache-arrow-apt-source-latest-noble.deb \#!/bin/bash set -euo pipefail python <<'PY' import hashlib import urllib.request url = "https://repo1.maven.org/maven2/org/apache/arrow/ubuntu/apache-arrow-apt-source-latest-noble.deb" digest = hashlib.sha256() with urllib.request.urlopen(url) as resp: while True: chunk = resp.read(1024 * 1024) if not chunk: break digest.update(chunk) print(digest.hexdigest()) PYAlso applies to: 182-183
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dockerfiles/Dockerfile` around lines 56 - 59, Replace the blind download+install of "https://repo1.maven.org/maven2/org/apache/arrow/ubuntu/apache-arrow-apt-source-latest-noble.deb" in both stages ("base" and "library") with a checksum-gated flow: add a hardcoded expected SHA256 (computed offline) as a variable, download the .deb to a temporary file, compute its SHA256 (e.g., with sha256sum or python -c) and compare to the expected value, and only then run apt-get install -y --no-install-recommends ./apache-arrow-apt-source-latest-noble.deb; fail the build immediately if the checksum mismatches and still remove the temporary file after install. Ensure you apply this exact change around the wget + apt-get install ./apache-arrow-apt-source-latest-noble.deb sequence in both stages.
182-188:⚠️ Potential issue | 🟠 MajorPurge the Arrow APT source after installing the runtime libraries.
Removing only the downloaded
.debleavesapache-arrow-apt-source-latest-nobleinstalled, so descendant runtime stages still depend on that external repo for laterapt-get updatecalls.Suggested cleanup
&& apt-get update && apt-get install -y --no-install-recommends --no-install-suggests \ libarrow2300 \ libparquet2300 \ + && apt-get purge -y apache-arrow-apt-source-latest-noble \ && rm apache-arrow-apt-source-latest-noble.deb \ && apt-get purge -y wget && apt-get autoremove -y \#!/bin/bash set -euo pipefail rg -n -C2 'apache-arrow-apt-source-latest-noble|FROM tools AS tools-thirdparty|FROM tools-thirdparty AS test|apt-get update' dockerfiles/Dockerfile🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@dockerfiles/Dockerfile` around lines 182 - 188, The Dockerfile currently removes only the downloaded .deb but leaves the installed package apache-arrow-apt-source-latest-noble, so purge that installed APT source after installing the runtime libs to avoid leaving an external repo for descendant stages; modify the sequence around the wget/apt-get/install/rm steps to run a removal/purge of the apache-arrow-apt-source-latest-noble package (and follow with autoremove/clean) after rm apache-arrow-apt-source-latest-noble.deb and before final cleanup of wget, so the package name apache-arrow-apt-source-latest-noble is explicitly removed from the image.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@dockerfiles/Dockerfile`:
- Line 58: The build stage installs an unversioned libparquet-dev while the
runtime stage pins libarrow2300 and libparquet2300, which can cause ABI
mismatches; change the Dockerfile to pin the Arrow package version consistently
across stages by introducing a build ARG (e.g., ARROW_VERSION) and use it when
installing libparquet-dev in the build stage and when installing libarrow2300
and libparquet2300 in the runtime stage (or alternatively capture the exact
package version installed during build and propagate it to the runtime installs)
so libparquet-dev, libarrow2300 and libparquet2300 come from the same Arrow
version.
---
Duplicate comments:
In `@dockerfiles/Dockerfile`:
- Around line 56-59: Replace the blind download+install of
"https://repo1.maven.org/maven2/org/apache/arrow/ubuntu/apache-arrow-apt-source-latest-noble.deb"
in both stages ("base" and "library") with a checksum-gated flow: add a
hardcoded expected SHA256 (computed offline) as a variable, download the .deb to
a temporary file, compute its SHA256 (e.g., with sha256sum or python -c) and
compare to the expected value, and only then run apt-get install -y
--no-install-recommends ./apache-arrow-apt-source-latest-noble.deb; fail the
build immediately if the checksum mismatches and still remove the temporary file
after install. Ensure you apply this exact change around the wget + apt-get
install ./apache-arrow-apt-source-latest-noble.deb sequence in both stages.
- Around line 182-188: The Dockerfile currently removes only the downloaded .deb
but leaves the installed package apache-arrow-apt-source-latest-noble, so purge
that installed APT source after installing the runtime libs to avoid leaving an
external repo for descendant stages; modify the sequence around the
wget/apt-get/install/rm steps to run a removal/purge of the
apache-arrow-apt-source-latest-noble package (and follow with autoremove/clean)
after rm apache-arrow-apt-source-latest-noble.deb and before final cleanup of
wget, so the package name apache-arrow-apt-source-latest-noble is explicitly
removed from the image.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 17a4c766-f6d8-4a42-981c-90225a30765b
📒 Files selected for processing (1)
dockerfiles/Dockerfile
| && apt-get install -y --no-install-recommends ./apache-arrow-apt-source-latest-jammy.deb \ | ||
| && wget https://repo1.maven.org/maven2/org/apache/arrow/ubuntu/apache-arrow-apt-source-latest-noble.deb \ | ||
| && apt-get install -y --no-install-recommends ./apache-arrow-apt-source-latest-noble.deb \ | ||
| && apt-get update && apt-get install -y --no-install-recommends --no-install-suggests libparquet-dev \ |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -C2 'libparquet-dev|libarrow2300|libparquet2300' dockerfiles/DockerfileRepository: OpenMS/OpenMS
Length of output: 782
Keep Arrow build-time and runtime packages on the same version selector.
The build stage installs unversioned libparquet-dev (line 58), which pulls the latest available version from the Apache Arrow apt-source at build time. The runtime stage pins specific versions: libarrow2300 and libparquet2300 (lines 184-186). If the Arrow apt-source updates, the build stage could compile against different library headers than the runtime uses, causing potential ABI mismatches.
Pin both stages to the same Arrow version, or derive the runtime package versions from the exact Arrow version installed during the build stage.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@dockerfiles/Dockerfile` at line 58, The build stage installs an unversioned
libparquet-dev while the runtime stage pins libarrow2300 and libparquet2300,
which can cause ABI mismatches; change the Dockerfile to pin the Arrow package
version consistently across stages by introducing a build ARG (e.g.,
ARROW_VERSION) and use it when installing libparquet-dev in the build stage and
when installing libarrow2300 and libparquet2300 in the runtime stage (or
alternatively capture the exact package version installed during build and
propagate it to the runtime installs) so libparquet-dev, libarrow2300 and
libparquet2300 come from the same Arrow version.
Ubuntu 22.04 ships Boost 1.74 which does not support the BOOST_PROCESS_USE_STD_FS macro, causing unresolved boost::filesystem symbols when linking TOPP tools. Ubuntu 24.04 ships Boost 1.83 where the macro works correctly.
Description
Checklist
How can I get additional information on failed tests during CI
Click to expand
If your PR is failing you can check outIf you click in the column that lists the failed tests you will get detailed error messages.
Advanced commands (admins / reviewer only)
Click to expand
/reformat(experimental) applies the clang-format style changes as additional commit. Note: your branch must have a different name (e.g., yourrepo:feature/XYZ) than the receiving branch (e.g., OpenMS:develop). Otherwise, reformat fails to push.rebuild jenkinswill retrigger Jenkins-based CI buildsSummary by CodeRabbit