GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Cache validation for symblic-linked path failed since v3.7.0 · Issue #806 · actions/setup-node

Cache validation for symblic-linked path failed since v3.7.0 #806

New issue
Copy link
New issue
Copy link
Closed
#809
Closed
Cache validation for symblic-linked path failed since v3.7.0#806
#809
Copy link
Assignees
dmitry-shibanovdusan-trickovic
Labels
bugSomething isn't working

Description

@kyontan
kyontan
opened on Jul 10, 2023
Issue body actions

Description:

Since v3.7.0, the workflow using actions/setup-node started failing for the error described below.
Our repository uses symblic link for some reason, and v3.7.0 had revised cache resolution logic so that I think this is a kind of regression for the change around:

setup-node/src/cache-utils.ts

Lines 144 to 152 in e33196f

const existingDirectories: string[] = cacheDependenciesPaths
.map(path.dirname)
.filter(unique())
.filter(directory => fs.lstatSync(directory).isDirectory());
if (!existingDirectories.length)
core.warning(
`No existing directories found containing cache-dependency-path="${cacheDependencyPath}"`
);

I've not confirmed the cause, but I expect that the line .filter(directory => fs.lstatSync(directory).isDirectory()); drops symblic linked.

Action version:

v3.7.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

  • node: v12.13.0
  • npm: 612.0
  • yarn: 1.22.19

Repro steps:
A description with steps to reproduce the issue. If you have a public example or repo to share, please provide the link.

Setup repository like following structure:

- app (symbolic link -> app-actual)
- app-actual
  - .node-version
  - package.json
  - yarn.lock
  - ...

workflow file:

name: test

on:
  pull_request:
  push:
    branches:
      - develop

defaults:
  run:
    working-directory: app

jobs:
  test:
    runs-on: monorepo-global-amd64
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version-file: "app/.node-version"
      - run: npm install -g yarn@1
      - uses: actions/setup-node@v3
        with:
          node-version-file: "app/.node-version"
          cache: "yarn"
          cache-dependency-path: |
            app/yarn.lock

Expected behavior:
A description of what you expected to happen.

The 2nd actions/setup-node@v3 step succeeds.

Actual behavior:

The 2nd actions/setup-node@v3 step fails for the error:

image
Run actions/setup-node@v3
  with:
    node-version-file: (snip)
    cache: yarn
    cache-dependency-path: .../yarn.lock
  
    token: ***
    always-auth: false
    check-latest: false
Node version file is not JSON file
Resolved .../... (snip)
Found in cache @ /home/runner/_work/_tool/node/12.13.0/... (snip)
Environment details
  node: v12.13.0
  npm: 612.0
  yarn: 1.22.19
Warning: No existing directories found containing cache-dependency-path="(snip)"
All dependencies are managed locally by yarn3, the previous cache can be used
Error: Path Validation Error: At least one directory or file path is required

Activity

  1. kyontan
    added
    bugSomething isn't working
    needs triage
    on Jul 10, 2023
  2. dusan-trickovic commented on Jul 11, 2023

    @dusan-trickovic
    dusan-trickovic
    on Jul 11, 2023
    More actions

    Hello @kyontan ! Thank you for reporting the issue, we will take a closer look and see what can be done :)

  3. dusan-trickovic
    removed
    needs triage
    on Jul 11, 2023
  4. dusan-trickovic
    self-assigned this
    on Jul 11, 2023
  5. IvanZosimov
    linked a pull request that will close this issueResolve SymbolicLink #809on Jul 12, 2023
  6. dmitry-shibanov
    closed this as completedin #809on Jul 13, 2023
  7. dmitry-shibanov commented on Jul 13, 2023

    @dmitry-shibanov
    dmitry-shibanov
    on Jul 13, 2023
    Contributor
    More actions

    Hello @kyontan. We've merged the pull request with possible fix. Could you please try to use actions/setup-node@main to confirm that it works as expected.

    For now I'm going to reopen the issue.

  8. dmitry-shibanov
    reopened this on Jul 13, 2023
  9. dmitry-shibanov
    self-assigned this
    on Jul 13, 2023
  10. kyontan commented on Jul 14, 2023

    @kyontan
    kyontan
    on Jul 14, 2023
    Author
    More actions

    Hi @dmitry-shibanov,

    Our team confirmed that the fix in actions/setup-node@main solved the issue and now our CI is working fine.
    Thanks for your quick help!

  11. dmitry-shibanov commented on Aug 15, 2023

    @dmitry-shibanov
    dmitry-shibanov
    on Aug 15, 2023
    Contributor
    More actions

    Hello @kyontan. The new version of setup-node was released. For now I'm going to close the issue. If you have any concerns feel free to ping us.

  12. dmitry-shibanov
    closed this as completedon Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dmitry-shibanov
    dmitry-shibanov
  • @dusan-trickovic
    dusan-trickovic

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.