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

Q: When to use job-id argument? (reserveCache failed: Cache already exists.) #40

Open
mateuszkwiecinski opened this issue Mar 24, 2021 · 1 comment

Comments

@mateuszkwiecinski
Copy link

First, thanks for creating the Action, I really appreciate all the hard work you put into it 🙏 The cache is really efficient and it covers most of the cases with the default settings, nice 👍

I've read the documentaiton and I'm not sure I properly understood how to use your action in a workflow with multiple parallel jobs.

Basically what I'm currently seeing is: "reserveCache failed: Cache already exists."

Save local-build-cache
  local-build-cache: there are missing layers: [1-gradle-build-cache-Linux-build-all-sample-apps-gradle-6.8.3-defaultbranch-7cb271a90d1e660c54c2ee5f9a58f6448848042e
  ]
  local-build-cache: creating single-layer cache image
  local-build-cache: uploading 300 MiB, 1702 files as 1-gradle-build-cache-Linux-build-all-sample-apps-gradle-6.8.3-defaultbranch-7a48fbd99028c0aacc9e1f868b864a4fd5b9e52c
  
  Error while uploading 1-gradle-build-cache-Linux-build-all-sample-apps-gradle-6.8.3-defaultbranch-7a48fbd99028c0aacc9e1f868b864a4fd5b9e52c
  : reserveCache failed: Cache already exists. Scope: refs/heads/master, Key: 1-1-gradle-build-cache-Linux-build-all-sample-apps-gradle-6.8.3-defaultbranch-7a48fbd99028c0aacc9e1f868b864a4fd5b9e52c
  , Version: 44932a1d1b3f6fba47d8d7c0ae4beedc3e14a79959b7473ec9feb22f111f994e
  1-index-local-build-cache loaded from exact match, no need to update the cache entry

sample run
full workflow

so I assume I use the action in a wrong way. I wanted to ask about the job-id argument, when should one want to provide custom value?
According to the documentation it should be used "in in case you want to split caches" - does that create completely separate cache so 2 jobs with different job-ids won't share anything? Or is that for optimization purposes and there will be a common part, so basically I should use it whenever something happens in parallel? How do I know if should use it?

@sschuberth
Copy link
Contributor

I'm seeing the same issue here and I'm clueless how to solve it:

> Task :kotlinNodeJsSetup
Setting up Node.js / NPM in '/home/runner/.gradle/nodejs/node-v16.13.0-linux-x64'...
Error: reserveCache failed: Cache already exists. Scope: refs/pull/4736/merge, Key: 61caf59b50cdd2cbea44a39f1fbed8b7, Version: d1cf80f0cb0925ad2549edfbe265b0578c10bed85e733b8f640926abe1b405bb
    at /home/runner/work/_actions/burrunan/gradle-cache-action/v1/dist/cache-action-entrypoint.js:21305:11
    at Generator.throw (<anonymous>)
    at rejected (/home/runner/work/_actions/burrunan/gradle-cache-action/v1/dist/cache-action-entrypoint.js:21258:27)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

> Task :kotlinYarnSetup
Setting up Yarn in '/home/runner/.gradle/yarn/yarn-v1.22.10'...
Error: reserveCache failed: Cache already exists. Scope: refs/pull/4736/merge, Key: 6327e675edbb774e1ac905e190209df2, Version: 026b7a159ef883087570549f5db95e7653a645c7647c1ee3fca909ef7a1691c8
    at /home/runner/work/_actions/burrunan/gradle-cache-action/v1/dist/cache-action-entrypoint.js:21305:11
    at Generator.throw (<anonymous>)
    at rejected (/home/runner/work/_actions/burrunan/gradle-cache-action/v1/dist/cache-action-entrypoint.js:21258:27)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Received 53488602 of 53488602 (100.0%), 122.0 MBs/sec

Any help is appreciated. Is there an explicit way to invalidate the cache?

sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Dec 4, 2021
This suffer from [1].

[1]: burrunan/gradle-cache-action#40

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Dec 5, 2021
This job suffers from [1].

[1]: burrunan/gradle-cache-action#40

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Dec 5, 2021
This job suffers from [1].

[1]: burrunan/gradle-cache-action#40

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Feb 9, 2022
Try whether the caching issue from [1] has "disappeared".

[1]: burrunan/gradle-cache-action#40

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Feb 9, 2022
Try whether the caching issue from [1] has "disappeared".

[1]: burrunan/gradle-cache-action#40

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Feb 28, 2022
This is a try to solve the issue described in [1].

[1]: burrunan/gradle-cache-action#40

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
sschuberth added a commit to oss-review-toolkit/ort that referenced this issue Feb 28, 2022
This is a try to solve the issue described in [1].

[1]: burrunan/gradle-cache-action#40

Signed-off-by: Sebastian Schuberth <sebastian.schuberth@bosch.io>
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

No branches or pull requests

2 participants