mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[PR #2265] [MERGED] Support overwriting caches #2356
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#2356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/2265
Author: @wolfogre
Created: 3/28/2024
Status: ✅ Merged
Merged: 3/28/2024
Merged by: @mergify[bot]
Base:
master← Head:feature/flush_cache📝 Commits (10+)
dc73717feat: support overwrite cachesdd3e426test: fix case7a70957test: fix get_with_multiple_keys602323cchore: use atomic.Boolec3645btest: improve get_with_multiple_keysd0b261cchore: use ping to improve path61304bffix: wrong CompareAndSwapb29df93test: TestHandler_gcCache18f4ee3chore: lint code556fff3chore: lint code📊 Changes
3 files changed (+239 additions, -118 deletions)
View changed files
📝
pkg/artifactcache/handler.go(+80 -71)📝
pkg/artifactcache/handler_test.go(+152 -30)📝
pkg/artifactcache/model.go(+7 -17)📄 Description
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-gowill 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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.