Skip to content

Upgrade to v2.3/v2.4 results in post-setup failure #317

Closed
@khitrenovich

Description

@khitrenovich

We are using actions/setup-node v2.2 in Yarn-based monorepo. We attempted upgrade to v2.3 and v2.4, but the updated version fails with error Error: Cache folder path is retrieved for yarn but doesn't exist on disk in post-setup step in workflows that also run yarn install command. (We have a workflow that runs yarn audit without actually installing the dependencies. and an upgrade to v2.3/v2.4 passes there without failures.)

Our usage:

    steps:
    - name: 'Checkout'
      uses: actions/checkout@v2.3.4
    - name: 'Setup Node'
      uses: actions/setup-node@v2.4.0
      with:
        node-version: 14.x
        cache: 'yarn'

Logs from "Setup Node" step (identical for passing and failing builds):

Run actions/setup-node@v2.4.0
  with:
    node-version: 14.x
    cache: yarn
    always-auth: false
    check-latest: false
    token: ***
Found in cache @ /opt/hostedtoolcache/node/14.17.4/x64
/usr/local/bin/yarn --version
1.22.11
/usr/local/bin/yarn cache dir
/home/runner/.cache/yarn/v6
yarn cache is not found

Logs from "Post Setup Node" in successful v2.4 run:

Post job cleanup.
/usr/local/bin/yarn --version
1.22.11
/usr/local/bin/yarn cache dir
/home/runner/.cache/yarn/v6
/usr/bin/tar --posix --use-compress-program zstd -T0 -cf cache.tzst -P -C /home/runner/work/<redacted>/<redacted> --files-from manifest.txt
Cache Size: ~0 MB (258 B)
Cache saved successfully
Cache saved with the key: node-cache-Linux-yarn-abc1f1c083ff490ac797c8966c624b3975d27c522daaed7ed60b66058fca009f

Logs from "Post Setup Node" in failed v2.4 run:

Post job cleanup.
/usr/local/bin/yarn --version
1.22.11
/usr/local/bin/yarn cache dir
/home/runner/.cache/yarn/v6
Error: Cache folder path is retrieved for yarn but doesn't exist on disk: /home/runner/.cache/yarn/v6

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions