Skip to content

ci: drop the runner's Microsoft apt repos before installing packages - #718

Merged
axpnet merged 1 commit into
mainfrom
fix/ci-apt-microsoft-403
Sep 3, 2026
Merged

ci: drop the runner's Microsoft apt repos before installing packages#718
axpnet merged 1 commit into
mainfrom
fix/ci-apt-microsoft-403

Conversation

@axpnet

@axpnet axpnet commented Sep 3, 2026

Copy link
Copy Markdown
Member

Description

packages.microsoft.com answers 403 Forbidden on the InRelease files of the two repositories the runner image preinstalls, repos/azure-cli and ubuntu/24.04/prod, often enough to redden a run at random. apt-get update exits 100 when any configured source fails to verify, so the step dies before a line of this repository's code has run. It happened on main right after #717 merged: the Delta Sync Integration lane failed at "Install system dependencies" in the password-only job, three attempts in a row, while the sibling job in the same run had passed the same step minutes earlier, and a re-run of the failed job went green with nothing changed.

Nothing here installs from those repositories. The only mentions of Microsoft packages in the workflows are the rm -rf /usr/share/dotnet lines that free disk space. So the twenty places that run sudo apt-get update now drop those two source lists first, and only those: the Ubuntu archives and the Chrome repository the image also ships are left alone.

The removal cannot fail a step on its own. rm -f returns success when a glob matches nothing, so a future runner image that stops shipping those files changes nothing here, and there is no pipeline for a set -o pipefail to trip on. Every one of the twenty sites sits inside a Linux-only step, guarded either by runner.os == 'Linux' or by a matrix target, and runs under bash.

This pull request verifies itself: its own CI runs with the change in place, so a green run is the evidence that the twenty edits are well formed. The YAML of all thirteen workflows was also parsed locally.

Retrying was already in place where it matters and did not help, because the outage outlived the three attempts. The trap is now entry 15 of the recurring CI-red checklist, with the instruction to add the same line to any new workflow step that installs a package.

Type of Change

  • CI reliability, no product code
  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • My code follows the project's code style
  • I have tested my changes
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • Every commit is signed off (git commit -s), see CONTRIBUTING

Related Issues

None. Follows the red seen on main at 50bcd412e after #717.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the reliability of Linux-based automated checks and builds by preventing unavailable Microsoft and Azure CLI package repositories from interrupting dependency installation.
    • Reduced workflow failures caused by repository access errors during package updates across integration, smoke-test, telemetry, desktop, and snap validation jobs.

`packages.microsoft.com` answered 403 Forbidden on the `InRelease` files of both repos the runner image preinstalls, `repos/azure-cli` and `ubuntu/24.04/prod`, and `apt-get update` exits 100 when any configured source fails to verify. That reddened the Delta Sync Integration lane on main at the "Install system dependencies" step, three attempts in a row, before a line of our own code had run. The sibling job in the same run passed the same step a few minutes earlier, so it is intermittent, and a re-run of the failed job went green with nothing changed.

Nothing in this repository installs from those repos. The only mentions of Microsoft packages in the workflows are `rm -rf /usr/share/dotnet` lines that free disk space. So the twenty places that run `sudo apt-get update` now remove those two source lists first, and only those: the Ubuntu archives and the Chrome repo the image also ships stay where they are.

The removal cannot itself fail a step: `rm -f` returns success when a glob matches nothing, so a future runner image that stops shipping those files changes nothing here. Every one of the twenty sites is inside a Linux-only step, either guarded by `runner.os == 'Linux'` or by a matrix target, and runs under bash.

This is a lane-flake class, not a bug in the runner image we can wait out: the same 403 will come back, and every workflow that installs a package is exposed to it. The alternative, retrying, is already in place where it matters and did not help, because the outage lasted longer than the three attempts.

Signed-off-by: axpnet <45786925+axpnet@users.noreply.github.com>
@snyk-io

snyk-io Bot commented Sep 3, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 0009f42f-7d24-4fbb-bba5-2ca21a6f353f

📥 Commits

Reviewing files that changed from the base of the PR and between 50bcd41 and bf34540.

📒 Files selected for processing (8)
  • .github/workflows/aerorsync-protocol.yml
  • .github/workflows/build.yml
  • .github/workflows/cli-smoke.yml
  • .github/workflows/delta-sync-integration.yml
  • .github/workflows/ftp-mlsd.yml
  • .github/workflows/nightly-telemetry.yml
  • .github/workflows/portal-chooser.yml
  • .github/workflows/snap-refresh.yml

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

CI workflow dependency steps now remove Microsoft and Azure CLI APT source files before running apt-get update.

Changes

CI APT source cleanup

Layer / File(s) Summary
Dependency installation updates
.github/workflows/aerorsync-protocol.yml, .github/workflows/cli-smoke.yml, .github/workflows/delta-sync-integration.yml, .github/workflows/ftp-mlsd.yml, .github/workflows/nightly-telemetry.yml, .github/workflows/portal-chooser.yml
Linux dependency steps remove Microsoft and Azure CLI APT source files before updating package indexes.
Build and packaging updates
.github/workflows/build.yml, .github/workflows/snap-refresh.yml
Build and snap packaging steps remove Microsoft and Azure CLI APT source files before updating package indexes.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to bf345

CI dependency steps now avoid intermittent Microsoft APT repository failures while preserving the Ubuntu and Chrome repositories and existing package installation sequence. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: removing the runner's Microsoft APT repositories before package installation across CI workflows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (8 skipped: 8 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-apt-microsoft-403

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@axpnet
axpnet merged commit 39ddc99 into main Sep 3, 2026
27 checks passed
@axpnet
axpnet deleted the fix/ci-apt-microsoft-403 branch September 3, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant