-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Support overwriting caches #2265
Conversation
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
1 similar comment
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
Yes this is probably true in act, since the run_number, run_id, run_attempt doesn't update automatically. I'm not yet shure that this is the same Key on GitHub Actions Servers, but they could have silently implemented the override cache feature request. For act it's fine for me to merge...
Should we remove that flaky test? I mean it caused a lot of reruns in the past |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2265 +/- ##
==========================================
+ Coverage 61.56% 62.37% +0.81%
==========================================
Files 53 56 +3
Lines 9002 9127 +125
==========================================
+ Hits 5542 5693 +151
+ Misses 3020 2986 -34
- Partials 440 448 +8 ☔ View full report in Codecov by Sentry. |
This comment was marked as duplicate.
This comment was marked as duplicate.
@ChristopherHX Thank you for pointing out the problem. I was lost in the huge logs. How about #2266? I have tested the commit in this PR, and it works, but I will revert it since it is unrelated. |
@ChristopherHX I am sure GitHub Actions support multiple caches with the same key. Let me show you the cache manage page of the Gitea repo. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
It should wait #2266. |
Ah yes that are cache scopes that are not implemented here. They are unique per repo + ref only default branch scope |
Actually I have already implemented the cache scope, maybe port it later after this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot reproduce my concerns..., let's merge
Hmm, I'm blind here is the bug I meant
|
My own understanding is also a bit wrong...
We should alter the orderby statement to always return exact matched keys first, regardless of position in the list |
Created a followup #2267 |
In the old implementation, it assumes that there will be no duplicate uploads of caches with the same key.
But in fact, some actions like
actions/setup-go
will do something like:It will result in a failure (though it will actually be ignored) with the following log:
To support it, this PR introduces some changes.
I have tested the code with a custom act_runner. It works well and is compatible with old data.