Repository navigation
fix(ci): the install-script gate authenticates, and its required-check guard covers all 39 - #573
Merged
Conversation
…k guard covers all 39 The `install-script (opensuse/leap:15.6, ...)` row failed on PR #571 with curl: (22) The requested URL returned error: 403 objectfs-install: error: could not reach the GitHub API to find the latest release against a diff that touched two Go files in `internal/awsname`. It is one of thirty-nine required status checks on `main`, so it blocks the pull request. `resolve_latest` in `scripts/install.sh` already has the fix, and has had it since the commit that added it. Its comment names the caller it was written for: "Unauthenticated API calls are rate limited by IP, which is fine for a person and not fine for CI on a shared runner." The job on the far side of that sentence never passed a token. The capability existed, was documented as being for this job, and was unreachable from it. Retrying is not the alternative, and the script says so at two call sites: `--retry 3` has been on that curl all along, curl does not retry a 403, and `wget_retry_flags` excludes 403 deliberately because it is an authorization answer rather than a transient one. Nor would retrying help — the primary rate limit resets up to an hour out, against this job's 15-minute timeout. Authenticated is 5,000 requests an hour against 60 for the shared runner IP. Three further defects found while diagnosing it: **The idempotency step passed vacuously on total failure.** Both installs are silenced to /dev/null and the step compares digests; when the install fails there is no binary, `sha256sum` prints nothing, and `a` and `b` are both empty — which are equal, so it echoed SAME and passed. That assertion was green for every possible failure of the thing it exists to test, including the 403 that took the step beside it down. The digests are now checked for being digests before they are compared. **`requiredChecks` transcribed twenty of the thirty-nine configured names.** Nothing in it had gone stale; it was written when there were twenty and never grew, so nineteen required contexts had no guard against the local rename that orphans them — `build-tags (s3compat)`, `deploy-manifests`, `docs-site`, all ten `fuzz-smoke` cells, all three `install-script` rows, `labels`, `sdk-metrics` and `systemd-unit`. A half-populated list is worse than an empty one, because the test passing reads as the whole set being covered. **`ci.yml`'s header said "Twenty check names are required on `main`"** and enumerated that same subset, in a comment block whose own opening paragraph owns up to having said "four" while listing five. Replaced with a pointer to the transcription, for the reason the version constant lives in one place. Two tests, because the job cannot catch this itself — an unauthenticated run passes whenever the quota happens not to be exhausted, which is most of the time: - `TestInstallScriptJobAuthenticatesEveryRunThatDownloads` keys on the success assertions rather than on step names, and asserts a floor so a rewording cannot leave it checking nothing. - `TestWorkflowsNeverForwardAnUnsetEnvironmentVariableToAContainer` walks every workflow. `docker run -e FOO` with no `=` forwards FOO from the caller's environment and forwards nothing when it is unset there, with no error — so the `-e` and the step's `env:` are one change in two places, and the missing half reproduces the original symptom with the fix apparently applied. `jobSteps` is added to `workflow_test.go` rather than as a fifth hand-rolled `map[any]any` walk, per #504. One residual gap is recorded rather than fixed: the guard strips the ` (...)` suffix, so it cannot see a matrix *cell* rename, and `install-script`'s three contexts embed a container image tag and a zypper command line. Bumping Leap to 16 would silently orphan all three. `modulefiles` already solved this for itself with an explicit `name:`; doing the same here means renaming a required check, which is a branch-protection change and not this repository's to make from code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this fixes
install-script (opensuse/leap:15.6, ...)failed on #571 withon a diff that touched two Go files in
internal/awsname. It is one of thirty-nine requiredstatus checks on
main, so it blocks that pull request.resolve_latestinscripts/install.shalready has the fix, and has had it since the commit thatadded it. Its comment names the caller it was written for:
The job on the far side of that sentence never passed one. The capability existed, was documented as
being for this job, and was unreachable from it — the same shape as a
MountOptionsfield nothingsets, and it failed the same way: silently, until the shared runner's sixty-an-hour ran out.
Retrying is not the alternative, and the script says so at two call sites.
--retry 3has been onthat curl all along; curl does not retry a 403, and
wget_retry_flagsexcludes 403 deliberatelybecause it is an authorization answer rather than a transient one. Nor would retrying help if it did
— the primary rate limit resets up to an hour out, against this job's 15-minute timeout.
Authenticated is 5,000 requests an hour against 60 for a shared runner IP.
-e GITHUB_TOKENgoes only on the two runs that download. The two refusal runs deliberately do notget it: preflight exits before
resolve_latestis reached, confirmed from the failing log, where theopensuse refusal printed the missing-
tarlist andEXIT=1with no curl output at all.Three more defects, found while diagnosing it
The idempotency step passed vacuously on total failure
Both installs are silenced to
/dev/nulland the step compares digests. When the install fails thereis no binary,
sha256sumprints nothing to stdout,aandbare both the empty string — and twoempty strings compare equal, so it echoed
SAMEand passed.That assertion was green for every possible failure of the thing it exists to test, including the
403 that took the step beside it down. The digests are now checked for being digests before they are
compared.
requiredCheckstranscribed 20 of the 39 configured namesNothing in it had gone stale — it was written when there were twenty and never grew. So nineteen
required contexts had no guard against the local rename that orphans them:
build-tags (s3compat),deploy-manifests,docs-site, all tenfuzz-smokecells, all threeinstall-scriptrows,labels,sdk-metrics,systemd-unit.A half-populated list is worse than an empty one, because the test passing reads as the whole set
being covered.
ci.yml's header claimed "Twenty check names are required onmain"...and enumerated that same subset — in a comment block whose own opening paragraph owns up to having
said "four" while listing five. Replaced with a pointer to the transcription, for the same reason the
version constant lives in exactly one place.
Tests
The job cannot catch this itself: an unauthenticated run passes whenever the quota happens not to be
exhausted, which is most of the time. A check that is only wrong under load is one nobody reads as
wrong.
TestInstallScriptJobAuthenticatesEveryRunThatDownloads— keys on the success assertions ratherthan on step names, because a name is prose and those two greps are what would have to be deleted
for a step to stop needing a token. Asserts a floor of two matching steps, so a rewording cannot
leave it checking nothing.
TestWorkflowsNeverForwardAnUnsetEnvironmentVariableToAContainer— walks every workflow.docker run -e FOOwith no=forwardsFOOfrom the caller's environment and forwards nothingwhen it is unset there, with no error. So the
-eand the step'senv:are one change in twoplaces, and the missing half reproduces the original symptom with the fix apparently applied.
jobStepsis added toworkflow_test.gorather than as a fifth hand-rolledmap[any]anywalk, per#504.
Verified by mutation, not by prediction
Each mutant was confirmed to still compile —
FAIL [build failed]proves nothing.-e GITHUB_TOKENfrom the installingdocker runTestInstallScriptJobAuthenticatesEveryRunThatDownloadsFAILGITHUB_TOKENfrom the twice-stepenv:, keep the-elabelsjob inci.ymlTestRequiredChecksStillHaveAJobToReportThemFAIL, naminglabels"labels"removed from the list (the pre-change state)The last two are the pair that matters: the identical rename that orphans a required check passed
before this change and fails after it. That is the coverage gap closed, shown by execution.
Not fixed here, deliberately — #572
The completeness guard strips the
(...)suffix, so it cannot see a matrix cell rename, andinstall-script's three contexts embed a container image tag and azyppercommand line. BumpingLeap 15.6 to 16 would silently orphan all three and block every PR with nothing red to point at.
modulefilesalready solved this for itself with an explicitname:, and the same fix applies — butit renames a required check, which means a branch-protection change, and that is a repository setting
rather than something this repository changes from code. Filed as #572 with the exact
gh apicalland a note that
PATCHreplaces thecontextsarray rather than merging into it.Verification
GOOS=linuxbecause CI lints linux and this machine's golangci-lint (v2.14.0) is newer than thepinned v2.12.2.
No
CHANGELOG.mdentry:scripts/install.shis unchanged and nothing here is user-facing.Unblocks #571.