-
-
Notifications
You must be signed in to change notification settings - Fork 376
Description
Description
In my fork of the repository, the Test Frontend (Node 12) job in the CI workflow consistently fails during the cache restoration step of actions/setup-node@v2, throwing a request timeout error:
Error: getCacheEntry failed: Request timeout: /cache_key/_apis/artifactcache/cache?keys=node-cache-Linux-yarn-cache_key
Workflow result(commit 899a44e)
Steps to Reproduce
-
Push a commit or trigger a pull request to branch mater or,
-
Re-run all jobs in GitHub Actions.
Suspected Root Causes and Potential Solutions (based on my investigation)
-
Network issue on local machine or GitHub servers
→ I re-ran the workflow multiple times, but the same error consistently occurred. -
Lack of necessary permissions due to being a forked repository
→ I tried granting write permissions to the workflow token, but the issue persisted.
Workflow file ci.yml (commit 07b0429)
Workflow result -
Disabling the cache
→ While disabling the cache did make the workflow pass, it seems like more of a quick fix than a sustainable solution, especially given the noticeable increase in execution time. -
actions/setup-node version issue (most likely cause)
→ After upgrading to v3 and v4, both versions ran the workflow successfully without errors.
setup-node@v3: Workflow file ci.yml (commit 1939837)
Workflow result
setup-node@v4: Workflow file ci.yml (commit 0259770)
Workflow result
Additional Explanation for Cause 4(actions/setup-node version issue)
- It seems that the issue is related to the version of
actions/cacheused internally byactions/setup-node@v2, which has recently been deprecated.- Relevant issue: actions/setup-node#1275
→ This issue highlights thatsetup-node@v2is still relying on a deprecated version of actions/cache, which can lead to problems such as cache timeouts. - Related discussion: actions/toolkit/discussions/1890
→ This post strongly recommends upgrading deprecated versions by March 1, 2025, due to upcoming backend changes in the GitHub Actions caching service.
→ It’s not just a matter of version support ending — workflows using versions of actions/cache older than v4.0.0 will start failing entirely once the backend changes are in place. Hence, upgrading to v4.0.0 or later is strongly recommended. This is also why a new version was released with minimal breaking changes.
- Relevant issue: actions/setup-node#1275
- Considering the above, while the workflow may have worked fine prior to March 1st, recent deprecations could cause Workflow run fail after March 1st.
Therefore, using a version ofsetup-nodethat relies on a non-deprecatedactions/cacheversion (specifically, version 4.0.0 or higher, as versions below this are deprecated) resolves the issue.
Proposal
-
According to the official README of setup-node@v4,
Node.js v12— which we're currently using in this CI — is still supported.
Also, as mentioned in issue #1275, upgrading to v4 is recommended. -
However,
setup-node@v3also supportsNode.js v12, v3/README.md and based on the the latest version of setup-node@v3 package.json dependencies it seems to be usingactions/[email protected], which is not deprecated. -
So in my opinion, updating from
setup-node@v2tosetup-node@v3would be sufficient to address the current issue while avoiding any potential breaking changes that might come with a direct jump tosetup-node@v4.
It offers a good balance between stability and forward compatibility. -
To make it easier to review, I’ve opened a pull request (Bump
setup-nodeaction to v4 #729 ) with appliedsetup-node@v3at Workflow -
However, I fully respect the project's architectural vision and development roadmap🙏. if there’s a better approach or refinements needed, I’m happy to revise or close the PR as needed.
Looking forward to your thoughts and feedback. Thank you for your time and consideration! 😊