python / cpython

The Python programming language
https://www.python.org
Other
63.37k stars 30.34k forks source link

Change base OS image to Ubuntu-24.04 in CI testing #122544

Open Damien-Chen opened 3 months ago

Damien-Chen commented 3 months ago

In current ci.yml, base OS image is ubuntu-22.04, should we move to the latest LTS verion: ubuntu-24.04 ?

pool: vmImage: ubuntu-22.04

To go further, if we should replace all current CI testing which run on ubuntu-22.04 to ubuntu-24.04 ?

Linked PRs

Eclips4 commented 3 months ago

cc @hugovk @ezio-melotti

hugovk commented 3 months ago

Thanks for the report, we're using ubuntu-22.04 in Read the Docs, Azure Pipelines and GitHub Actions:

❯ rg ubuntu-22.04
.readthedocs.yml
11:  os: ubuntu-22.04

.azure-pipelines/ci.yml
8:    vmImage: ubuntu-22.04

.azure-pipelines/pr.yml
8:    vmImage: ubuntu-22.04
20:    vmImage: ubuntu-22.04

.github/workflows/build.yml
47:    runs-on: ubuntu-22.04
198:    runs-on: ubuntu-22.04
264:    runs-on: ubuntu-22.04
378:    runs-on: ubuntu-22.04

.github/workflows/reusable-wasi.yml
12:    runs-on: ubuntu-22.04

.github/workflows/reusable-tsan.yml
22:    runs-on: ubuntu-22.04

.github/workflows/reusable-ubuntu.yml
17:    runs-on: ubuntu-22.04

Yes, let's upgrade, assuming all the dependencies and everything installs fine.

Would you like to open some PRs? I suggest a separate PR for each of Read the Docs, Azure Pipelines and GitHub Actions.

Damien-Chen commented 3 months ago

Sure!, Of course, I'd love to contribute to this, let me first investigate if it would affect the result of CI testing if just simply change ubuntu-22.04 to ubuntu-24.04.

picnixz commented 3 months ago

We are also using Ubuntu 22.04 for generating the configure script in the Docker image but I don't think we should change this one. This is in Tools/build/regen-configure.sh (I don't know whether the CI/CD is using its own packages or whether is using the docker script to check the configuration scripts)

hugovk commented 3 months ago

The comment at the top says they should match:

https://github.com/python/cpython/blob/fda6bd842a2b93a501526f1b830eb900d935ac73/Tools/build/regen-configure.sh#L5-L8

Which should be the same as this one:

https://github.com/python/cpython/blob/fda6bd842a2b93a501526f1b830eb900d935ac73/.github/workflows/build.yml#L43-L47

picnixz commented 3 months ago

The comment at the top says they should match:

Oh then we should update both of them then! (and I'll need to update my PR in the devguide as well)

Damien-Chen commented 3 months ago

Some other yml file based on ubunut-latest, for exmaple: in jit.yml. based on https://github.com/actions/runner-images description, ubuntu-latest is actually ubuntu-22.04, should those file mentioned ubuntu-latest need to upgrade ubuntu version ?

     architecture: x86_64

runner: ubuntu-latest compiler: gcc

  • target: x86_64-unknown-linux-gnu/clang architecture: x86_64 runner: ubuntu-latest compiler: clang
  • target: aarch64-unknown-linux-gnu/gcc architecture: aarch64 runner: ubuntu-latest compiler: gcc
  • target: aarch64-unknown-linux-gnu/clang architecture: aarch64 runner: ubuntu-latest compiler: clang
hugovk commented 3 months ago

No, let's not change any ubuntu-latest.

In fact, https://github.com/actions/runner-images?tab=readme-ov-file#available-images says ubuntu-24.04 is still beta, maybe we should wait until it is in GA (General Availability)?

Do you know when GA is planned?

Damien-Chen commented 3 months ago

According to there discussion in https://github.com/actions/runner-images/issues/9691 The GA will be somewhere in August-2024, I think it should be soon.

I think we can move all CI-testing step-by-step. First change trivial CI testiing(like readthedocs) to ubuntu-24.04 to make sure everything works correctly. If everthing goes well, then we can wait its GA and move core part(like checking JIT) to ubuntu-24.04 gradually

Damien-Chen commented 3 months ago

Close PR for Azure Pipeline as it currently not supports ubuntu-24.04

Damien-Chen commented 1 month ago

According to latest update in Github Action, ubuntu-24.04 is release as GA now, let`s continue to work it.