ci: install git in stock-Ubuntu baseline job#4847
Conversation
The nodeJsBaselineAptCompatibility job runs `apt install --yes nodejs npm` in an ubuntu:26.04 container. The test suite bootstraps throwaway repos via `git init`, and the git binary only ever arrived as an apt Recommends of the npm chain — never a hard dependency. On 2026-06-25 that broke: with the identical image digest and identical nodejs 22.22.1 / npm 9.2.0, apt stopped installing Recommends (logging `Recommended packages: build-essential git ...` and skipping them), so git was absent and ~189 git-dependent tests errored. Same commit had passed the day before — purely an environment shift in the fast-moving 26.04 archive. Install git explicitly so the job no longer relies on an un-guaranteed Recommends default. This stays in the spirit of the job (stock apt packages, no actions/setup-node); git is a standard system tool, not a Node shortcut. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
Confidence Score: 5/5Safe to merge — a single-line CI fix that adds an explicit The change is surgical: one extra package name on an existing No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "ci: install git in stock-Ubuntu baseline..." | Re-trigger Greptile |
Problem
The
nodeJsBaselineAptCompatibilityCI job ("NodeJS installed from stock Ubuntu-LTS packages") has been red onmastersince 2026-06-25, failing with ~189 errors acrossconfig-*-scopes,load,cli,get-edit-commit, and find-up tests.It is not caused by any code change. The same commit (
d4a79621) passed on 2026-06-24 and failed on 2026-06-25 with identical code.Root cause
The job runs
apt install --yes nodejs npminside anubuntu:26.04container. The test suite bootstraps throwaway repos viagit init, but thegitbinary only ever arrived as an apt Recommends of the npm chain — never a hard dependency.Comparing the last green run to the first red run:
d4a79621d4a79621(same)ubuntu:26.04image digestsha256:5395…ffdbasha256:5395…ffdba(same)gitpresentOn the red run apt simply stopped installing the recommended set, logging:
ubuntu:26.04is a fast-moving archive (gcc-15, perl 5.40, python 3.14) refreshed byapt updateon every run, so Recommends resolution is not stable day-to-day. The job was silently relying on an un-guaranteed default.(Side note:
actions/checkouthere always uses the REST API fallback — the container is bare at checkout time — so this is unrelated to checkout; the tests create their own repos.)Fix
Install
gitexplicitly so the job no longer depends on an incidental Recommends. This stays in the spirit of the job (stock apt packages, noactions/setup-node);gitis a standard system tool, not a Node toolchain shortcut.Verification
The previously-failing job passes on this branch: the
nodeJsBaselineAptCompatibilityjob concluded success on the push run forfix/ci-stock-ubuntu-missing-git.🤖 Generated with Claude Code