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: speed up updating packages #10089

Open
6 of 14 tasks
chipitsine opened this issue Jun 18, 2024 · 1 comment
Open
6 of 14 tasks

Ubuntu: speed up updating packages #10089

chipitsine opened this issue Jun 18, 2024 · 1 comment

Comments

@chipitsine
Copy link

Description

microsoft package adds feeds for three architectures

deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/ubuntu/24.04/prod noble main

which adds some overhead for "apt-get update"

image

for every single run it's about 0 or 1 seconds.

but I guess that Github can benefit from it at a scale.

the following patch should limit feed to current arch only

diff --git a/images/ubuntu/scripts/build/install-ms-repos.sh b/images/ubuntu/scripts/build/install-ms-repos.sh
index b4a56e8b..5b8280be 100644
--- a/images/ubuntu/scripts/build/install-ms-repos.sh
+++ b/images/ubuntu/scripts/build/install-ms-repos.sh
@@ -10,6 +10,12 @@ os_label=$(lsb_release -rs)
 wget https://packages.microsoft.com/config/ubuntu/$os_label/packages-microsoft-prod.deb
 dpkg -i packages-microsoft-prod.deb

+#
+# limit packages feed to current arch, speed up "apt-get update"
+#
+arch=$(dpkg --print-architecture)
+echo "APT::Architecture=${arch};" > /etc/apt/apt.conf.d/99arch
+
 # update
 apt-get install apt-transport-https ca-certificates curl software-properties-common
 apt-get update

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

any Ubuntu

Is it regression?

nope

Expected behavior

use only required feed

Actual behavior

all feed ised

Repro steps

run "apt-get update" from pipeline

@RaviAkshintala
Copy link

@chipitsine Thank you for bringing this issue to us. We are looking into this issue, we will update you on this issue after investigating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants