Skip to content

Demote the Azure apt mirror on Blacksmith runners too - #935

Merged
sargunv merged 1 commit into
mainfrom
ci/demote-azure-blacksmith-mirrors
Oct 22, 2026
Merged

sargunv merged 1 commit into
mainfrom
ci/demote-azure-blacksmith-mirrors

Conversation

@sargunv

@sargunv sargunv commented Oct 22, 2026

Copy link
Copy Markdown
Member

The hygiene job on #932 timed out because jdx/mise-action spent 21 of its 30 minutes in one apt-get install. Every package came from azure.archive.ubuntu.com at tens of kB/s, and libclang-18-dev (28.8 MB) took 9 minutes before apt gave up and fetched it again (log).

bound-apt.sh already exists to avoid that mirror, but it only demotes Azure in GitHub's /etc/apt/apt-mirrors.txt. Blacksmith x64 runners read /etc/apt/blacksmith-ubuntu-mirrors.txt instead: apt's first fetch in that job was Get:1 file:/etc/apt/blacksmith-ubuntu-mirrors.txt Mirrorlist. The edit landed in a file that apt never read.

The script now demotes Azure in either list, using the same mirror+file format (a URL, then tab-separated priority:N, lower first):

  • An Azure line with a priority moves to priority:9. One without a priority gets priority:9 appended.
  • A list that has Azure but no archive.ubuntu.com gets https://archive.ubuntu.com/ubuntu/ priority:2, so apt has a mirror to fail over to.
  • Both lists are printed, so the job log shows what apt reads on either runner.

The edit also stopped using sed 's/priority:1/priority:9/', which rewrote every priority:1 in the file, including priority:10, not just Azure's line.

Validation outside CI: I ran the loop against four sample lists with macOS awk: GitHub's current list, an Azure-only list without a priority, Azure beside another mirror, and a list without Azure. Each came out as described above. I haven't seen the contents of Blacksmith's list, because the old script never printed it; this PR's CI log will show it.

AI-assisted — Tool: Claude Code; model: Anthropic/claude-opus-5-5

Blacksmith x64 runners read /etc/apt/blacksmith-ubuntu-mirrors.txt rather than GitHub's /etc/apt/apt-mirrors.txt, so the existing demotion never reached them, and a crawling Azure mirror spent 21 minutes of the hygiene job on one apt-get install. Demote Azure in either list, add archive.ubuntu.com when it is the only mirror, and print both lists.
@rubberstamp-bot rubberstamp-bot Bot added area:tooling Build, CI, packaging, publishing, releases, and dependency management. bug Correct broken behavior or a violated contract. platform:linux Linux-specific behavior, reproduction, or implementation. labels Oct 22, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T19:51:53.062158Z 3ab8dff PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@sargunv
sargunv merged commit d689531 into main Oct 22, 2026
39 checks passed
@sargunv
sargunv deleted the ci/demote-azure-blacksmith-mirrors branch October 22, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tooling Build, CI, packaging, publishing, releases, and dependency management. bug Correct broken behavior or a violated contract. platform:linux Linux-specific behavior, reproduction, or implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant