Skip to content
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

Ubuntu: Document requirement to always run "apt-get update" before install #2924

Closed
4 tasks
marc-hb opened this issue Mar 14, 2021 · 3 comments
Closed
4 tasks
Assignees
Labels
documentation Improvements or additions to documentation OS: Ubuntu

Comments

@marc-hb
Copy link

marc-hb commented Mar 14, 2021

Description

This is a documentation gap/"bug".

As explained in #1757, virtual environments are carefully version controlled to make test results reliable and predictable. They do not include the very latest software as soon as it is released by Ubuntu but only some time later after some image validation first.

As an unfortunate side-effect, the apt package indexes in virtual environments can point at old (and insecure?) package dependencies that have been removed by Ubuntu, which means apt-get install commands can fail. See several examples in #1757

The fix/workaround is of course that everyone must run apt-get update before any apt-get install, however this is not documented and should be, hence this issue.

It is IMHO important to document this apt-get update requirement because it's not obvious:

  • Many (most?) other Ubuntu installations run apt-get update in the background and do not have this requirement.

  • It's a bit confusing because virtual environments are updated from time to time, just more slowly. This makes apt-get install failures unpredictable, they come and go for no obvious reason. See examples in Update Ubuntu images packages more frequently and/or run "sudo apt update && sudo apt upgrade" as part of job setup #1757

  • Each worflow of each project running apt-get update takes some time (~10s?) and is a massively duplicated effort that would be much more efficient at the image level - without affecting test results predictability. apt-get update has no effect on test results unless you actually apt-get install something (and then you can forget about determinism anyway).

Area for Triage:
Containers or Packages?
( See https://github.com/actions/virtual-environments/tree/main/triage-rules.yml for areas)

Question, Bug, or Feature?:
Documentation gap/"bug"?

(Choose "Question", "Bug", or "Feature" )

Virtual environments affected

  • [ x ] Ubuntu 16.04
  • [ x ] Ubuntu 18.04
  • [ x ] Ubuntu 20.04
  • macOS 10.15
  • macOS 11.0
  • Windows Server 2016 R2
  • Windows Server 2019

Image version

Version: 20210309.1

Expected behavior
More documentation.

Actual behavior
Less documentation.

Repro steps

  1. Step 1 Read documentation
  2. Step 2 Do not find information in documentation
@maxim-lobanov
Copy link
Contributor

Just an update, we are working with docs team on updating GH documentation.

glebm added a commit to od-contrib/commander that referenced this issue Apr 12, 2021
@marc-hb
Copy link
Author

marc-hb commented Apr 27, 2021

Perfect, thank you @maxim-lobanov

kmk3 added a commit to kmk3/firejail that referenced this issue Mar 21, 2023
This should fix installing packages on build-extra.yml.

Note that this is already done on build.yml and on gitlab-ci.yml.

From the GitHub Actions documentation[1] [2]:

> Note: Always run `sudo apt-get update` before installing a package. In
> case the `apt` index is stale, this command fetches and re-indexes any
> available packages, which helps prevent package installation failures.

[1] https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners
[2] actions/runner-images#2924
pbatard added a commit to pbatard/ntfs-3g that referenced this issue May 20, 2023
pbatard added a commit to pftf/pitf that referenced this issue May 24, 2023
* Also fix GitHub Actions 404 errors when running apt install (See actions/runner-images#2924)
donno2048 added a commit to donno2048/snake that referenced this issue Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

3 participants