chore(yarn-install): upgraded actions/cache action, deduped yarn version check - #185
Open
fearphage wants to merge 4 commits into
Open
chore(yarn-install): upgraded actions/cache action, deduped yarn version check#185fearphage wants to merge 4 commits into
actions/cache action, deduped yarn version check#185fearphage wants to merge 4 commits into
Conversation
freben
requested changes
Sep 4, 2026
freben
left a comment
Member
There was a problem hiding this comment.
Thanks for updating the cache action. The cache pin itself resolves correctly to actions/cache v6.1.0, but the Yarn refactor has blocking issues:
- The Yarn 1 install flag is misspelled as --fronzen-lockfile.
- The modern Yarn branch changes --immutable to the deprecated --frozen-lockfile alias; it should retain --immutable.
- The existing quoted regex, [[ "$(yarn --version)" =~ "1.*" ]], does not match a normal version such as 1.22.22. That sends Yarn 1 through the modern branch, where yarn config get cacheFolder may return undefined.
Please capture the version once, use an anchored Yarn 1 check such as ^1., keep --frozen-lockfile for Yarn 1 and --immutable for modern Yarn, and add or run smoke coverage for both paths. The fork CI workflow also still needs approval and a real run.
Contributor
Author
|
@freben Updated. I tested this one locally: ➜ backstage-actions git:(upgrade-cache-action) bash -c 'for x in 1.2.3 2.3.4 10.11.12; do if [[ "$x" =~ ^1\. ]]; then echo "matched -> $x"; else echo "NO go -> $x"; fi; done'
matched -> 1.2.3
NO go -> 2.3.4
NO go -> 10.11.12 |
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.
actions/cacheto the latest (v6.1.0)This version was released June 26.
yarnversion checks to a single invocation that sets the appropriate variables for future stepsMotivation
Node
v20is deprecated. This will get rid of some of the following warnings: