Skip to content

install-script's required check names embed a container image tag, so any image bump orphans three required contexts #572

Closed

Description

@scttfrdmn

Summary

Three required status checks embed a container image tag and a package-manager command line in their
names:

install-script (opensuse/leap:15.6, tar, zypper -q -n install tar gzip)
install-script (rockylinux:9)
install-script (ubuntu:24.04, curl or wget, apt-get update -qq && apt-get install -y -qq wget)

Those strings are pinned literally in branch protection on main. Editing any part of the matrix row
that produces one — bumping Leap 15.6 to 16, moving rockylinux:9 to the maintained
rockylinux/rockylinux:9 location, adding a package to a zypper/apt-get line — renames the check.
A renamed required check never reports, so every pull request blocks forever with nothing red to
point at
, which is the failure mode #512 and the ci.yml header comment are both about.

Why the existing guard does not catch it

TestRequiredChecksStillHaveAJobToReportThem strips the (...) suffix before matching, so it
asserts the base job still exists. It cannot see a matrix cell being renamed. All three rows
collapse to install-script, which will still be there after any of the edits above.

This is not a criticism of the strip — without it the test could not check a matrix job at all, since
the cell names are interpolated at runtime and are not in the YAML. The gap is real either way.

The fix, and why it is not in #573

modulefiles already solved this for itself, and its reasoning is the template
(release_gate_test.go):

The suffix strip applies to the declared name too, because a matrix job's name is interpolated:
modulefiles sets name: modulefiles ( + matrix.system + ) deliberately, so that its two
required contexts do not carry the absolute interpreter path that the default name would have put
in them and that a distro can move.

Exactly the same argument applies here: an image tag is a thing that moves, and it should not be in
the name a repository setting is pinned to. Give the job an explicit name: keyed on a stable
identifier — add a distro: opensuse | rocky | ubuntu field to each matrix row and set
name: install-script (${{ matrix.distro }}).

This was deliberately left out of #573 because it renames a required check, and branch protection
is a repository setting rather than something this repository changes from code.
Doing it needs two
things in the same change:

  1. The name: addition plus the three updated entries in requiredChecks.
  2. A maintainer running, after the PR merges:
gh api -X PATCH repos/scttfrdmn/objectfs/branches/main/protection/required_status_checks \
  -f 'contexts[]=install-script (opensuse)' \
  -f 'contexts[]=install-script (rocky)' \
  -f 'contexts[]=install-script (ubuntu)' \
  ... every other context unchanged ...

Note that PATCH on that endpoint replaces the contexts array rather than merging into it, so
the call has to carry all thirty-nine names. Get the current set first:

gh api repos/scttfrdmn/objectfs/branches/main/protection/required_status_checks/contexts -q '.[]'

Ordering matters: merge the rename first, then patch protection. In between, the three old contexts
are required and absent, so every PR is blocked — it is a short window but it is not zero, and
doing it the other way round leaves the gate unenforced instead, which is the safer of the two if the
window will be long.

Related

Activity

  1. added
    type: technical-debt
    priority: medium
    area: ci-cd
    on Sep 30, 2026
  2. scttfrdmn commented on Oct 19, 2026

    @scttfrdmn
    OwnerAuthor

    Done, and verified on main.

    • ci: name install-script's cells by distro, and check required matrix cells exactly #618 (0356ae4f): each install-script row has a stable distro, and the job sets name: install-script (${{ matrix.distro }}). The required contexts are now install-script (ubuntu), (rocky) and (opensuse). No image tag or package-manager command line in a name branch protection pins.
    • The gap is closed: TestRequiredMatrixCellsAreProducedExactly expands every matrix-templated name: into the exact contexts it reports, and requires each required one to be among them. Renaming a cell fails it by name. Bumping the Leap image, this issue's scenario, now passes.
    • Branch protection, with the maintainer's go-ahead: the three old contexts were removed with DELETE (exactly those three, 55 → 52). After the new cells passed on main's push run 39182192929, the three new ones were added with POST (52 → 55). Before/after diffs confirm only those changes, and requiredChecks on main matches the API at 55.
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

    area: ci-cdpriority: mediumtype: technical-debt

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions