-
Notifications
You must be signed in to change notification settings - Fork 1
Fix pub cache invalidation when lockfile changes #6
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Project516/setup-flutter
Length of output: 5172
🌐 Web query:
GitHub actions/cache restore-keys primary key miss prefix matching most recently created cache official documentation💡 Result:
In GitHub Actions, when a primary cache
keyresults in a miss, theactions/cache(andactions/cache/restore) action usesrestore-keysto find a fallback cache [1][2]. The process follows these rules for handling cache misses and prefix matching: 1. Primary Key Search: The action first attempts to find an exact match for the providedkey[1][3]. 2. Restore-Keys Sequential Search: If the primarykeyis not found, the action proceeds to search therestore-keyslist in the order they are provided [1]. 3. Prefix Matching: For each entry inrestore-keys, the action searches for any existing cache keys that start with that specificrestore-keystring [1][4]. 4. Most Recently Created: If multiple caches match a givenrestore-keyprefix, the action selects the most recently created cache to restore [1]. If no matches are found after checking all providedrestore-keys, the action concludes with a cache miss (no files are restored) [1]. When a cache is successfully restored via a partial match fromrestore-keys(rather than an exact match of the primarykey), thecache-hitoutput will be set tofalse[5][2][3]. This mechanism is designed to allow your workflow to benefit from partially matching, stale caches—saving time by requiring fewer dependency updates—when an exact, up-to-date cache is unavailable [6][4].Citations:
🏁 Script executed:
Repository: Project516/setup-flutter
Length of output: 279
Remove the broad restore key to enforce lockfile invalidation.
When
pubspec.lockchanges, the primary key misses. The${{ runner.os }}-pub-fallback can restore a cache created with an older lockfile hash. Removerestore-keysto enforce strict lockfile invalidation.🤖 Prompt for AI Agents
Source: MCP tools