actions / runner-images

GitHub Actions runner images
MIT License
9.17k stars 2.84k forks source link

Ubuntu-latest workflows will use Ubuntu-20.04 #1816

Closed AlenaSviridenko closed 3 years ago

AlenaSviridenko commented 3 years ago

UPDATE: Migration has been finished and all ubuntu-latest builds are using Ubuntu 20.04

Ubuntu-20.04 is ready to be the default version for the “ubuntu-latest” label in GitHub Actions and Azure DevOps. This change will be rolled out over a period of several weeks beginning on November, 30. (December, 22 - January, 4 will be a migration break due to holidays)

If you see any issues with your workflows during this transition period:

Note that image software between Ubuntu-18.04 and Ubuntu-20.04 differs not only by the pre-installed versions of tools, but also by the default versions of some tools. See the list of missing and changes software below.

Software differences

Tool name Ubuntu 18.04 Ubuntu 20.04 Notes
AWS CLI 1.18.173 2.0.62 These two versions have major set of breaking changes. See migration guide for details
.NET Core 2.1.x, 3.0.x, 3.1.x 2.1.x, 3.1.x .NET Core 3.0 was removed (3.0.100, 3.0.101, 3.0.102, 3.0.103). NET Core 3.0 has reached end of life, meaning it is no longer supported and not recommended to use. If you still need it, consider using setup-dotnet and UseNetCore tasks.
Java 7
8(default)
11
12
8
11(default)
If you need to use other versions of Java, consider using setup-java and Java tool installer tasks.
Android 17.0 - 30.0 27.0 - 30.0 Android Platforms and build tools < 27.0 were removed from image. Consider installation in runtime using sdkmanager
Ruby 2.5.1 2.7.0 Default Ruby was changed from 2.5.x to 2.7.x. Consider using setup-ruby and UseRuby tasks.
Ruby toolcache 2.4
2.5
2.6
2.7
2.5
2.6
2.7
Ruby 2.4 will become unavailable via install tasks
Python3 3.6.9 3.8.2 Default Python will be updated from 3.6 to 3.8. Consider using setup-python or UsePython to switch version
PHP 7.1
7.2
7.3
7.4
8.0
7.4
8.0
-
Azure PowerShell 1.0.0, 1.6.0, 2.3.2, 2.6.0, 2.8.0, 3.1.0, 3.5.0, 3.8.0, 4.3.0, 4.4.0, 4.6.0, 4.7.0 4.8.0 -
Boost 1.72.0 - Boost is not pre-installed on Ubuntu 20.04 image
MySQL 5.7 8.0 See migration guide for more details about breaking changes
SVN 1.9.7 1.13.0 -
Swig 3.0.12 4.0.1 -
libcurl apt package libcurl3 libcurl4 -
Clang 6
8
9 (default)
8
9
10(default)
-

Missing software

Known issues:

Deprecated:

Haskell: https://launchpad.net/~hvr/+archive/ubuntu/ghc-eol

.Net Core

2.2 — EOL December 23, 2019:

3.0 — EOL March 3, 2020:

Azure PowerShell

Each major Go release is supported until there are two newer major releases. For example, Go 1.5 was supported until the Go 1.7 release, and Go 1.6 was supported until the Go 1.8 release. We fix critical problems, including critical security problems, in supported releases as needed by issuing minor revisions

GOLang

Java:

PHP

Android:

jhpratt commented 3 years ago

Why is this being output as a warning? If a user relies on behavior from a specific version, they should be pinning it.

AlenaSviridenko commented 3 years ago

Hi @jhpratt , we have added a warning for those workflows who are using ubuntu-latest to notify about the upcoming change and give a time to check workflows and adjust them if needed beforehand the transition. ubuntu-18.04 is the most popular OS in GitHub Actions and most of the customers are using it by tagging ubuntu-latest, so we should use as many communication channels as possible to reduce the unpredictable impact.

romashko-bo-ma commented 3 years ago

What about node.js lts? Maybe it's worth to add support node.js v14.15.1 (Current LTS) to the next ubuntu-latest?

