Skip to content

ci: rotate soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner out of roster #29796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jayaddison
Copy link
Contributor

PR summary

  • Why is this change necessary?

GitHub Actions will soon remove support for the Ubuntu 20.04 runner, as described at: actions/runner-images#11101

  • What problem does it solve?

This pull request raises the baseline runner image from Ubuntu 20.04 to Ubuntu 22.04, allowing GitHub Actions checks to continue after the removal of the former runner image.

  • What is the reasoning for this implementation?

Ubuntu 20.04 is only used in the tests.yml workflows, for jobs where Ubuntu 22.04 is already in parallel use. As a result, the approach taken here is to rotate Ubuntu 20.04 out of the roster, and to replace the entry that previously used it with Ubuntu 22.04 instead.

In addition, the fact that we no longer use Ubuntu 20.04 at all during GHA CI means that we can remove two previously-added Python package version pins:

PR checklist

Resolves #29766.

@jayaddison

This comment was marked as off-topic.

@jayaddison jayaddison marked this pull request as ready for review March 24, 2025 00:10
@jayaddison
Copy link
Contributor Author

Note: not for backporting to MPL-3.10. Ref: #29766 (comment)

@jayaddison

This comment was marked as off-topic.

This also allows one or two Python package dependency exclusions
to be removed; specifically:

 - a99ffa9
 - 89fb6d4
@jayaddison jayaddison force-pushed the issue-29766/remove-ubuntu2004-runner branch from 15f287c to 7b8b692 Compare March 24, 2025 00:33
@timhoffm timhoffm added this to the v3.10-doc milestone Mar 24, 2025
@jayaddison
Copy link
Contributor Author

Thanks @timhoffm!

Note for maintainers: it might make sense to merge #29765 (if/when ready) before this one (e.g. increasing overall test coverage briefly before removing stale coverage, rather than removing stale coverage before adding some more).

@oscargus
Copy link
Member

If you want to replace the other workflows to update 3.10 to 3.11, it would be appreciated.

.github/workflows/cibuildwheel.yml:          python-version: '3.10'
.github/workflows/cibuildwheel.yml:      - name: Build wheels for CPython 3.10
.github/workflows/mypy-stubtest.yml:          python-version: '3.10'
.github/workflows/mypy-stubtest.yml:              sed -e "s!.tox/stubtest/lib/python3.10/site-packages!lib!g" | \
.github/workflows/reviewdog.yml:          python-version: '3.10'
.github/workflows/reviewdog.yml:          python-version: '3.10'
.github/workflows/tests.yml:            python-version: '3.10'
.github/workflows/tests.yml:            # Oldest versions with Py3.10 wheels.
.github/workflows/tests.yml:            python-version: '3.10'
.github/workflows/tests.yml:            python-version: '3.10'
azure-pipelines.yml:              python.version: '3.10'

(And maybe a few more. But I can also do it later.)

@jayaddison
Copy link
Contributor Author

@oscargus I could take a look at that, sure - two notes though:

  • I think we should keep at least some form of py3.10 continuous integration testing in place until it is no longer supported by matplotlib (e.g. next release, if I understand correctly).
  • You are not suggesting to increase the minimum Python version yet, right? I ask based on taking a quick look at Bump minimum Python to 3.10 #28503 and noticing that there are a few other places we'd want to update too, when doing that, I think.

@tacaswell
Copy link
Member

Lets merge this as-is and do a second round of dropping the rest of the 3.10 builds / pushing our minimum up to 3.11.

@timhoffm timhoffm merged commit 0d11978 into matplotlib:main Apr 1, 2025
36 of 37 checks passed
Copy link

lumberbot-app bot commented Apr 1, 2025

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.10.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 0d11978c9f933a9fc7a585891b350c09958e034b
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #29796: ci: rotate soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner out of roster'
  1. Push to a named branch:
git push YOURFORK v3.10.x:auto-backport-of-pr-29796-on-v3.10.x
  1. Create a PR against branch v3.10.x, I would have named this PR:

"Backport PR #29796 on branch v3.10.x (ci: rotate soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner out of roster)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

Copy link

lumberbot-app bot commented Apr 1, 2025

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout v3.10.1-doc
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 0d11978c9f933a9fc7a585891b350c09958e034b
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #29796: ci: rotate soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner out of roster'
  1. Push to a named branch:
git push YOURFORK v3.10.1-doc:auto-backport-of-pr-29796-on-v3.10.1-doc
  1. Create a PR against branch v3.10.1-doc, I would have named this PR:

"Backport PR #29796 on branch v3.10.1-doc (ci: rotate soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner out of roster)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

@jayaddison jayaddison deleted the issue-29766/remove-ubuntu2004-runner branch April 1, 2025 01:06
@oscargus
Copy link
Member

oscargus commented Apr 1, 2025

@jayaddison (continuing here). Yes, I think that since we now have committed to bump the minimum version to 3.11 for the next release, one may just go all the way. But, yes, there are probably quite a few changes to sort out, not just bumping the work flows.

(I was primarily triggered to request it based on #29840 which was triggered by this PR... Maybe I'll continue in that one.)

@timhoffm
Copy link
Member

timhoffm commented Apr 1, 2025

@oscargus there's no immediate hurry to push all possible updates through that are enabled by dropping 3.10. Here, we have the immediate need to update the images used in CI, and as part of that it's reasonable to do the 3.11 update on CI.

rcomer pushed a commit to rcomer/matplotlib that referenced this pull request Apr 20, 2025
…b Actions ubuntu-20.04 runner out of roster

(cherry picked from commit 0d11978)
rcomer pushed a commit to rcomer/matplotlib that referenced this pull request Apr 20, 2025
…b Actions ubuntu-20.04 runner out of roster

(cherry picked from commit 0d11978)
rcomer pushed a commit to rcomer/matplotlib that referenced this pull request Apr 20, 2025
…b Actions ubuntu-20.04 runner out of roster

(cherry picked from commit 0d11978)
rcomer pushed a commit to rcomer/matplotlib that referenced this pull request Apr 20, 2025
…b Actions ubuntu-20.04 runner out of roster

(cherry picked from commit 0d11978)
rcomer pushed a commit to rcomer/matplotlib that referenced this pull request Apr 22, 2025
…b Actions ubuntu-20.04 runner out of roster

(cherry picked from commit 0d11978)
QuLogic added a commit that referenced this pull request Apr 23, 2025
….10.x

Backport PR #29796 on branch v3.10.x: ci: rotate soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner out of roster
rcomer pushed a commit to rcomer/matplotlib that referenced this pull request Apr 23, 2025
…b Actions ubuntu-20.04 runner out of roster

(cherry picked from commit 0d11978)
QuLogic added a commit that referenced this pull request Apr 24, 2025
….10.1-doc

Backport PR #29796 on branch v3.10.1-doc: ci: rotate soon-to-be-unsupported GitHub Actions ubuntu-20.04 runner out of roster
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.

[MNT]: ci: ubuntu-20.04 GitHub Actions runner will soon be unmaintained
5 participants