[PR #2153] [MERGED] fix: match cache restore-keys in creation reverse order #2289

Closed
opened 2026-03-01 21:54:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/2153
Author: @fuufen
Created: 1/15/2024
Status: Merged
Merged: 1/20/2024
Merged by: @mergify[bot]

Base: masterHead: cache-restore-order


📝 Commits (4)

  • a3c60bc Match cache restore-keys in creation reverse order
  • 6f084c7 Match full prefix when selecting cache
  • 1acd0e6 Merge branch 'master' into cache-restore-order
  • c0d859d Merge branch 'master' into cache-restore-order

📊 Changes

1 file changed (+7 additions, -1 deletions)

View changed files

📝 pkg/artifactcache/handler.go (+7 -1)

📄 Description

Fixes https://github.com/nektos/act/issues/1823

Will now return from cache in the order mentioned in GitHub Actions cache docs:

When a key doesn't match directly, the action searches for keys prefixed with the restore key. If there are multiple partial matches for a restore key, the action returns the most recently created cache.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/2153 **Author:** [@fuufen](https://github.com/fuufen) **Created:** 1/15/2024 **Status:** ✅ Merged **Merged:** 1/20/2024 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `cache-restore-order` --- ### 📝 Commits (4) - [`a3c60bc`](https://github.com/nektos/act/commit/a3c60bcff3a8175e8bd1ebd5ba7c0e36644a0c5a) Match cache restore-keys in creation reverse order - [`6f084c7`](https://github.com/nektos/act/commit/6f084c70ad67c212b0abe1efba35e6e46f009c2c) Match full prefix when selecting cache - [`1acd0e6`](https://github.com/nektos/act/commit/1acd0e6859d229fc8861f372bd442212bb182611) Merge branch 'master' into cache-restore-order - [`c0d859d`](https://github.com/nektos/act/commit/c0d859dce9bcea7a29f4efbaa3554b3170c73421) Merge branch 'master' into cache-restore-order ### 📊 Changes **1 file changed** (+7 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkg/artifactcache/handler.go` (+7 -1) </details> ### 📄 Description Fixes https://github.com/nektos/act/issues/1823 Will now return from cache in the order mentioned in GitHub Actions cache [docs](https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key): > When a key doesn't match directly, the action searches for keys prefixed with the restore key. If there are multiple partial matches for a restore key, the action returns the most recently created cache. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:54:48 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#2289
No description provided.