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

Cache exists error #41

Closed
henryiii opened this issue Aug 5, 2020 · 5 comments
Closed

Cache exists error #41

henryiii opened this issue Aug 5, 2020 · 5 comments

Comments

@henryiii
Copy link

henryiii commented Aug 5, 2020

I love the new v2 action, but I got an odd error when converting a repo to use it:

##[error]reserveCache failed: Cache already exists. Scope: refs/pull/20/merge, Key: pre-commit-2-4774c6dcfb04097f665845795b3fc1fdb61ba523c1c117b1fb248ece52e94408-425ac6cd4cf92651d871380a6d2765229c71084a12c70a488fe9357fa3e198a2, Version: 28cdb9f5496f334116f23e86f0063f5d3a9348c2e22425a33171e071aadada7

The only think I've done differently (that I know of) is I enabled the token, just to see the guidelines in the pre-commit/action readme which say it only works on a private repository really means it only works on PRs from the same repository (which, while not as useful as working on PRs from forks, still would be useful in some cases).

https://github.com/scikit-hep/hepunits/pull/20/checks?check_run_id=950105310

@asottile
Copy link
Member

asottile commented Aug 5, 2020

does the error persist on a rerun? iirc there's an unavoidable race on initial cache population

@henryiii
Copy link
Author

henryiii commented Aug 5, 2020

That could be the problem, then - it was the first run (and I dropped the token and it worked on the second run, so maybe it was just the rerun that fixed it).

@asottile
Copy link
Member

asottile commented Aug 5, 2020

nice! yeah there isn't really anything we can do about that sadly

@asottile asottile closed this as completed Aug 5, 2020
@asottile
Copy link
Member

asottile commented Aug 5, 2020

https://pre-commit.ci will at least not have this problem

@bitphage
Copy link

bitphage commented Mar 25, 2021

Also got this error on a private repo but without additional features enabled. No error after job rerun.

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

No branches or pull requests

3 participants