-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Index entries in action cache directory by SHA #2658
base: master
Are you sure you want to change the base?
Index entries in action cache directory by SHA #2658
Conversation
Previously they were indexed by ref name, which could be a SHA or a tag/branch name, but if a branch name was used and that branch was updated, the new reusable workflow action wouldn't be pulled
c3e3a15
to
1277c09
Compare
IMHO checking out a single repo for every sha (or even ref) and clone into independent folders is a waste of storage space, clone time and much more. That a branch fails to update is a bug of that implementation, that should be able to update it's worktree My newer implementation of the action cache no longer
I'm all in for removal of the whole old logic that has this defect. planned full transition stopped for the time being, I'm neutral here you can proceed supporting this |
@ChristopherHX I agree that using the new action cache would be better, but since as you said for the time being a full transition won't be happening, I believe it's important to support this. I initially faced this issue when using Gitea's action runner which is used for CI/CD, not just local running of actions, which is forked from this, and there it was a PITA to remove the cache. I also noticed I wasn't using the run context auth token to perform the listing operation, hence the PR update. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2658 +/- ##
==========================================
+ Coverage 61.56% 68.55% +6.99%
==========================================
Files 53 72 +19
Lines 9002 11070 +2068
==========================================
+ Hits 5542 7589 +2047
+ Misses 3020 2908 -112
- Partials 440 573 +133 ☔ View full report in Codecov by Sentry. |
Previously they were indexed by ref name, which could be a SHA or a tag/branch name, but if a branch name was used and that branch was updated, the new reusable workflow action wouldn't be pulled.
This meant the user would have to delete the associated cache entry to be able to use the new version of the reusable workflow. If the user really wants stability, they should specify the reusable workflow by
SHA instead of by branch name/tag.
Ready to merge on my side.