GitHub Actions still using ubuntu-20.04

GiHub are deprecating the ubuntu-20.04 runner, seems like we still have this in use in a lot of places.

  1. Do we want to move to ubuntu-latest (unpinned, so might all break when GitHub update in the future, though saves us from having to do this again)
  2. What do we want to do with “cgroups v2”, or has this been fixed already? See code snippit below

These GitHub searches show we are using this in:

How do we handle this case

The Ubuntu 20.04 runner image will be fully unsupported by April 1, 2025. To raise awareness of the upcoming removal, we will temporarily fail jobs using Ubuntu 20.04. Builds that are scheduled to run during the brownout periods will fail. The brownouts are scheduled for the following dates and times:

  • March 4 14:00 UTC – 22:00 UTC
  • March 11 13:00 UTC – 21:00 UTC
  • March 18 13:00 UTC – 21:00 UTC
  • March 25 13:00 UTC – 21:00 UTC

What you need to do

Jobs using the ubuntu-20.04 YAML workflow label should be updated to ubuntu-22.04, ubuntu-24.04 or ubuntu-latest. You can always get up-to-date information on our tools by reading about the software in the runner images repository. Please contact GitHub Support if you run into any problems or need help.

In the repositories I’m involved, in all cases where ubuntu-20.04 is explicitly used, it is also explicitly needed, and newer Ubuntu containers will simply not work. GitHub broke setting up Python 3.6 via actions/setup-python on ubuntu-22.04, so basically if you need to test something on Python 3.6 (without using a container), you have to use ubuntu-20.04. (Unless they fixed it.)

Also for testing with Ansible 2.9, ansible-base 2.10, and ansible-core 2.11, you really need ubuntu-20.04 for the containers to still work. (GHA ubuntu-latest image will break `ansible-test --docker` for many stable branches · Issue #28 · ansible-collections/news-for-maintainers · GitHub) Maybe some specific things (sanity tests? unit tests?) still work, since they don’t need fancy stuff like an init system or SSH, though - I don’t remember whether I explicitly tried that back then.

If GitHub drops support for ubuntu-20.04, we probably cannot test against Ansible 2.9, ansible-base 2.10, ansible-core 2.11, and Python 3.6 in GHA anymore.

2 Likes

April 2025 is the end of standard support for Ubuntu 20.04 , pro (paid) support is available until April 2030… would self hosted runners with Ubuntu 20.04 be an option? :person_shrugging:

2 Likes

Use Ubuntu 22.04 or 24.04 GitHub runners for ansible-test. Support for cgroups v2 is available in ansible-core 2.12 and later. Unless you’re testing EOL versions of ansible-core, there’s no reason to be using Ubuntu 20.04 to run ansible-test.

2 Likes

Matt, thanks for confirming.

For the record, I think I can remove it from three collections (the ones I’m most interested in):

ubuntu-20.04 would be used or <stable-2.12 there. But since those collections neither support nor test with those versions, we could simply drop it.

Maybe we should try to address low hanging fruit like this first, and then discuss the rest? Just an idea…

BTW if it hasn’t been done yet, I think this should be mentioned on Bullhorn.

2 Likes

It looks like some collections (6 or 7?) already worked on this. Let’s wait a few more days and then have another look.

BTW some of the repos are archived. I think we should ignore them. As far as I can see, we can remove them by adding AND NOT is:archived:

Other repos look a little bit inactive. For example, the last commit to ibm.ds8000 has been 2023, and the last release even 2022. And community.proxmox only hast the initial commit from @Andersson007. No more commits, no release, no issues and no PRs. This looks a little bit weird, too.

But, as I’ve said, let’s wait a few days. Maybe some maintainers remove ubuntu-20.04 and then it would be less work to have a look at the rest.

1 Like

Good spot. I’ve updated my original post to include AND NOT is:archived

2 Likes

I think community.routeros and community.sops don’t use ubuntu-20.04 anywhere, but it turns up in a comment.

Both collections’ previous stable branch are stil using ubuntu-20.04, since these branches still support Ansible 2.9.

This might be really hard to track. What I mean is: If some older release still needs this, there should be a branch for this release. But, on the other hand, if an older branch still mentions ubuntu-20.04 we have no way to know if this branch / release is still maintained. At least not automatically.

Or do we?

I think it boils down to how much (and for how long) we (Ansible community) want to commit to support our releases. If we really want to stick to the current plans, then we should be committing time to support our claim independently from the support time frames of these other players, be it Github, Canonical, or any other party this project relies on. Which is a problem for a mostly volunteer-based project.

Maybe lay the cards on the table with the general public, saying “hey, support for Ubuntu 20.04 has dropped from GH, so if you the public want to have that, someone needs to step up and commit to maintain a base image”. I don’t know, just an idea.

It seems that for collection tests, the ubuntu-20.04 image is no longer needed. I’ve tried ubuntu-22.04 and then ubuntu-latest in [WIP] CI: Try out ubuntu22.04 for 2.9, 2.10, and 2.11 by felixfontein · Pull Request #145 · ansible-collections/community.internal_test_tools · GitHub, and for both everything passed. It might be related to me using the patched versions of 2.9, 2.10, 2.11 from GitHub - ansible-community/eol-ansible: CI helpers for End of Life Ansible/ansible-base/ansible-core versions, or some other issue no longer being there…

I also tried this for other collections, it worked there as well:

That’s great news

Do all the updates mentioned in your following post use that patched version?

Yes. The Docker images for the original stable-x branches completely stopped working some time ago; the fix was to re-push them in another container image format. That needed an update of the code (because Core didn’t want to do it, so the image names changed). Maybe the updated container format also solved the other problems that were originally there - or it was another unrelated change in the newer ubuntu images… :person_shrugging:

Regarding the other projects:

This is unrelated to GHA, but AZP is also showing a warning “The Ubuntu-20.04 image for the Microsoft-hosted “Azure Pipelines” pool is deprecated and will be retired April 1st.”. Does anyone know whether this affects AZP used for Ansible collections? It is totally unclear to me whether this warning is simply shown to everyone, or only to affected repos (it does show up for all collections I maintain, and also for https://dev.azure.com/ansible/microsoft.iis/_build/results?buildId=140869&view=results and https://dev.azure.com/ansible/ansible/_build/results?buildId=140864&view=results). I don’t know where that image might be configured (maybe somewhere where I cannot see it?)… CC @mattclay

The AZP warning is for projects which are using free Microsoft-hosted agents, not the ones paid for by Red Hat. Some collections use a mix of both, possibly unintentionally.

For example, here’s a reference to a Microsoft-hosted agent:

Here’s one in the same collection for an agent provided by Red Hat:

Collections should avoid using the ubuntu-20.04 image, as it will be retired soon.