Skip to content

CI: every job fails in "Install system build deps" when apt-get update hits a broken third-party repo #517

Description

@justin13888

Symptom

Every CI job except Format & Metadata fails after ~45 s, in the first step, on any branch pushed right now. Observed on PR #485 at cce9939 — a documentation-only commit — and reproduced by re-running the failed jobs (run 34385096443, both attempts).

Err:24 https://dl.google.com/linux/chrome-stable/deb stable/main amd64 Packages
E: Failed to fetch https://dl.google.com/linux/chrome-stable/deb/dists/stable/main/binary-amd64/Packages.gz  Hash Sum mismatch
E: Some index files failed to download. They have been ignored, or old ones used instead.
##[error]Process completed with exit code 100.

and then, in every later step:

sccache: command not found
##[error]Process completed with exit code 127.

Cause

The step is

run: sudo apt-get update && sudo apt-get install -y pkg-config

apt-get update returns exit 100 when any configured source fails, even though the sources gamut needs updated fine. The failing source is the Google Chrome repository preinstalled on the GitHub-hosted ubuntu runner image — a repo this project does not use. Because the step is &&-chained under bash -e, the non-zero status aborts the step, pkg-config/mise/sccache never install, and every subsequent step dies with sccache: command not found (127).

The same workflow succeeded at c59df6f three days earlier, so nothing in the repository changed; the runner image's third-party package list did.

Fix shape

Make the step depend only on the sources it needs, rather than on every source the image ships. Any of:

  • drop the third-party lists before updating — sudo rm -f /etc/apt/sources.list.d/google-chrome.list (and/or microsoft-prod.list) — then apt-get update;
  • restrict the refresh to the Ubuntu archive with apt-get update -o Dir::Etc::sourcelist=/etc/apt/sources.list -o Dir::Etc::sourceparts=-;
  • or tolerate a partial refresh (sudo apt-get update || true) and let apt-get install -y pkg-config be the step that must succeed — it is the actual requirement, and it fails loudly if the archive really is unreachable.

The last is the smallest change and keeps the real dependency as the gate.

Why this is filed rather than fixed

It needs an edit to .github/workflows/, which was outside the manifest of the run that hit it. Until it lands, no pull request can show green required checks, regardless of its contents.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions