fix(peer-advisory-drift): stop setup-node from caching a manager it has no use for - #19
Merged
Conversation
…as no use for The first real run failed at Set up Node with Unable to locate executable file: pnpm setup-node v5 enables package-manager caching on its own whenever the checked-out package.json carries a packageManager field, then shells out to that manager to locate its store. Every Bymax package declares the field, so this would have failed in all ten repositories on the first scheduled run, not just this one. The job never installs the caller's toolchain by design -- it reads a manifest rather than building a tree -- so there is nothing to cache. Disabled the automatic cache instead of installing pnpm to satisfy it.
There was a problem hiding this comment.
Pull request overview
Disables actions/setup-node@v5’s implicit “package manager” caching in the peer-advisory-drift reusable workflow to prevent failures when the caller repo declares packageManager (e.g., pnpm@...) but the workflow intentionally does not install that toolchain.
Changes:
- Turn off setup-node’s automatic package-manager cache via
package-manager-cache: false. - Add an inline rationale documenting the observed failure (
Unable to locate executable file: pnpm) and why installing pnpm would be unnecessary in this job.
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
v1tag was moved, and the first real run of this workflow failed — caught before Monday's schedule, on a manual dispatch innest-queue.Cause, from the action's own definition rather than a guess
actions/setup-node@v5declares:So it enables package-manager caching on its own whenever the checked-out
package.jsoncarries apackageManagerfield, then shells out to that manager to locate its store. This job checks out the caller's repository to read its manifest — and never installs the caller's toolchain, because it reads a manifest rather than building a tree. pnpm is simply not there.Scope: this was not one repository
Every Bymax package declares the field:
Ten for ten. The first scheduled run would have failed in every repo that adopts this, and a workflow that fails on its first outing is one people stop reading.
The fix
package-manager-cache: false. There is nothing to cache — turning the cache off is the honest fix, rather than installing pnpm so an unused cache can succeed. The reason is recorded inline, including the error string, so the next person to touch this step does not re-enable it.What the failed run did prove
Worth separating, because most of the wiring was correct:
@refs/tags/v1 (2eb029f)— the tag move worksContents: readandIssues: write— the permission chain through the caller is rightactions/checkoutsucceededIt failed at the next step, which is exactly the kind of defect a dry run exists to find.
v1has to move againv1currently points at2eb029f, which contains the broken step. After this merges the tag needs advancing again, and I will re-run the manual dispatch onnest-queueto confirm a green end-to-end run before Monday.Ready for your review — not merging it.