question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi-Path Caching Not working

See original GitHub issue

I am using the multi-path caching capabilities with v2 to cache multiple build directories in an iOS monorepo.

After loading the cache, I print the output of each path that should be cached, and after running the job that generates the files in the path, I output the contents of the path again.

Only the first path is getting cached.

Project Structure:

root/
  FrameworkA/
    Carthage/
  FrameworkB/
    Carthage/
  App/
    Carthage/

Workflow:

jobs:
  frameworkA:
    steps:
    # omitted for brevity ...
    - name: Load Dependency Cache
      uses: actions/cache@v2
      if: ${{ steps.changes_check.outputs.project_files_changed > 0 }}
      with:
        path: |
          ./FrameworkA/Carthage/
          ./FrameworkB/Carthage/
          ./App/Carthage/
        key: carthage-${{ hashFiles('./FrameworkA/Cartfile.resolved', './FrameworkB/Cartfile.resolved', './App/Cartfile.resolved') }}
    - name: Run Tests
      if: ${{ steps.changes_check.outputs.project_files_changed > 0 }}
      run: ./scripts/run_unit_tests.sh frameworkA

  frameworkB:
    needs: 'frameworkA'
    steps:
    # omitted for brevity ...
    - name: Load Dependency Cache
      uses: actions/cache@v2
      if: ${{ steps.changes_check.outputs.project_files_changed > 0 }}
      with:
        path: |
          ./FrameworkA/Carthage/
          ./FrameworkB/Carthage/
          ./App/Carthage/
        key: carthage-${{ hashFiles('./FrameworkA/Cartfile.resolved', './FrameworkB/Cartfile.resolved', './App/Cartfile.resolved') }}
    - name: Run Tests
      if: ${{ steps.changes_check.outputs.project_files_changed > 0 }}
      run: ./scripts/run_unit_tests.sh frameworkB

Both frameworkA and frameworkB are properly finding and restoring a cache for FrameworkA/Carthage but it is consistently not restoring the cache for FrameworkB/Carthage even though I can validate through simple ls <path> that the content is there

Example output from FrameworkB job:

Running 'ls ./FrameworkA/Carthage'
// ... output of content in the folder
Running 'ls ./FrameworkB/Carthage'
ls: ./FrameworkA/Carthage/Build/iOS: No such file or directory

// ... build that generates files in the cache path

Running 'ls ./FrameworkA/Carthage'
// ... output of content in the folder
Running 'ls ./FrameworkB/Carthage'
// ... output of content in the folder

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
dhadkacommented, Aug 7, 2020

Yes, once a cache is created it can’t be updated. There is at least one open issue about removing this restriction, but at the moment caches are immutable.

0reactions
Mordilcommented, Aug 7, 2020

Closing after referencing the feature request issue for further tracking

Read more comments on GitHub >

github_iconTop Results From Across the Web

failed multipath device caching I/O errors after access is restored
Description of problem: The problem occurs when a multipath device is configured to return errors when all paths are down.
Read more >
caching problem with MD3000i and Linux multipath - Dell Community
The consequense of the cachingproblem is that when a VM migrates to the other host it will crash because the virtual disk is...
Read more >
How do I disable multipath route caching in linux? - Server Fault
It seems that due to bugs and lack of ownership, multipath IP route caching was removed from the Linux kernel - that being...
Read more >
Using GitHub cache action with multiple cache paths?
I was able to make it work with a few modifications;. use relative paths instead of absolute; use a hash of the content...
Read more >
How to disable / decrease MPIO cache - TechNet - Microsoft
with 2x1gb links, 350MB/s is not possible. So is there a way to disable MPIO caching? E: Not sure if I understand this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found