Skip to content

CI Workflow: actions/setup-node@v2 is encountering a cache Error(getCacheEntry failed), due to actions/cache Deprecation #728

@cbnuLeehyunwoo

Description

@cbnuLeehyunwoo

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

Image
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)

  1. Network issue on local machine or GitHub servers
    → I re-ran the workflow multiple times, but the same error consistently occurred.

  2. 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

  3. 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.

  4. 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/cache used internally by actions/setup-node@v2, which has recently been deprecated.
    • Relevant issue: actions/setup-node#1275
      → This issue highlights that setup-node@v2 is 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.
  • 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 of setup-node that relies on a non-deprecated actions/cache version (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@v3 also supports Node.js v12, v3/README.md and based on the the latest version of setup-node@v3 package.json dependencies it seems to be using actions/[email protected], which is not deprecated.

  • So in my opinion, updating from setup-node@v2 to setup-node@v3 would be sufficient to address the current issue while avoiding any potential breaking changes that might come with a direct jump to setup-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-node action to v4 #729 ) with applied setup-node@v3 at 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! 😊

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions