Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 31, 2025

The apt-get installation of azure-functions-core-tools-4 is failing with mirror sync errors causing file size mismatches on Ubuntu runners.

Changes

  • Replace apt-get with npm installation in .github/workflows/run-tests.yml
  • Replace apt-get with npm installation in .github/workflows/tests-runner.yml (2 instances)

Before:

run: |
  sudo apt-get update
  sudo apt-get install -y azure-functions-core-tools-4

After:

run: |
  npm i -g azure-functions-core-tools@4 --unsafe-perm true

This uses the official npm installation method documented in the Azure Functions Core Tools repository.

Original prompt

The functions package is failing download from apt:

Run sudo apt-get update
Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [144 B]
Hit:2 http://azure.archive.ubuntu.com/ubuntu noble InRelease
Get:6 https://packages.microsoft.com/repos/azure-cli noble InRelease [3564 B]
Get:7 https://packages.microsoft.com/ubuntu/24.04/prod noble InRelease [3600 B]
Get:3 http://azure.archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Get:4 http://azure.archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Get:5 http://azure.archive.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Get:8 https://packages.microsoft.com/repos/azure-cli noble/main amd64 Packages [1629 B]
Get:9 https://packages.microsoft.com/ubuntu/24.04/prod noble/main arm64 Packages [48.7 kB]
Get:10 https://packages.microsoft.com/ubuntu/24.04/prod noble/main amd64 Packages [65.9 kB]
Get:11 https://packages.microsoft.com/ubuntu/24.04/prod noble/main armhf Packages [11.1 kB]
Get:12 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages [1545 kB]
Get:13 http://azure.archive.ubuntu.com/ubuntu noble-updates/main Translation-en [294 kB]
Get:14 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 Components [175 kB]
Get:15 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 c-n-f Metadata [15.4 kB]
Get:16 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Packages [1498 kB]
Get:17 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe Translation-en [303 kB]
Get:18 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 Components [378 kB]
Get:19 http://azure.archive.ubuntu.com/ubuntu noble-updates/universe amd64 c-n-f Metadata [31.4 kB]
Get:20 http://azure.archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Packages [2175 kB]
Get:21 http://azure.archive.ubuntu.com/ubuntu noble-updates/restricted Translation-en [490 kB]
Get:22 http://azure.archive.ubuntu.com/ubuntu noble-updates/restricted amd64 Components [212 B]
Get:23 http://azure.archive.ubuntu.com/ubuntu noble-updates/restricted amd64 c-n-f Metadata [516 B]
Get:24 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Packages [30.3 kB]
Get:25 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse Translation-en [5564 B]
Get:26 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 Components [940 B]
Get:27 http://azure.archive.ubuntu.com/ubuntu noble-updates/multiverse amd64 c-n-f Metadata [484 B]
Get:28 http://azure.archive.ubuntu.com/ubuntu noble-backports/main amd64 Components [7148 B]
Get:29 http://azure.archive.ubuntu.com/ubuntu noble-backports/universe amd64 Components [11.0 kB]
Get:30 http://azure.archive.ubuntu.com/ubuntu noble-backports/restricted amd64 Components [216 B]
Get:31 http://azure.archive.ubuntu.com/ubuntu noble-backports/multiverse amd64 Components [212 B]
Get:32 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Packages [1270 kB]
Get:33 http://azure.archive.ubuntu.com/ubuntu noble-security/main Translation-en [211 kB]
Get:34 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Components [21.5 kB]
Get:35 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 c-n-f Metadata [9008 B]
Get:36 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 Packages [905 kB]
Get:37 http://azure.archive.ubuntu.com/ubuntu noble-security/universe Translation-en [203 kB]
Get:38 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 Components [52.2 kB]
Get:39 http://azure.archive.ubuntu.com/ubuntu noble-security/universe amd64 c-n-f Metadata [19.4 kB]
Get:40 http://azure.archive.ubuntu.com/ubuntu noble-security/restricted amd64 Packages [2080 kB]
Get:41 http://azure.archive.ubuntu.com/ubuntu noble-security/restricted Translation-en [470 kB]
Get:42 http://azure.archive.ubuntu.com/ubuntu noble-security/restricted amd64 Components [208 B]
Get:43 http://azure.archive.ubuntu.com/ubuntu noble-security/restricted amd64 c-n-f Metadata [500 B]
Get:44 http://azure.archive.ubuntu.com/ubuntu noble-security/multiverse amd64 Packages [27.4 kB]
Get:45 http://azure.archive.ubuntu.com/ubuntu noble-security/multiverse Translation-en [5708 B]
Get:46 http://azure.archive.ubuntu.com/ubuntu noble-security/multiverse amd64 Components [208 B]
Get:47 http://azure.archive.ubuntu.com/ubuntu noble-security/multiverse amd64 c-n-f Metadata [384 B]
Fetched 12.7 MB in 2s (7925 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
azure-functions-core-tools-4
0 upgraded, 1 newly installed, 0 to remove and 43 not upgraded.
Need to get 419 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://packages.microsoft.com/ubuntu/24.04/prod noble/main amd64 azure-functions-core-tools-4 amd64 4.3.0-1 [419 MB]
Err:1 https://packages.microsoft.com/ubuntu/24.04/prod noble/main amd64 azure-functions-core-too...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Change from apt-get to npm installation method to avoid package mirror sync issues
- Updated .github/workflows/run-tests.yml
- Updated .github/workflows/tests-runner.yml (2 locations)
- Uses official npm installation: npm i -g azure-functions-core-tools@4 --unsafe-perm true

Co-authored-by: davidfowl <95136+davidfowl@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix functions package download issue from apt Replace apt-get with npm for Azure Functions Core Tools installation Oct 31, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 31, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12537

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12537"

@davidfowl davidfowl marked this pull request as ready for review October 31, 2025 02:58
Copilot AI review requested due to automatic review settings October 31, 2025 02:58
@davidfowl davidfowl enabled auto-merge (squash) October 31, 2025 02:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the installation method for Azure Functions Core Tools in GitHub Actions workflows from using apt-get to using npm. The change affects Linux test runners by replacing the system package manager approach with a global npm installation.

Key Changes

  • Replaced apt-get installation commands with npm global installation for Azure Functions Core Tools v4
  • Applied the same installation method change across three workflow instances
  • Added --unsafe-perm true flag to the npm installation command

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/tests-runner.yml Updated Azure Functions Core Tools installation method in two test job definitions (lines 120 and 181)
.github/workflows/run-tests.yml Updated Azure Functions Core Tools installation method in the reusable test workflow (line 183)

@davidfowl davidfowl merged commit 5a9a229 into main Oct 31, 2025
303 of 306 checks passed
@davidfowl davidfowl deleted the copilot/fix-functions-package-download branch October 31, 2025 03:02
@dotnet-policy-service dotnet-policy-service bot added this to the 13.0 milestone Oct 31, 2025
@davidfowl
Copy link
Member

/backport to release/13.0

@github-actions
Copy link
Contributor

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18961577139

@davidfowl
Copy link
Member

cc @radical FYI

@github-actions github-actions bot locked and limited conversation to collaborators Nov 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants