fix(action): don't cache the caller's dependencies - #24
Merged
Conversation
setup-node@v5 auto-caches whenever package.json declares a packageManager, and hard-fails when the matching lockfile is missing. A consumer whose declared manager and lockfile disagree would have their deploy break on a step that only exists to provide a Node runtime.
|
🎉 This PR is included in version 1.0.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Caught by a staging deploy of ar-io-console pinned at #23's SHA, before moving the
v1tag.Cause
actions/setup-node@v5changed behaviour:action.ymlpasses nocacheinput, so this is entirely implicit. ar-io-console declarespackageManager: yarn@1.22.22but installs with npm, so setup-node looked for ayarn.lockthat does not exist and failed the step — taking the deploy with it.This would have hit any consumer whose
packageManagerfield and lockfile disagree, on a step that exists only to provide a Node runtime fornpm install -g @ar.io/deploy.Fix
package-manager-cache: false. The action should never touch the caller's dependency cache.Note
This is why #23 proposed verifying on staging before moving
v1. Thev1tag still points at v1.0.0, so no consumer was ever exposed — but had we retagged first, every one of them would have been.