-
Notifications
You must be signed in to change notification settings - Fork 770
Replace apt-get with npm for Azure Functions Core Tools installation #12537
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
Conversation
- 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>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12537Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12537" |
There was a problem hiding this 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-getinstallation commands withnpmglobal installation for Azure Functions Core Tools v4 - Applied the same installation method change across three workflow instances
- Added
--unsafe-perm trueflag 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) |
|
/backport to release/13.0 |
|
Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18961577139 |
|
cc @radical FYI |
The apt-get installation of
azure-functions-core-tools-4is failing with mirror sync errors causing file size mismatches on Ubuntu runners.Changes
.github/workflows/run-tests.yml.github/workflows/tests-runner.yml(2 instances)Before:
After:
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.