maxim-lobanov commented 3 years ago

@romashko-bo-ma , Every image (both ubuntu 18.04 and 20.04) have Node.JS 8, 10, 12, 14. You should use setup tasks to switch it:

romashko-bo-ma commented 3 years ago

@romashko-bo-ma , Every image (both ubuntu 18.04 and 20.04) have Node.JS 8, 10, 12, 14. You should use setup tasks to switch it:

@maxim-lobanov We're currently using actions/setup-node... but why not make support of Nodejs LTS out of the box?

maxim-lobanov commented 3 years ago

Actually, all ubuntu images have Node.JS 14 as default: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#language-and-runtime But I suggest continue using actions/setup-node. We often see customers' reports where they are unhappy with unexpected default version updates. This task takes less than seconds to run but will guarantee that you are not broken in ftuure.

desrosj commented 3 years ago

we have added a warning for those workflows who are using ubuntu-latest to notify about the upcoming change and give a time to check workflows and adjust them if needed beforehand the transition.

Thanks for adding this notice!

Would it be possible to add a way to acknowledge or dismiss the notice once a project has verified support with 20.04? With the rollout currently set to take several weeks, and not starting until November 30, that means at least a few months of notices being added when using ubuntu-latest, even if compatibility has already been confirmed.

naubryGV commented 3 years ago

Hi, I'm wondering if this recent change could have bring some issue with ca-certificates: This dockerfile (https://github.com/naubryGV/cpp-clang-check/blob/master/Dockerfile) was working pefectly fine yesterday, but now I'm getting those:

  W: http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease: No system certificates available. Try installing ca-certificates.
  W: http://security.ubuntu.com/ubuntu/dists/focal-security/Release: No system certificates available. Try installing ca-certificates.
  E: The repository 'http://security.ubuntu.com/ubuntu focal-security Release' does not have a Release file.

Not sure if it's the way to report those kind of issues.

romashko-bo-ma commented 3 years ago

Actually, all ubuntu images have Node.JS 14 as default: https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#language-and-runtime But I suggest continue using actions/setup-node. We often see customers' reports where they are unhappy with unexpected default version updates. This task takes less than seconds to run but will guarantee that you are not broken in ftuure.

@maxim-lobanov thanks for reply! Agree, unexpected version upgrade can bring issues.

maxim-lobanov commented 3 years ago

Hi, I'm wondering if this recent change could have bring some issue with ca-certificates: This dockerfile (https://github.com/naubryGV/cpp-clang-check/blob/master/Dockerfile) was working pefectly fine yesterday, but now I'm getting those:

  W: http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease: No system certificates available. Try installing ca-certificates.
  W: http://security.ubuntu.com/ubuntu/dists/focal-security/Release: No system certificates available. Try installing ca-certificates.
  E: The repository 'http://security.ubuntu.com/ubuntu focal-security Release' does not have a Release file.

Not sure if it's the way to report those kind of issues.

This is not related to this issue. I suggest creating new issue.

naubryGV commented 3 years ago

Hi, I'm wondering if this recent change could have bring some issue with ca-certificates: This dockerfile (https://github.com/naubryGV/cpp-clang-check/blob/master/Dockerfile) was working pefectly fine yesterday, but now I'm getting those:

  W: http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease: No system certificates available. Try installing ca-certificates.
  W: http://security.ubuntu.com/ubuntu/dists/focal-security/Release: No system certificates available. Try installing ca-certificates.
  E: The repository 'http://security.ubuntu.com/ubuntu focal-security Release' does not have a Release file.

Not sure if it's the way to report those kind of issues.

This is not related to this issue. I suggest creating new issue.

@maxim-lobanov Will do, thank you.

AlenaSviridenko commented 3 years ago

Hi @desrosj,

Would it be possible to add a way to acknowledge or dismiss the notice once a project has verified support with 20.04?

You can specify a certain version of Ubuntu instead of ubuntu-latest. This warning targets only those workflows who use ubuntu-latest that resolves to 18.04 or to 20.04 and fails during transition period.

But please note, that our main machines capacity is still on Ubuntu-18.04.

desrosj commented 3 years ago

Hi @AlenaSviridenko,

You can specify a certain version of Ubuntu instead of ubuntu-latest.

It's preferable to remain on ubuntu-latest for a few reasons. The notice added here is also a good notifications to test a project against upcoming changes.

Also, changing to use a specific version would mean having to change back to ubuntu-latest later if using latest is preferred.

I was thinking this through, maybe having a secret that could be defined on a repo to suppress these notices (GITHUB_SUPPORTS_UBUNTU_20, or something similar) would be an easy way to "acknowledge" the repo has tested 20.04 and is ready for the transition.

This warning targets only those workflows who use ubuntu-latest that resolves to 18.04 or to 20.04 and fails during transition period.

I am currently seeing the notices appear for successful jobs within workflows. Unless the notice is for all jobs until the transition period begins and will be switched to failures later?

AlenaSviridenko commented 3 years ago

Actually, yes, it is preferable to stay on ubuntu-latest even from our point of view, because we consider the amount of pipelines that are using this tag when we start transition.

Unless the notice is for all jobs until the transition period begins and will be switched to failures later? That is correct. Until the transition begins we show it for all ubuntu-latest workflows. After transition is started - we will show it for those who still resolves to 18.04 or who resolves to 20.04 but fails.

I will check with our engineers if it is possible to suppress notice if 20.04 is tested and verified. Thanks!

cartazio commented 3 years ago

will https://launchpad.net/~hvr/+archive/ubuntu/ghc be used instead for GHC? or whats the inclusion plan?

thnx :)

ezequielramos commented 3 years ago

publishing code coverage(using cobertura) on ubuntu 20.04 seens to be broke on ubuntu 20.04. Can anyone confirm that?

I'm getting this log: image

AlenaSviridenko commented 3 years ago

Hi @cartazio, not sure what do you mean, we are currently installing 3 latest GHC version, please check this code. Do you mean installing some additional versions?

AlenaSviridenko commented 3 years ago

Hi @ezequielramos, we are not pre-installing cobertura for all Ubuntu images, only for Windows images. Could you please confirm that it is the issue with the image and if yes - file a separate issue in our repo, and we will investigate it.

The-Compiler commented 3 years ago

Python2 pip should be installed separately

FWIW, this breaks GitHub's CodeQL action which suggests using ubuntu-latest but needs pip2 without setting it up. I opened a PR over there: https://github.com/github/codeql-action/pull/316

paulboocock commented 3 years ago

The README.md currently states:

The Ubuntu 20.04 virtual environment is currently provided as a preview only.

Is this no longer the case? I assume 20.04 is out of preview if it is becoming ubuntu-latest? I'm trying to decide if I should pin to 18.04 or 20.04, I'd prefer to use the latest stable version.

AlenaSviridenko commented 3 years ago

👋 @paulboocock , correct, as soon as Ubuntu 20.04 will become ubuntu-latest this statement will be removed from docs, but actually it is already stable.

ezequielramos commented 3 years ago

Hi @ezequielramos, we are not pre-installing cobertura for all Ubuntu images, only for Windows images. Could you please confirm that it is the issue with the image and if yes - file a separate issue in our repo, and we will investigate it.

Oh... I guess that's not right. My team is using ubuntu-18.04 for a long time and the cobertura is already pre-installed. In fact, we just changed the image from ubuntu-latest to ubuntu-18.04 and this problem stopped to occur. We are using the task like this, as it is documented on the pipeline documentation, there is nothing there saying about image OS limitation:

          - task: PublishCodeCoverageResults@1
            condition: succeededOrFailed()
            inputs:
              codeCoverageTool: Cobertura
              summaryFileLocation: $(System.DefaultWorkingDirectory)/**/coverage/cobertura-coverage.xml
              reportDirectory: $(System.DefaultWorkingDirectory)/**/coverage
              failIfCoverageEmpty: true

Should I open a separate issue for you to investigate it?

AlenaSviridenko commented 3 years ago

@ezequielramos , hmm, that's interesting, ubuntu-latest still resolves to ubuntu-18.04, because transition hasn't started yet, I am not sure how image label change could help here. Anyway, this seems to be more related to how PublishCodeCoverageResults task works on different OS versions, and we do not own these tasks, so I think you need to file an issue for Azure Pipelines Tasks team in their repo for investigation https://github.com/microsoft/azure-pipelines-tasks/issues

ezequielramos commented 3 years ago

@AlenaSviridenko well, that's interesting indeed. I'll open an issue for Azure Pipelines Tasks team. Thank you for your attention! :relaxed:

JimmyBanks commented 3 years ago

Will this update coincide with Ubuntu 20.04-LTS as a Base image option under the Deployment Inputs within Pipelines Tasks->Build Immutable Machine Image? Or are these completely separate from one another.

AlenaSviridenko commented 3 years ago

Hi @JimmyBanks, yes, ubuntu-20.04 as an immutable image in build options and ubuntu-20.04 that ubuntu-latest will point to - are the same images if that is what you mean.

JimmyBanks commented 3 years ago

Hi @JimmyBanks, yes, ubuntu-20.04 as an immutable image in build options and ubuntu-20.04 that ubuntu-latest will point to - are the same images if that is what you mean.

Thank you, in that case should Ubuntu 20.04 not be a selectable Base image during preview for testing? My team updated the pipeline YAML specification to vmImage: 'ubuntu-20.04'; however, the OS being installed on our VM image remains to be 18.04, which we believe is due to the Gallery Base Image options having 18.04 as the latest selectable option available (I've attached an image as an example).

Screen Shot 2020-11-27 at 08 49 30

As you can see, we cannot select 20.04 to test against.

aannenko commented 3 years ago

Should we expect .NET 5 preinstalled on 20.04?

maxim-lobanov commented 3 years ago

Should we expect .NET 5 preinstalled on 20.04?

Yes, .NET 5 support will come to 20.04 at the same time with 18.04

samirm00 commented 3 years ago

Node.js CI / build (14.x) on Ubuntu 20.04

AlenaSviridenko commented 3 years ago

@samirm00 , Node.js 14.x is currently a default Node.js version on ubuntu-20.04.

steved0x commented 3 years ago

When ubuntu-latest fully rolls out, can you add a link to this GH issue (the differences between 18.04 and 20.04) to the 20.04 readme?

AlenaSviridenko commented 3 years ago

Hi @steved0x , Ubuntu 20.04 README already contains this link. We are usually keeping announcements in README 1 week after full deployment, but if it is needed we can keep this issue 2 weeks after the deployment.

saitho commented 3 years ago
  • Ansible should be installed from the official Ubuntu repo, ppa:ansible/ansible isn't updated yet

Not sure why they haven't been able to publish a proper repo for Ubuntu 20 yet... I'm installing Ansible 2.10 via pip on my Ubuntu 20 system. Works fine, but I guess that may be a different story for keeping dependencies up-to-date.

dsvi commented 3 years ago

It seems like Ubuntu 18.04 has Clang 6 by default, not 9

al-cheb commented 3 years ago

@dsvi, clang-9 is set by default on Ubuntu-18.04: image

image

dsvi commented 3 years ago

nope. apt-get clang gives you this: image

al-cheb commented 3 years ago

nope. apt-get clang gives you this: image

The default tag for clang in ubuntu official repo is clang-6, but the default clang version on the image is set to clang-9.

$ sudo apt-cache madison clang
     clang | 1:6.0-41~exp5~ubuntu1 | http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
     clang | 1:6.0-41~exp4 | http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
$ sudo apt-cache madison clang-6.0
 clang-6.0 | 1:6.0-1ubuntu2 | http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
ben-hamelin commented 3 years ago

Ran into an error this morning, composer dependency issue with PHP version. It seems as thought ubuntu-latest was actually bringing in PHP 8, where as the software difference table above indicates it will be PHP 7.4. Can anyone confirm this? Forcing ubuntu-18.04 resolved the issue for us.

maxim-lobanov commented 3 years ago

PHP 8.0 is added to all Ubuntu images. Looks like Ubuntu 20.04 is deployed a bit earlier so you have noticed it: https://github.com/actions/virtual-environments/pull/2240/files#diff-6be9f9ce03ba57ca01e4ae937d5c2bb04893520fdf391ea87eb46acbc43ecdc5L115 PHP 8.0 is available on image side by side with php 7.x so you can use any of them.

meadowsys commented 3 years ago

any possibility of adding pnpm as a package manager?

maxim-lobanov commented 3 years ago

@autumnblazey , feel free to raise separate issue as feature request and we will consider it.

Hello everyone! If you see any new issues with Ubuntu 20.04 or feature requests, please create separate issues in this repository.

AlenaSviridenko commented 3 years ago

Thanks @ben-hamelin for noticing PHP 8.0 is not in the table, updated it to not confuse others in the future.

madsem commented 3 years ago

PHP 8.0 is available on image side by side with php 7.x so you can use any of them.

How would one do that? I can't seem to find how to use specific software versions in a workflow, but I need to use 7.4 for the moment being and all my CI tests fail cause default version is now PHP 8.0.0

jobs:
  laravel:
    name: Laravel Testsuite
    runs-on: ubuntu-20.04
    steps:
    ...
maxim-lobanov commented 3 years ago

@madsem , If you need to use specific version of PHP, you should specify it as phpx.y, examples: php7.4, php8.0. Alias php is just symlink to latest version so it is expected that it is updated when new version is released. I have posted some additional info in https://github.com/actions/virtual-environments/pull/2162#issuecomment-747248199

datashaman commented 3 years ago

Adding this step to your workflow using ubuntu-latest will ensure version 7.4 is used by default:

   steps:
      - name: Set default PHP7.4
        run: sudo update-alternatives --set php /usr/bin/php7.4
jsoref commented 3 years ago

fwiw, I'm pretty sure jq changes from 1.5 to 1.6. This is fairly notable as 1.6 adds some key features.

potiuk commented 3 years ago

Hello. Any news when 'latest' switch to 20.04 eventually ? We've switched to hard-coded 20.04 in October and would love to switch back to latest. Or maybe the recommendation is to continue using 20.04 and you will warn people in the future when new version is available ?

maxim-lobanov commented 3 years ago

Hello @potiuk , migration is still in progress (it was suspended during holidays). I don't see drawbacks to continue using ubuntu-20.04 label after migration and you won't need to worry that "latest" will be changed and will break your builds unexpectedly. Since we add only LTS Ubuntu releases to GitHub Action, images are added rarely (the next should be in April 2022, 22.04 😄 ) and we will notify about it in GitHub blog.

juhp commented 3 years ago

Deprecated:

Haskell: https://launchpad.net/~hvr/+archive/ubuntu/ghc-eol

I think the ghc-eol ppa is just a archive for older builds and retired Ubuntu releases (ppa's seem limited to 32GB). So ghc-eol is not really relevant: Ubuntu LTS releases like 18.04 and 20.04 are supported for 5 years.

* ghc-8.0.2 (incorrect!)
* ghc-8.2.2 (incorrect!)
* ghc-8.4.4 (incorrect!)
* ghc-8.6.2
* ghc-8.6.3
* ghc-8.6.4
* ghc-8.8.1
* ghc-8.8.2
* cabal-install-2.0 
* cabal-install-2.2
* cabal-install-2.4 (incorrect!)
* cabal-install-3.0 (incorrect!)

As anotated above I think this is not accurate: see https://launchpad.net/~hvr/+archive/ubuntu/ghc/+packages?field.name_filter=&field.status_filter=published&field.series_filter=focal

I am not a Ubuntu user but AFAICS cabal-install-2.4 and 3.0 are still available (3.0 is not that old - current stable is 3.2). For ghc: 8.0.2, 8.2.2, and 8.4.4 all seem available still too in the PPA.

(I just finally started used GitHub Actions today, so sorry for all the hoohaa! ;o) It's pretty cool.

Well I guess @hvr could even confirm this himself.