Skip to content

Commit

Permalink
always use an explicit ubuntu image (#21867)
Browse files Browse the repository at this point in the history
The release of `2.24.0rc2` failed:

https://github.com/pantsbuild/pants/actions/runs/12909883768/job/36005845441#step:3:19
```
  Version 3.7 was not found in the local cache
  Error: The version '3.7' with architecture 'x64' was not found for Ubuntu 24.04.
  The list of all available versions can be found here: https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
```

This is because the `publish` step was running on `ubuntu-latest` which
GitHub recently switched from Ubuntu 24
to 22. actions/runner-images#10636 Which has a
different set of GitHub Python versions
<https://github.com/actions/python-versions> available.

Setting to an explicit image version lets us control the upgrade cadence
instead of rugs being pulled out from under.
  • Loading branch information
cburroughs authored and WorkerPants committed Jan 22, 2025
1 parent 8c7dc57 commit b92c3fc
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
jobs:
audit:
if: github.repository_owner == 'pantsbuild'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache_comparison.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

jobs:
cache_comparison:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/public_repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: AlexTereshenkov/cheeseshop-query
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: Ars-Linguistica/mlconjug3
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -147,7 +147,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: OpenSaMD/OpenSaMD
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: StackStorm/st2
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -330,7 +330,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: fucina/treb
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -402,7 +402,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: ghandic/jsf
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -464,7 +464,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: komprenilo/liga
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -516,7 +516,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: lablup/backend.ai
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -606,7 +606,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: mitodl/ol-django
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -660,7 +660,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: mitodl/ol-infrastructure
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -712,7 +712,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: naccdata/flywheel-gear-extensions
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -775,7 +775,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/example-adhoc
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -841,7 +841,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/example-codegen
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -938,7 +938,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/example-django
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -1024,7 +1024,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/example-docker
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -1109,7 +1109,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/example-golang
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -1198,7 +1198,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/example-jvm
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -1283,7 +1283,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/example-kotlin
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -1368,7 +1368,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/example-python
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -1453,7 +1453,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/example-visibility
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down Expand Up @@ -1528,7 +1528,7 @@ jobs:
PANTS_REMOTE_CACHE_WRITE: 'false'
name: pantsbuild/scie-pants
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ jobs:
- build_wheels_macos10_15_x86_64
- build_wheels_macos11_arm64
- release_info
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout Pants at Release Tag
uses: actions/checkout@v4
Expand Down Expand Up @@ -492,7 +492,7 @@ jobs:
is-release: ${{ steps.get_info.outputs.is-release }}
release-asset-upload-url: ${{ steps.make_draft_release.outputs.release-asset-upload-url
}}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- env:
REF: ${{ github.event.inputs.ref }}
Expand Down
10 changes: 5 additions & 5 deletions src/python/pants_release/generate_github_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ def cache_comparison_jobs_and_inputs() -> tuple[Jobs, dict[str, Any]]:

jobs = {
"cache_comparison": {
"runs-on": "ubuntu-latest",
"runs-on": "ubuntu-22.04",
"timeout-minutes": 90,
"steps": [
*checkout(),
Expand Down Expand Up @@ -1117,7 +1117,7 @@ def release_jobs_and_inputs() -> tuple[Jobs, dict[str, Any]]:
jobs = {
"release_info": {
"name": "Create draft release and output info",
"runs-on": "ubuntu-latest",
"runs-on": "ubuntu-22.04",
"if": IS_PANTS_OWNER,
"steps": [
{
Expand Down Expand Up @@ -1187,7 +1187,7 @@ def release_jobs_and_inputs() -> tuple[Jobs, dict[str, Any]]:
},
**wheels_jobs,
"publish": {
"runs-on": "ubuntu-latest",
"runs-on": "ubuntu-22.04",
"needs": [*wheels_job_names, "release_info"],
"if": f"{IS_PANTS_OWNER} && needs.release_info.outputs.is-release == 'true'",
"env": {
Expand Down Expand Up @@ -1536,7 +1536,7 @@ def gen_goals(use_default_version: bool) -> Sequence[object]:
}
return {
"name": repo.name,
"runs-on": "ubuntu-latest",
"runs-on": "ubuntu-22.04",
"env": job_env,
# we're running untrusted code, so this token shouldn't be able to do anything. We also
# need to be sure we don't add any secrets to the job
Expand Down Expand Up @@ -1749,7 +1749,7 @@ def generate() -> dict[Path, str]:
},
"jobs": {
"audit": {
"runs-on": "ubuntu-latest",
"runs-on": "ubuntu-22.04",
"if": IS_PANTS_OWNER,
"steps": [
*checkout(),
Expand Down

0 comments on commit b92c3fc

Please sign in to comment.