We have implemented a shared cache across github runners. In order to avoid concurrency issues, we keep the cache as a read-only layer so that user workflows can use pre-cached binaries, with a writeable layer on top so that user can download extra binaries that weren't pre-cached yet. A separate process updates the cache.
With setup-jfrog-cli v4.4, we get this error when trying to use a pre-cached (read-only) version
EROFS: read-only file system, chmod '/home/runner/_work/_tool/jf/2.67.0/x64/jf'
We get no errors with v4.2. It looks like the problem is introduced by https://github.com/jfrog/setup-jfrog-cli/pull/201 which adds a chmod when reading from the cache, which shouldn't be necessary as this is done when originally writing into the cache.
Current behavior
From the post job cleanup
Error: EROFS: read-only file system, chmod '/home/runner/_work/_tool/jf/2.67.0/x64/jf'
at chmodSync (node:fs:1961:3)
at Utils.loadFromCache (/home/runner/_work/_actions/jfrog/setup-jfrog-cli/v4/lib/utils.js:243:36)
at /home/runner/_work/_actions/jfrog/setup-jfrog-cli/v4/lib/cleanup.js:39:2[8](https://github-chf01.synamedia.com/spvss-ivp/pylon-eks-layer/actions/runs/809620/job/2307986#step:36:8)
at Generator.next (<anonymous>)
at /home/runner/_work/_actions/jfrog/setup-jfrog-cli/v4/lib/cleanup.js:31:71
at new Promise (<anonymous>)
at __awaiter (/home/runner/_work/_actions/jfrog/setup-jfrog-cli/v4/lib/cleanup.js:27:12)
at cleanup (/home/runner/_work/_actions/jfrog/setup-jfrog-cli/v4/lib/cleanup.js:38:12)
at Object.<anonymous> (/home/runner/_work/_actions/jfrog/setup-jfrog-cli/v4/lib/cleanup.js:1[9](https://github-chf01.synamedia.com/spvss-ivp/pylon-eks-layer/actions/runs/809620/job/2307986#step:36:9)8:1)
at Module._compile (node:internal/modules/cjs/loader:1241:14) {
errno: -30,
syscall: 'chmod',
code: 'EROFS',
path: '/home/runner/_work/_tool/jf/2.67.0/x64/jf'
}
Describe the bug
We have implemented a shared cache across github runners. In order to avoid concurrency issues, we keep the cache as a read-only layer so that user workflows can use pre-cached binaries, with a writeable layer on top so that user can download extra binaries that weren't pre-cached yet. A separate process updates the cache.
With setup-jfrog-cli v4.4, we get this error when trying to use a pre-cached (read-only) version
EROFS: read-only file system, chmod '/home/runner/_work/_tool/jf/2.67.0/x64/jf'
We get no errors with v4.2. It looks like the problem is introduced by https://github.com/jfrog/setup-jfrog-cli/pull/201 which adds a chmod when reading from the cache, which shouldn't be necessary as this is done when originally writing into the cache.
Current behavior
From the post job cleanup
Reproduction steps
No response
Expected behavior
No response
Setup JFrog CLI version
4.4.1
JFrog CLI version
2.67.0
Workflow operating system type and version
Ubuntu 22.04
JFrog Artifactory version (if relevant)
No response
JFrog Xray version (if relevant)
No response