actions / runner-images

GitHub Actions runner images
MIT License
10.19k stars 3.06k forks source link

(Public Beta) Ubuntu 22.04 is now available #5490

Closed miketimofeev closed 2 years ago

miketimofeev commented 2 years ago

Breaking changes

Ubuntu 22.04 is now available for all GitHub Actions and Azure DevOps users. You can use the ubuntu 22.04 image label in your YAML to select this image.

GitHub Actions

jobs:
  jobName:
    runs-on: ubuntu-22.04

Azure DevOps

pool:
   name: 'Azure Pipelines'
   vmImage: 'ubuntu-22.04'

The image is marked as "beta" for now. It means some software can be unstable on the new platform. Also, there could be queueing issues as the capacity will be balanced only throughout the next weeks. Please report any problems with the new image to this repository.

Software difference between Ubuntu 20 and Ubuntu 22

Tool name Ubuntu 20.04 Ubuntu 22.04 Notes
Clang 10.0.0, 11.0.0, 12.0.0 11.1.0, 12.0.1 clang 10 is not available for Ubuntu 22
GCC/G++ 9.4.0 (default), 10.3.0 9.4.0, 10.3.0, 11.2.0 (default) the default version for Ubuntu 22 is different
Erlang 24.* - Erlang is not available for Ubuntu 22 at the moment
Swift 5.* - Swift is not available for Ubuntu 22 at the moment
HHVM (HipHop VM) 4.* - HHVM is not available for Ubuntu 22 at the moment
OpenSSL 1.1.* 3.* The default OpenSSL in Ubuntu is now version 3
PhantomJS 2.1.1 - The software is deprecated as the latest version was released in 2016
PHP 7.4, 8.0, 8.1 8.1 Deprecated all the versions besides the most recent one
Firefox\geckodriver 99.* - Firefox is not available for Ubuntu 22 at the moment
.NET Core SDK 3.1, 5.0 6 Please consider using tasks to install any version on-flight:
- actions/setup-dotnet (GitHub Actions)
- Use .NET Core (Azure DevOps)
MongoDB 5.0.* - MongoDB is not available for Ubuntu 22 at the moment
MS SQL Server Client Tools SqlPackage 16.
sqlcmd 17.
SQL tools are not available for Ubuntu 22 at the moment
Go Default version: 1.17.x
Pre-cached versions: 1.16, 1.17, 1.18
Default version: 1.18x
Pre-cached versions: 1.17, 1.18
If your use-case requires using any of these versions, consider using tasks to install Go on-flight:
- actions/setup-go (GitHub Actions)
- Go Tool Installer (Azure DevOps)
Node.js Default version: 16.x
Pre-cached versions: 12, 14, 16
Default version: 16.x
Pre-cached versions: 14, 16
If your use-case requires using any of these versions, consider using tasks to install Node.js on-flight:
- actions/setup-node (GitHub Actions)
- Node.js Tool Installer (Azure DevOps)
PyPy 2.7, 3.6, 3.7, 3.8, 3.9 3.7, 3.8, 3.9 Deprecated all the versions besides the most recent ones
Python Default version: 3.8.x
Pre-cached versions: 2.7, 3.6, 3.7, 3.8, 3.9, 3.10
Default version: 3.10.x
Pre-cached versions: 3.7, 3.8, 3.9, 3.10
On GitHub Actions, actions/setup-python can install any version on-flight so this change doesn't impact users
Ruby Default version: 2.7.x
Pre-cached versions: 2.5, 2.6, 2.7, 3.0, 3.1
Default version: 3.0.x
Pre-cached versions: 3.1
On GitHub Actions, ruby/setup-ruby can install any version on-flight so this change doesn't impact users
Az modules Installed: 7.3.2
Zipped: 3.1.0, 4.4.0, 5.9.0, 6.6.0
Installed: 7.3.2
Zipped: -
If your use-case requires using any of these versions, consider using tasks to install Az modules on-flight:
- azure-powershell-action (GitHub Actions)
- Azure PowerShell (Azure DevOps)
Docker images Alpine: 3.12, 3.13, 3.14
buildpack-deps: bullseye, buster, stretch
debian: 9, 10, 11
node: 12, 14, 16
ubuntu: 16, 18, 20
Alpine: 3.14, 3.15
buildpack-deps: bullseye, buster
debian: 10, 11
node: 14, 16
ubuntu: 18, 20, 22
Deprecated all the versions besides the most recent one

Target date

May 5, 2022

The motivation for the changes

Ubuntu 22.04 LTS has been released.

Possible impact

n\a

Virtual environments affected

Mitigation ways

n\a

panekj commented 2 years ago

Please consider updating default Go to version 1.18

EdJoPaTo commented 2 years ago

I tested the ubuntu-22.04 runner with one of my existing workflows and it failed as the docker daemon does not seem to be running:

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Is this the intended behaviour? Starting it when needed and don't start it per default might save some resources / startup time so I could understand this change. But it does not seem to be documented in this issue. Is this a bug then?

(I have not run a dedicated test for this, I simply ran the exact same workflow which works on ubuntu-20.04 and interpreted the error message)

Full log resulting in the error

al-cheb commented 2 years ago

@EdJoPaTo, We will check it.

Temporary workaround is to remove daemon.conf:

- run: |
          sudo rm /etc/docker/daemon.json
          sudo systemctl restart docker
al-cheb commented 2 years ago

I think you should preinstall clang 13 and 14 (available from official repos) instead of 11 and 12

@MehdiChinoune, feel free to create a separate issue.

olandese commented 2 years ago

I successfully build the image, and was trying to use it with the Azure DevOps ScaleSet feature, but the agents are not coming up. The Azure DevOps VM Extensions fails with:

"Azure Pipelines Extension failed with message: The Extension failed to execute: Pipeline script execution failed with exit code 100"

image

al-cheb commented 2 years ago

@olandese , Maybe this fix will help - https://github.com/actions/virtual-environments/pull/5496

olandese commented 2 years ago

@olandese , Maybe this fix will help - #5496

Hi @al-cheb, thanks for the quick reply, I will try to rebuild the image with this fix and let you know

olandese commented 2 years ago

@olandese , Maybe this fix will help - #5496

Hi @al-cheb, thanks for the quick reply, I will try to rebuild the image with this fix and let you know

@al-cheb the fix is working! The agents are coming up! Will this fix be merged?

al-cheb commented 2 years ago

@olandese, This fix has been merged.

miketimofeev commented 2 years ago

Ubuntu-22.04 is now available in Azure DevOps too

iBug commented 2 years ago

Please consider updating default Go to version 1.18

I second that. Also note that the default golang package from Ubuntu APT repo is also 1.18. I see it make little sense to default to 1.17 when it's officially 1.18 already.

jauderho commented 2 years ago

I tested the ubuntu-22.04 runner with one of my existing workflows and it failed as the docker daemon does not seem to be running:


docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Is this the intended behaviour? Starting it when needed and don't start it per default might save some resources / startup time so I could understand this change. But it does not seem to be documented in this issue. Is this a bug then?

I can confirm that I am experiencing the same problem and the proposed workaround does not work for me.

fahedouch commented 2 years ago

I tested the ubuntu-22.04 runner with one of my existing workflows and it failed as the docker daemon does not seem to be running:


docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Is this the intended behaviour? Starting it when needed and don't start it per default might save some resources / startup time so I could understand this change. But it does not seem to be documented in this issue. Is this a bug then?

I can confirm that I am experiencing the same problem and the proposed workaround does not work for me.

I am facing the same issue too https://github.com/fahedouch/nerdctl/runs/6334828070?check_suite_focus=true

visuve commented 2 years ago

@miketimofeev your list seems to be missing GCC/G++. It's https://packages.ubuntu.com/jammy/gcc 11.2 on default in 22.04. In 20.04 it's 9.3 https://packages.ubuntu.com/focal/gcc.

That is a huge difference :)

wavenator commented 2 years ago

My "services" section attempt to run Docker containers, which leads to an error. This is the error message:

  /usr/bin/docker version --format '{{.Server.APIVersion}}'
  Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  '
  Error: Exit code 1 returned from process: file name '/usr/bin/docker', arguments 'version --format '{{.Server.APIVersion}}''.

https://github.com/Intsights/sergeant/runs/6352860914?check_suite_focus=true

miketimofeev commented 2 years ago

Please consider updating default Go to version 1.18

I second that. Also note that the default golang package from Ubuntu APT repo is also 1.18. I see it make little sense to default to 1.17 when it's officially 1.18 already.

it's already 1.18 actually, there was an error in the announcement, fixed

MikeMcC399 commented 2 years ago

Feedback on Changelog ...

https://github.blog/changelog/2022-05-10-github-actions-beta-of-ubuntu-22-04-for-github-hosted-runners-is-now-available/ "GitHub Actions: Beta of Ubuntu 22.04 for GitHub-hosted runners is now available"

In the sentence:

See the difference between the two OS versions <a href="https://https://github.com/actions/virtual-environments/issues/5490">here</a>.  

there is a bad link to https://github.com/actions/virtual-environments/issues/5490. Clicking on the link here in "See the difference between the two OS versions here" results in the error message This site can’t be reached.

One of the https:// needs to be removed it seems.

Edit: This is fixed now, it seems.

rtd62 commented 2 years ago

Has there been any consideration of having this runner support OpenSSL 1.1.1? My use case is that I have a GitHub action which compiles PHP 7.4, but needs to be done on an Ubuntu 22 runner. During the compilation, it errors out because it uses functions from OpenSSL 1.1.1 that are deprecated as of OpenSSL 3.0

miketimofeev commented 2 years ago

@rtd62 we can consider installing OpenSSL 1.1 if it doesn't require building from the source and does not break the 3.0 installation

rtd62 commented 2 years ago

@miketimofeev Sounds good! In the interim, I am testing my process out in a VM. I will check to see if having both 1.1.1 and 3.0 breaks something. I will let y'all know!

othercorey commented 2 years ago

We're seeing the docker socket failure during the github actions build step. Is there a way to apply the work around before this runs?

/usr/bin/docker build -t 08450d:[3](https://github.com/cakephp/cakephp/runs/6430048170?check_suite_focus=true#step:2:3)6783b6a[4](https://github.com/cakephp/cakephp/runs/6430048170?check_suite_focus=true#step:2:4)a1244d48a8fe7fb4a0c9e86 -f "/home/runner/work/_actions/getong/mariadb-action/v1.1/Dockerfile" "/home/runner/work/_actions/getong/mariadb-action/v1.1"
  Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
  Warning: Docker build failed with exit code 1, back off 2.383 seconds before retry.

https://github.com/cakephp/cakephp/runs/6430048170?check_suite_focus=true#step:2:2

polys commented 2 years ago

Would you consider caching Debian slim images as well (e.g. debian:bullseye-slim)? They are widely used as base images for slim variants.

miketimofeev commented 2 years ago

Would you consider caching Debian slim images as well (e.g. debian:bullseye-slim)? They are widely used as base images for slim variants.

@polys would you mind creating a separate feature request for that?

MehdiChinoune commented 2 years ago

Latest release and rollout progress are not shown in README file

miketimofeev commented 2 years ago

@MehdiChinoune we will add this soon. Sorry for the inconvenience

jauderho commented 2 years ago

@miketimofeev Do you know if the Docker issue has been sorted?

miketimofeev commented 2 years ago

@jauderho I believe we fixed it, but it will take some time to roll out the fix

jauderho commented 2 years ago

@jauderho I believe we fixed it, but it will take some time to roll out the fix

Thanks @miketimofeev. I have switched back to 22.04 in my sandbox repo and will wait to see when it rolls out. https://github.com/jauderho/sandbox/actions

MehdiChinoune commented 2 years ago

Still failing to run containers:

  Environment: ubuntu-22.04
  Version: 20220515.1
miketimofeev commented 2 years ago

@MehdiChinoune the fix is still rolling out

lsm5 commented 2 years ago

@miketimofeev hi, podman, buildah and skopeo should be available in the default Ubuntu 22.04 repositories itself. There's no need for the Kubic package repos to get those packages.

miketimofeev commented 2 years ago

@lsm5 thanks for the update, we have already added the tools here and will rollout the image with all three tools this week https://github.com/actions/virtual-environments/pull/5580

MehdiChinoune commented 2 years ago

@MehdiChinoune the fix is still rolling out

Still not fixed

  Environment: ubuntu-22.04
  Version: 20220522.1

Edit: Two attempts reported the same Version, one succeeded and the other failed https://github.com/MehdiChinoune/makhber/runs/6567379007?check_suite_focus=true https://github.com/MehdiChinoune/makhber/runs/6570855280?check_suite_focus=true

The only difference I could observe is: The first has

Virtual Environment Provisioner
  1.0.0.0-main-20220509-2

The second has

Virtual Environment Provisioner
  1.0.0.0-main-20220421-1
firewave commented 2 years ago

@EdJoPaTo, We will check it.

Temporary workaround is to remove daemon.conf:

- run: |
          sudo rm /etc/docker/daemon.json
          sudo systemctl restart docker

This workaround is not working with

LOGOLFGODORD commented 2 years ago
firewave commented 2 years ago

@EdJoPaTo, We will check it. Temporary workaround is to remove daemon.conf:

- run: |
          sudo rm /etc/docker/daemon.json
          sudo systemctl restart docker

This workaround is not working with

  • uses: docker://<image> in steps since it pulls the image before even executing the first step although it is just referenced later on
  • container in build since the step would be executed in the guest/container and not the host

It is working now - seems like a fix was rolled out over night.

miketimofeev commented 2 years ago

@firewave @MehdiChinoune yes the fix should have been deployed across all the environments by now

marknuzz commented 2 years ago

This is incorrect:

On GitHub Actions, ruby/setup-ruby can install any version on-flight so this change doesn't impact users

From https://github.com/ruby/setup-ruby

On ubuntu-22.04 (beta), only ruby: 3.1 - head are supported, due to Ubuntu 22.04 only supporting OpenSSL 3.

Run ruby/setup-ruby@v1
Error: Error: Unknown version 3.0.0 for ruby on ubuntu-22.04
        available versions for ruby on ubuntu-22.04: 3.1.0, 3.1.1, 3.1.2, 3.2.0-preview1, head, debug
        Make sure you use the latest version of the action with - uses: ruby/setup-ruby@v1
firewave commented 2 years ago

sudo apt-get update already failed several times with one of the adoptopenjdk repos:

Err:7 https://adoptopenjdk.jfrog.io/adoptopenjdk/deb jammy Release
  404   [IP: 34.139.10.89 443]

Latest case is https://github.com/danmar/cppcheck/runs/6683435797.

Simply re-running the build worked in all cases so far.

al-cheb commented 2 years ago

@firewave, sudo apt-get update || true as a temporary workaround

firewave commented 2 years ago

@firewave, sudo apt-get update || true as a temporary workaround

Thanks. Now it is always 404 and not just occasionally.

firewave commented 2 years ago

It seems the repo list is different on the runners or has just changed recently.

A build from 2 hours ago (around the same time as the first failure of the other one / https://github.com/danmar/cppcheck/runs/6683050480?check_suite_focus=true) had this:

Hit:1 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Get:3 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease [10.5 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:6 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease [3626 B]
Get:7 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [221 kB]
Get:8 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [57.4 kB]
Get:9 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [3876 B]
Get:10 http://azure.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [124 kB]
Get:11 http://azure.archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [18.8 kB]
Get:12 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [102 kB]
Get:13 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [34.2 kB]
Get:14 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [1848 B]
Get:15 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages [15.8 kB]
Hit:16 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Get:17 http://azure.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages [129 kB]
Get:18 http://azure.archive.ubuntu.com/ubuntu jammy-security/main Translation-en [33.8 kB]
Get:19 http://azure.archive.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [2116 B]
Get:20 http://azure.archive.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [124 kB]
Get:21 http://azure.archive.ubuntu.com/ubuntu jammy-security/restricted Translation-en [18.7 kB]
Get:22 http://azure.archive.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [59.5 kB]
Get:23 http://azure.archive.ubuntu.com/ubuntu jammy-security/universe Translation-en [18.7 kB]
Get:24 http://azure.archive.ubuntu.com/ubuntu jammy-security/universe amd64 c-n-f Metadata [960 B]
Fetched 1300 kB in 1s (1506 kB/s)
Reading package lists...
W: https://cloud.r-project.org/bin/linux/ubuntu/jammy-cran40/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

The failing one has:

Hit:1 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
Get:2 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease [109 kB]
Get:3 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease [99.8 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:5 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
Ign:6 https://adoptopenjdk.jfrog.io/adoptopenjdk/deb jammy InRelease
Get:7 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [221 kB]
Err:8 https://adoptopenjdk.jfrog.io/adoptopenjdk/deb jammy Release
  404   [IP: 34.139.10.89 443]
Get:9 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [57.4 kB]
Get:10 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 c-n-f Metadata [3928 B]
Get:11 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [102 kB]
Get:12 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [34.2 kB]
Get:13 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 c-n-f Metadata [1848 B]
Hit:14 https://packages.adoptium.net/artifactory/deb jammy InRelease
Get:15 http://azure.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages [129 kB]
Get:16 http://azure.archive.ubuntu.com/ubuntu jammy-security/main Translation-en [33.8 kB]
Get:17 https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/ InRelease [3626 B]
Get:18 http://azure.archive.ubuntu.com/ubuntu jammy-security/main amd64 c-n-f Metadata [2116 B]
Hit:19 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
Reading package lists...
E: The repository 'https://adoptopenjdk.jfrog.io/adoptopenjdk/deb jammy Release' does not have a Release file.
W: https://packages.adoptium.net/artifactory/deb/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://cloud.r-project.org/bin/linux/ubuntu/jammy-cran40/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.

Also note the DEPRECATION warnings.

al-cheb commented 2 years ago

@firewave , The Err:7 https://adoptopenjdk.jfrog.io/adoptopenjdk/deb jammy Release issue should be fixed, about warnings we will take a look at it.

firewave commented 2 years ago

Now several jobs failed with the following during the Set up job step:

Error: Can't use 'tar -xzf' extract archive file: /home/runner/work/_actions/_temp_943d0b32-9217-4413-b297-2930d210c951/50225e63-0f99-4877-8b12-a6f442a7298f.tar.gz. return code: 2.

https://github.com/danmar/cppcheck/runs/6702661593

al-cheb commented 2 years ago

@firewave, This is an external bug - https://github.com/actions/cache/issues/811#issuecomment-1144627411

firewave commented 2 years ago

@firewave, This is an external bug - actions/cache#811 (comment)

The affected actions are not using actions/cache at all.

al-cheb commented 2 years ago

@firewave, setup-python@v2 does, bump to v3.

firewave commented 2 years ago

@al-cheb Another that failed job was using github/codeql-action@v1. So that also seems to depend on it.

Ru13en commented 2 years ago

@miketimofeev podman 3.4.4, buildah 1.23.1 and skopeo 1.4.1 are now available from the official ubuntu 22.04 repro.

judechen-bhp commented 2 years ago

Tried to run the 2204 image build, however got the below error at the very beginning, any idea?

==> azure-arm.build_vhd: Error waiting for SSH: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain