Repository navigation
nightly: tag a published reference archive on the default branch's head - #1396
Merged
Merged
Conversation
Run 40899940910 recorded reference-data-v3 at e425546, but its publish job was refused (HTTP 403) twice creating the release's tag at that commit. #1384 had changed this workflow on main mid-run, and the job's token may not create a ref whose workflow files differ from the default branch's. reference-data-v2 published because nothing changed a workflow during its run. Tag the default branch's head instead. The notes and the manifest still name the recorded commit, and a replay reads only the assets and their sha256s.
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.
The nightly's record mode publishes its release with the tag on the default branch's head, not on the recorded commit.
What went wrong
Record run 40899940910, at
e4255465(the merge of #1325), recorded reference-data-v3, and every suite passed. Its publish job then failed twice, on the first attempt and on a rerun, atgh release create "$tag" --target "$GITHUB_SHA":Both attempts' tokens had
Contents: write, the same as v2's publish job (40404704911). The job's YAML hasn't changed since v2. The repo's default workflow token iswrite, and no ruleset covers tags. The one difference: #1384 changednightly-parity.ymlon main at 17:53 UTC, while the recording ran, and the publish came at 20:04 UTC. A tag ate4255465would make a ref whose workflow file differs from main's. That needs theworkflowspermission, which aGITHUB_TOKENcan never have. When v2 published, main's workflow files still matched its recorded commit.That cause fits everything above, but I haven't confirmed it beyond that. The next recording that has a workflow change merge during its run will test it.
v3 was published by hand from that run's assets, tagged at main's head (
05ee8039). The manifest is pinned in a separate PR.The fix
publishinnightly-parity.yml.gh release create --target "$DEFAULT_BRANCH"(github.event.repository.default_branch) replaces--target "$GITHUB_SHA". GitHub resolves the branch's head when it creates the tag, so the new ref's workflow files are the default branch's own.upstream_pin.commitis still the recorded commit (--commit "$GITHUB_SHA"), and a replay downloads each asset by URL and checks its sha256. Nothing reads what commit the tag is on.nightly/README.mdsays where the tag goes.Evidence
DEFAULT_BRANCHin the env and the new--target. The pinned pre-commit hooks pass.test_the_workflow_prepares_every_suite_and_plans_from_its_own_schedulesreads only the prepare and pack lines, which are unchanged.--target mainfrom a token without theworkflowscope, and it was accepted.ci/changelog.py requiredexempts these paths.Merging
This changes a workflow file, so it needs a maintainer's click to merge.