Migrate to Ubuntu 24.04#21761
Conversation
|
Failures:
|
@cho-m this makes sense to me 👍🏻.
Which audit failure specifically? All we're trying to do in this case is ensure that the It looks from 👇🏻 that Ubuntu 22.04 may be enough for that?
Yes, we should drop it and bump to versions that don't need to install glibc such as yeh the 26.04 image. At least some of this we can do before 5.2.0. |
The Maybe that audit itself shouldn't fail for EDIT: If needed, RHEL 9-based distros (e.g. Rocky 9) use glibc 2.34 + GCC 14 and will be supported for a long time. |
Don't really care about support. If we can use e.g. Ubuntu that we've already used for this test: all the better. |
6594b8c to
bd13cca
Compare
We had an overlap last time so should just be able to adjust it. Given its usage levels, it would be ideal to not have to skip deprecation just because of a Promoting
The point of the test is to test distros on older GCC and Glibc. The fact it's even on Bookworm is actually a mistake.
Yeah, this is the fix to make here. It should not be failing an audit on something that's implicitly added. |
Debian
Can do next run with 22.04 restored as fix should be in. |
We should just deprecate it ASAP in this case. We aren't strictly bound to our own deprecation process, particularly on Docker images where we've been more flexible in the past and no-one complained.
This seems ideal. Honestly I'm not even sure why we're publishing as many Docker images as we do. The images we create are trivial to replicate and build elsewhere and they just seem to cause us a decent amount of grief with both our CI (they are flaky) and the deprecation process. |
Exactly why I suggested maybe not doing any more versioned ubuntu* images. Ultimately, we set up |
Fair, good point. I'd be game to kick off that deprecation period literally as soon as we switch things over now. @Bo98 remind me (and perhaps help @cho-m): how we did/should do deprecation of the previous images? |
I did update this in I verified it worked for a new tap I created (bottles built, commit pushed, release with bottles, etc.). Not sure if there are any edge cases that need to handled |
a90f635 to
02015aa
Compare
|
Looks like Haven't thought of any great alternative:
|
|
Audit will be fixed after the homebrew-core PR merge won't it? For test bot, I would perhaps wonder why we even need a container for them (besides Homebrew glibc test) - does it really need Homebrew/core tapped? |
Yeah. I misread the error. |
Not familiar with test but container may simplify setup. We need system packages for build requirements and then |
|
Oh did not realise that changed to use Homebrew/core formula, we used to have a test fixture for exactly that purpose. |
Yes, we're trying to replicate the homebrew/core CI flow as closely as possible to blow up here before we blow up there.
Debian oldstable test-bot triggers this error so we can similarly handle it for old Ubuntu as we have for that. |
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Looks good to me, thanks!
|
To be specific, the glibc problem is for our "latest" tests, i.e. brew/.github/workflows/tests.yml Lines 330 to 332 in c930535 As we haven't built the new container yet by the time this PR runs. |
Ah, gotcha. Fine to comment that out in this PR and then change it in the next. Ideally we'd have a better flow than that, though. |
02015aa to
9a83046
Compare
|
We still have Also updated Support Tiers documentation for glibc versions. I do want to find a way to use templates for these so we can avoid having to update versions manually. However, not essential as documentation can always be updated separately if we forget to handle in main PR. Tempted to also remove default version from Dockerfile and make docker.yml workflow run |
|
Looks like Ubuntu apt install will hit tzdata prompt unlike Debian. May be some difference in setup or DEBIAN_FRONTEND default. EDIT: also need |
c7dead1 to
2fc003a
Compare
|
I guess we don't actually need Homebrew/core checked out given CI is running on JSON API. (EDIT: tap used for Looks like GitHub runner availability is limited right now as API generation is happening every hour which led to a couple run failures. PR is ready for whenever we want to prepare 5.2.0 release. Can un-draft it then. |
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Thanks @cho-m! Looks good for next release and that everything that can be done now/extracted in advance has been.
May be worth documenting this PR (in itself or another PR 🤔) inside the Linux-CI.md page as an example of what will need done to bump in future.
Sure. I've been jotting some notes down locally. Will edit them and open PR to add to docs. Also, just remembered we'll need to handle self-hosted too - https://github.com/Homebrew/actions/blob/main/create-gcloud-instance/create-gcloud-instance.sh#L8. Can keep this as a manual update given we may replace GCP. Once we figure out new self-hosted, adding a way to sync Ubuntu version number rather than hardcoding will simplify maintenance. |
What date is 5.2.0? Migration of all that stuff might happen in April, only just finished the 10.15 & Node 24 stuff this week so Linux should be next up. But even if it's before, it's a one line change so let's keep it simple rather than messing around with syncing. |
I don't think we have a planned date yet so migration may happen before release.
Makes sense. GCP also changed name from |
Would be nice to avoid a one line change that's outside this PR as these things tend to get forgotten. |
Co-authored-by: Carlo Cabrera <github@carlo.cab>
|
Un-drafting to get Copilot and other reviews, but should avoid merging until we are planning 5.2.0 release. On side note, Ubuntu 26.04 LTS was released on 2026-04-23 so changes are in alignment with our (unofficial/proposed) idea of staying on 2nd LTS. |
There was a problem hiding this comment.
Pull request overview
Updates Homebrew’s Linux CI/Docker baseline from Ubuntu 22.04 (Jammy) to Ubuntu 24.04 (Noble), aligning core constants, docs, and GitHub Actions workflows with the new target environment.
Changes:
- Bump Linux CI constants to Ubuntu 24.04 (glibc 2.39, GCC 13, libstdc++ 6.0.33) and update the ARM runner label.
- Update documentation to reflect the new Tier glibc expectations and CI bottling OS.
- Switch Dockerfile/workflows and test-bot containers to Ubuntu 24.04, while keeping an older Ubuntu container for glibc/gcc compatibility testing.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
Library/Homebrew/os.rb |
Updates Linux CI OS/glibc/GCC/libstdc++ constants and ARM runner label. |
docs/Support-Tiers.md |
Raises Tier 1 Linux glibc requirement and adjusts Tier 2 glibc range accordingly. |
docs/Linux-CI.md |
Updates stated bottling OS to Ubuntu 24.04. |
Dockerfile |
Changes the default Ubuntu base version to 24.04. |
.github/workflows/tests.yml |
Moves test-bot containers to Ubuntu 24.04 and switches the glibc-compat test container to Ubuntu 22.04. |
.github/workflows/docker.yml |
Tags homebrew/brew:* from the 24.04 build and introduces 22.04 deprecation signaling + glibc-testing env handling. |
Comments suppressed due to low confidence (1)
.github/workflows/tests.yml:360
- This step says it’s a slimmed-down version of the Homebrew Dockerfile, but it installs
git-corewhereas the Dockerfile installsgit. For Ubuntu 22.04 in particular, using the same package name as the Dockerfile will keep the two in sync and avoid distro/package-name differences. Consider switchinggit-coretogit(or update the comment if intentional).
# Slimmed down version from the Homebrew Dockerfile
apt-get update
apt-get install -y --no-install-recommends \
bzip2 \
ca-certificates \
curl \
file \
g++ \
git-core \
jq \
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| LINUX_CI_OS_VERSION = "Ubuntu 24.04" | ||
| LINUX_CI_ARM_RUNNER = "ubuntu-24.04-arm" | ||
| LINUX_GLIBC_CI_VERSION = "2.39" | ||
| LINUX_GLIBC_NEXT_CI_VERSION = "2.39" # users below this version will be warned by `brew doctor` |
brew lgtm(style, typechecking and tests) with your changes locally?Draft until we get closer to brew 5.2.0 release date.
Related work:
g++-12from Ubuntu 24.04 #21613Homebrew/core PRs blocked by Ubuntu 22.04:
gcc@14)Formulae with LLVM Clang workarounds to revert after migrations:
Formulae with GCC dependency to rebuild after migration: