GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||
GeezerVison is showing github.com — fix: demote benign cache reserve-race to info instead of warning by fengmk2 · Pull Request #75 · voidzero-dev/setup-vp Conversation
Member
ProblemConsumers running a build matrix see noisy warning annotations from These are harmless — caching works correctly. Root causeThe cache key is That Change
Verification
NoteThe companion
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsIn a build matrix, jobs that share a cache key (same OS/arch/lockfile
across different Node versions) race to save it in the post step. Only
one job can reserve a given key; the losers get cacheId === -1 from
@actions/cache, which is expected and benign. setup-vp was emitting
`warning("Cache save failed or was skipped.")` on that path, producing
noisy warning annotations even though caching worked correctly.
Demote that branch to an info message. A genuinely thrown error from
saveCache still warns, since that is a real, unexpected failure.
Adds src/cache-save.test.ts covering the reserve-race (no warning),
success, and thrown-error paths.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pull request overviewDemotes the benign Changes:
Reviewed changesCopilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions…ce at info
Even after demoting setup-vp's own message, CI still showed a warning:
"Failed to save: Unable to reserve cache with key …, another job may be
creating this cache." That comes from @actions/cache itself.
Root cause is in our bundle, not the library. @actions/cache picks the log
level with `error.name === ReserveCacheError.name`. Plain `minify: true`
mangles the class binding to a short identifier, so `ReserveCacheError.name`
evaluates to the mangled name (e.g. "e") while the instance keeps its
`this.name = "ReserveCacheError"` literal. The comparison is always false,
so the benign reserve-race ReserveCacheError falls through to the default
branch and is logged via core.warning instead of core.info.
Configure pack.minify with mangle.keepNames (function + class) so oxc emits
named class expressions (`X = class ReserveCacheError extends Error {…}`),
preserving `X.name`. The comparison now matches and the reserve race is
logged at info — no warning annotation.
Adds src/bundle.test.ts to guard the built dist against a regression to
plain `minify: true` (asserts ReserveCacheError / ValidationError /
FinalizeCacheError survive as named classes).
fengmk2
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TIL
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
fengmk2
added a commit
to node-modules/urllib
that referenced
this pull request
setup-vp 6cb180a additionally fixes the @actions/cache "Failed to save: Unable to reserve cache…" warning, which was caused by class-name mangling in the action bundle (error.name === ReserveCacheError.name never matched). Temporary SHA pin — revert to @v1 once voidzero-dev/setup-vp#75 is merged and the v1 tag is re-cut. Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers
Copilot code review
Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Uh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. | ||||||||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |