Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Error: EISDIR: illegal operation on a directory, read #130

Closed
friegger opened this issue Apr 25, 2023 · 4 comments · Fixed by #132
Closed

Warning: Error: EISDIR: illegal operation on a directory, read #130

friegger opened this issue Apr 25, 2023 · 4 comments · Fixed by #132

Comments

@friegger
Copy link
Contributor

Swatinem/[email protected] and newer fail with following error before printing the Cache Configuration, i.e. it is the only output:

Warning:  Error: EISDIR: illegal operation on a directory, read

Swatinem/[email protected] does not yield this error.

This happens with the defaults, i.e. no properties configured.

    - name: Setup cache
      uses: Swatinem/[email protected]

Defaults create actual properties for execution:

   with:
    cache-targets: true
    prefix-key: v0-rust

Running on GitHub-hosted ubuntu-20.04.

Output of working v2.0.2 was:

Workspaces: 
/home/runner/work/repo/repo
Cache Paths: 
/home/runner/.cargo 
/home/runner/work/repo/repo/target 
Restore Key: 
v0-rust-build-cc72e397139d3212210d3098d019f046cf33b6c8 
Cache Key: 
v0-rust-build-cc72e397139d3212210d3098d019f046cf33b6c8-0f57a3c23b191fee29fcc6643413c12d43dc4eb8 
.. Prefix: 
- v0-rust-build 
.. Environment considered: 
- Rust Version: 1.69.0-nightly x86_64-unknown-linux-gnu (31f858d9a511f24fedb8ed997b28304fec809630) 
- CARGO_INCREMENTAL 
.. Lockfiles considered:
- /home/runner/work/repo/repo/subfolder1/Cargo.toml 
- /home/runner/work/repo/repo/subfolder2/Cargo.toml 
...more crates
@Swatinem
Copy link
Owner

Can you run this with logging enabled? I wonder which directory it is choking on…

@friegger
Copy link
Contributor Author

friegger commented Apr 26, 2023

Ran with a simple workflow:

jobs:
  debug:
    runs-on: ubuntu-20.04
    environment: action-debugging
    steps:
      - uses: actions/checkout@v3
      - name: Setup cache
        uses: Swatinem/[email protected]
##[debug]followSymbolicLinks 'false'
##[debug]followSymbolicLinks 'false'
##[debug]implicitDescendants 'true'
##[debug]matchDirectories 'true'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/work/repo/repo/rust-toolchain'
##[debug]Search path '/home/runner/work/repo/repo/rust-toolchain.toml'
##[debug]followSymbolicLinks 'false'
##[debug]followSymbolicLinks 'false'
##[debug]implicitDescendants 'true'
##[debug]matchDirectories 'true'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/work/repo/repo'
Warning:  Error: EISDIR: illegal operation on a directory, read
##[debug]Node Action run completed with exit code 0
##[debug]CACHE_ON_FAILURE='false'
##[debug]CARGO_INCREMENTAL='0'
##[debug]Set output cache-hit = false
##[debug]Finishing: Setup cache

@Swatinem
Copy link
Owner

That is very interesting, maybe some change in the glob implementation is responsible for this. Looks like somewhere when searching the main repo.

But it looks like the cache itself continues after this warning? Does it work in the end?

If it is indeed a dependency update/regression, then probably another update would magically solve this.

@friegger
Copy link
Contributor Author

It fails and does not build a cache. I meanwhile found the issue. In our project we also have a folder named rust-toolchain which is not in the root of the repository. This change to the glob pattern now recursively checks for that name and further down the road the directory is treated as a file. A solution might be to filter everything out which is not a file after globbing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants