Skip to content

ci: Install Tier 2 Packages retries on the same slow apt mirror until the step's 10-minute limit #5518

Closed

Description

@rdoupe

Problem

The Tier 2 Linux build's Install Tier 2 Packages 📦 step retries its install against the same apt mirror every time. #5510 (#5513) made Install Git 📦 and the runtime delta install move to another mirror on each attempt, but this step never got that change, though #5510 listed it. Install Git 📦 stops on the first mirror that answers, and the package step then downloads its ~400 packages from that mirror whatever its speed.

On 2026-11-23 the AWS-hosted runners' own mirror (http://us-east-2.ec2.archive.ubuntu.com/ubuntu/) answered, but slowly: small packages took 4 to 12 s each. In both runs below, attempt 1 hit its 300 s bound part-way through the downloads, attempt 2 resumed on the same mirror, and the step's 10-minute limit ended the job:

Both queue entries' Tier 2 builds failed for this alone.

Fix

Install Git 📦 keeps the mirror order it computed, and each retry of Install Tier 2 Packages 📦 after the first points ubuntu.sources at the next mirror in that order and refetches the index before it installs. The .debs attempt 1 already downloaded stay in the job's archive directory, so attempt 2 fetches only the rest. Jobs with no rotation (prebaked image, a sources file without the security stanza) keep today's behaviour.

Tests

RED: a case in ci/test_tier2_apt_cache.py runs the step's real shell with mocked sudo/apt and a mirror list from Install Git 📦, fails the first install, and checks that the second attempt names the next mirror and runs apt-get update before installing. Today the second attempt never changes the source, so the case fails.

Activity

  1. added
    bug
    on Nov 23, 2026
  2. rdoupe commented on Nov 23, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: I'll fix this in the build job's two apt steps and ci/test_tier2_apt_cache.py, RED then GREEN. It blocks my PRs #5512 and #5516.

  3. added
    ready
    on Nov 23, 2026
  4. added a commit that references this issue on Nov 29, 2026
    f97bee2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions