Repository navigation
Build PR tooling from the base branch tip, not the event's base sha - #554
Merged
Merged
Conversation
github.event.pull_request.base.sha is a snapshot taken when the PR was last pushed, not the current tip of the base branch. A reopened or rerun PR therefore builds with whatever master looked like at its last push, and a tooling fix that landed on master since then never reaches it: the daily sync PR reopened after #553 merged checked out a base without helpers/artifact-helpers.sh and failed at "Pack artifact". Check out base.ref instead. The plan's diff and the empty-PR check still compare base.sha to head.sha, so the list of changed packages is unaffected; only the tooling that runs on the droplet moves to the tip.
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.
Why
github.event.pull_request.base.shais a snapshot taken at the PR's last push, not the current tip of master. A reopened or rerun PR builds with the tooling master had back then. Concretely: after #553 merged, the daily sync PR #512 was reopened and its build checked outbda2a07, a base withouthelpers/artifact-helpers.sh, so every job died at "Pack artifact" withNo such file or directory. Rebasing the PR was the only way to pick the fix up.What
Both checkouts in
build-pr.ymlusebase.ref(the branch) instead ofbase.sha. The changed-package diff and the empty-PR check still comparebase.shatohead.sha, so the plan is unchanged. Only the tooling that runs on the droplet moves to the tip, which is what the existing comment already promises.Verified
node --test tests/pr-workflow-approval.cjs: 34/34.