Repository navigation
chore(cross): Upgrade x86_64-unknown-linux-gnu bookworm (08092026) - #11798
Conversation
Rebuild the cross-compilation images and point every workflow, `Cross.toml` and the bake file at the new `08092026` tag. | image | before | after | | --- | --- | --- | | x86_64-unknown-linux-gnu base | debian bullseye (glibc 2.31, python 3.9) | debian bookworm (glibc 2.36, python 3.11) | | aarch64 zlib | 1.3.1 from zlib.net | 1.3.2 from GitHub releases | zlib.net only serves the latest release, so the pinned 1.3.1 tarball 404s and the aarch64 image no longer builds; fetch from the GitHub release instead. On bookworm, drop the deprecated `apt-key`/`add-apt-repository` pair in favour of a keyring drop-in plus an explicit sources list entry. Also fix the README: the publish snippet referenced a `x86_64-unknown-linux-musl-python` bake target that does not exist, and the glibc/clang notes were stale. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @ovr's task in 3m 29s —— View job Review complete — 1 high, 2 medium, 3 lowTag bump is mechanically clean and complete (no Full review — findings, verification notes, and task listTasks
Findings
On #1 — the official Cube image is What's good
Not verified
|
| # libc 2.31 python 3.9 | ||
| FROM debian:bullseye-slim | ||
| # libc 2.36 python 3.11 | ||
| FROM debian:bookworm-slim |
There was a problem hiding this comment.
Compatibility: this raises the glibc floor for published x86_64 artifacts from 2.31 to 2.36.
The image built here is what produces cubestored-x86_64-unknown-linux-gnu and the native-linux-x64-glibc-*.tar.gz release assets (.github/workflows/publish.yml:95, :600). Bookworm's glibc 2.36 becomes the hard minimum for anyone running those binaries outside the official Cube image (which is node:24-trixie-slim, so unaffected).
Hosts that worked before and would now fail with GLIBC_2.34/2.35 not found-style errors:
| Distro | glibc |
|---|---|
| RHEL/Rocky/Alma 9, Amazon Linux 2023 | 2.34 |
| Ubuntu 22.04 LTS | 2.35 |
| Debian 11, Ubuntu 20.04 | 2.31 |
Three things worth reconciling:
- It contradicts this repo's own stated policy, both in
cross/README.md("Don't use modern unix*, which ship newestlibc") and the# Please use minimal possible version of ubuntu, because it produces constraint on glibccomment sitting directly above theubuntu-22.04runner pin inpublish.yml:598— that runner is glibc 2.35, i.e. lower than what the container now emits. - It's asymmetric:
aarch64-unknown-linux-gnustays on focal/2.31, so arm64 users get a materially wider support matrix than x64 users for the same release. - The PR description frames the rebuild as fixing an aarch64 zlib 404; the bullseye→bookworm move is a separate, user-visible change riding along. If it's needed because apt.llvm.org dropped the bullseye/LLVM-18 suite, that's a fine reason — please say so, and if the floor bump is intentional it should land in release notes rather than only in a
chore(ci):commit.
If the floor bump isn't intentional, bookworm's libc6 isn't the only option — staying on bullseye with a pinned/archived LLVM apt suite, or building against an older sysroot, keeps 2.31.
There was a problem hiding this comment.
@claude It's okey, we cannot still stay on this outdated image too long.
There was a problem hiding this comment.
Claude finished @ovr's task in 33s —— View job
Acknowledged — glibc floor bump accepted
Understood, and that's a reasonable call: bullseye is EOL for standard support and pinning an archived LLVM suite to hold 2.31 would just move the maintenance cost somewhere less visible. Treating finding #1 as decided, not open — no further action requested from me on it.
Two small things so the decision doesn't get lost:
- Already documented.
cross/README.md:15-17(added in this PR) states the 2.36 / 2.31 split explicitly, so the floor is recorded next to the images themselves. The only gap left is a user-facing release note for the standalonecubestored-x86_64-unknown-linux-gnuandnative-linux-x64-glibc-*.tar.gzartifacts — worth a line so RHEL 9 / AL2023 / Ubuntu 22.04 users hit a changelog entry rather than aGLIBC_2.36 not found. - Asymmetry is now the interesting part. With x86_64 at 2.36 and aarch64 still on focal/2.31, the arches have different support matrices. Not a problem for this PR — just flagging that the same "don't stay too long" logic applies to the aarch64 image next time round, and bringing it to bookworm too would collapse the matrix back to one number.
Remaining open findings are all non-blocking:
| # | Sev | Where | Note |
|---|---|---|---|
| 3 | Medium | .github/workflows/push.yml:242 + siblings |
rust-cache key omits the image tag — first post-merge run restores bullseye-built native deps into bookworm. I can't push this one (App permissions block .github/workflows). |
| 4 | Low | cross/README.md:23-25 |
Bake snippet omits the two bare (non--python) targets that Cross.toml and CI actually pull. |
| 6 | Low | cross/aarch64-unknown-linux-gnu.Dockerfile:42,51 |
No tarball checksums; the openssl.org fetch has the same "only latest is served" rot as the zlib 404 this PR fixes. |
Happy to push #4 (and the apt-key → keyring alignment on the aarch64 image) if you want them in this PR — say the word. Otherwise this looks good to merge once you've confirmed the 08092026 tags are on Docker Hub; I still can't verify that from here, and no CI job exercises these Dockerfiles, so a green run only proves the tags resolve.
--- · branch fix-cross-image-build-date-tag
| ENV ZLIB_VERSION=1.3.2 | ||
| RUN wget https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz -O - | tar -xz && \ |
There was a problem hiding this comment.
Good fix — GitHub release URLs are immutable, so this won't rot the way zlib.net/zlib-<pinned>.tar.gz does when upstream cuts a new release. Worth keeping in mind for the openssl.org fetch two blocks down (line 51), which has the same "only current release is served" failure mode; 1.1.1w is EOL and already moved to the old/ path once.
Two smaller things while this line is being touched:
- No integrity check on the tarball. Everything here is HTTPS-to-a-trusted-host so it's not a live hole, but a
sha256sum -cagainst the pinned version would make the pin actually load-bearing. Pre-existing pattern across all three fetches, so fine to skip if you'd rather not expand scope. ENV ZLIB_VERSION(vsARG) leaves the value baked into the runtime environment of every build that uses this image. Also pre-existing.
| if: (needs['latest-tag-sha'].outputs.sha != github.sha) | ||
| container: | ||
| image: cubejs/rust-cross:x86_64-unknown-linux-gnu-31072025 | ||
| image: cubejs/rust-cross:x86_64-unknown-linux-gnu-08092026 |
There was a problem hiding this comment.
Unrelated to the tag bump itself, but this bump is the first time it can bite: the Swatinem/rust-cache key a few lines down (shared-key: cubestore-release, key: ubuntu-24.04) doesn't include the cross-image tag, so the first run after this merges will restore a target/ populated inside the bullseye image into the bookworm container. Pure-Rust artifacts are keyed on rustc version and fine, but cc/cmake-built native deps (openssl, rocksdb, zlib) cached under target/*/build/ were compiled against glibc 2.31 headers and won't be rebuilt just because the container changed.
Usually this surfaces as a confusing link error rather than a silently bad binary, but it's cheap to avoid by folding the image tag into the cache key — e.g. key: ubuntu-24.04-08092026. Same applies to the sibling jobs in rust-cubestore.yml / rust-cubesql.yml / master.yml.
Note I can't push this change myself — GitHub App permissions don't allow modifying files under .github/workflows.
| - Don't use modern unix*, which ship newest `libc`. The `libc` of the image becomes the | ||
| minimum requirement for the binaries we publish: 2.36 for `x86_64-unknown-linux-gnu` | ||
| (debian bookworm), 2.31 for `aarch64-unknown-linux-gnu` (ubuntu focal) | ||
| - Better to use one clang/gcc version across images (`clang-18`) | ||
| - Try to use one OS for all images (`debian`) for unix* |
There was a problem hiding this comment.
Nice catch on the x86_64-unknown-linux-musl-python bake target below — confirmed there's no such target in docker-bake.hcl (only x86_64-unknown-linux-musl), so that snippet has been broken.
Two gaps left in this block:
- The bake list only covers
x86_64-unknown-linux-gnu-python,aarch64-unknown-linux-gnu-pythonandx86_64-unknown-linux-musl. The two*-pythontargetsinheritstheir base targets, butinheritscopies config, it doesn't schedule the base as a separate pushed target — thebase = "target:x86_64-unknown-linux-gnu"context builds it as an intermediate only. YetCross.tomland half the workflows pull the barecubejs/rust-cross:x86_64-unknown-linux-gnu-08092026/aarch64-...tags, which need their own--push. Worth adding the two bare targets to the snippet so the next person rebuilding doesn't ship a tag set that's missing exactly the images CI pulls most. - Now that the two gnu images sit on different glibc floors, the "Verify versions" step only runs
cc --version. Aldd --versionline would make the documented 2.36/2.31 claim checkable rather than something a reader has to trust.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #11798 +/- ##
==========================================
- Coverage 80.21% 80.21% -0.01%
==========================================
Files 500 500
Lines 105649 105649
Branches 3885 3885
==========================================
- Hits 84748 84747 -1
- Misses 20352 20353 +1
Partials 549 549
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
A key in `trusted.gpg.d` is trusted for every repository in the sources list. Put it in `/etc/apt/keyrings` (shipped by apt on bookworm) and reference it with `signed-by` so it can only sign the LLVM repo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Claude finished @ovr's task in 1m 7s —— View job Incremental review of
|
| # | Sev | Where | Status |
|---|---|---|---|
| 1 | High | cross/x86_64-unknown-linux-gnu.Dockerfile:2 |
Unaddressed — glibc floor 2.31 → 2.36 for published x86_64 artifacts |
| 3 | Medium | .github/workflows/push.yml:242 + siblings |
Unaddressed — rust-cache key omits image tag |
| 4 | Low | cross/README.md:19 |
Unaddressed — bake snippet omits the two bare (non--python) targets CI pulls |
| 6 | Low | cross/aarch64-unknown-linux-gnu.Dockerfile:42 |
Unaddressed — no tarball checksums; openssl.org fetch has the same "only latest is served" rot |
Re-affirmed these four rather than re-posting; the unresolved state carries the signal. #1 is the only one I'd treat as merge-blocking-ish — it needs a decision, not necessarily a code change: if raising the x86_64 glibc floor to 2.36 (dropping RHEL 9 / Amazon Linux 2023 at 2.34 and Ubuntu 22.04 at 2.35) is intentional, it wants a release note, since it currently rides along inside a chore(ci): commit.
One leftover from the now-resolved thread that the new commit didn't cover: aarch64-unknown-linux-gnu.Dockerfile:11 still uses apt-key add -, which is deprecated and now inconsistent with the x86 image. Not a live vulnerability — worth aligning while both images are being rebuilt. Fix this →
Still not verifiable from CI
Unchanged from my earlier review — no network access in this run, and no CI job exercises these Dockerfiles, so a green run only proves the tags resolve:
- Whether
zlib-1.3.2exists upstream with that release asset. - Whether the
08092026tags are pushed to Docker Hub and match the Dockerfiles here. - Whether
apt.llvm.org/bookwormstill carries the LLVM 18 suite.
A successful local docker buildx bake of both gnu targets would close all three at once.
Check List
Description of Changes Made
Rebuilds the
cubejs/rust-crosscross-compilation images and repoints every workflow,Cross.tomland the bake file at the new08092026tag. The aarch64 image was failing to build because zlib.net only serves the latest release, so the pinned 1.3.1 tarball 404s — it now fetches zlib 1.3.2 from GitHub releases. Thex86_64-unknown-linux-gnuimage moves from debian bullseye to bookworm (glibc 2.31 → 2.36, python 3.9 → 3.11), replacing the deprecatedapt-key/add-apt-repositorypair with a keyring drop-in plus an explicit sources list entry. Note this raises the minimum glibc for the publishedx86_64-unknown-linux-gnubinaries to 2.36. Also fixes stale bits incross/README.md: the publish snippet referenced a non-existentx86_64-unknown-linux-musl-pythonbake target, and the glibc/clang notes were out of date.