Skip to content

Cache restore failed with symlinks in Windows #120

Closed

Description

@adriangodong

I'm working with a monorepo containing several npm packages. The root npm package.json references children npm packages using relative path. When npm ci / npm i is executed, a symlink is created for each child package to the root node_modules folder.

I cached the root node_modules folder.

The first workflow run is good, here are the steps:

  1. Cache restore miss
  2. Run npm ci
  3. Run npm build
  4. Success
  5. Cache save

The second run is no good:

  1. Cache restore hit
  2. Skip run npm ci
  3. Run npm build

This is only happening in windows-latest environment. I tried to reproduce the issue locally and found out that tar did not recreate the symlinks.

Any guidance on how to proceed?

Activity

  1. self-assigned this
    on Dec 3, 2019
  2. added
    bug
    on Dec 3, 2019
  3. joshmgross commented on Dec 3, 2019

    @joshmgross
    Contributor

    It's likely that we need the --dereference flag when we exec tar on Windows. Do you have a sample repro that I can test this issue with?

  4. 9prady9 commented on Jan 21, 2020

    @9prady9
  5. ordian commented on May 13, 2020

    @ordian

    @joshmgross as noted in actions/runner-images#572 (comment), this issue is blocking caching working properly for Rust projects on Windows. Is there any known workaround for this? Here is a repro.

  6. joshmgross commented on May 14, 2020

    @joshmgross
    Contributor

    👋 Could someone confirm which Windows hosted runners they're using?

    I'm curious if this issue is specific to GNU or BSD tar

  7. 9prady9 commented on May 14, 2020

    @9prady9

    I face similar issues with symlinks when caching a folder with soft links - https://github.com/9prady9/arrayfire/runs/401235482

    For mine trials, it was 2019 I think

  8. removed their assignment
    on May 15, 2020
  9. mzabaluev commented on May 26, 2020

    @mzabaluev

    @ordian and possibly others with the same symptoms:

    Here is a repro.

    I have no idea about the symlink issues discussed here, but your issue looks like #198 and it has a solution.

  10. github-actions commented on May 7, 2022

    @github-actions

    This issue is stale because it has been open for 200 days with no activity. Leave a comment to avoid closing this issue in 5 days.

  11. github-actions commented on May 17, 2022

    @github-actions

    This issue was closed because it has been inactive for 5 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggood first issuestale

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions