-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat(action): Verify no matching cache before save #506
Conversation
Note: this does not have appropriate testing, current status of PR is just production code changes. |
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.
This looks like a great start! I wonder if the failure in the Save Cache job can be addressed by disabling minification.
Commit message: "was indeed a new docker image(s) to save" --> "were indeed new Docker images to save"
f8fd9a2
to
27959c6
Compare
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.
Bummer that ncc replaces cache["getCacheEntry"]
with cache.getCacheEntry
. We will have to copy the corresponding code from @actions/cache
into our repository and modify the visibility of getCacheEntry
to get this to work.
0f26ad9
to
a154f3d
Compare
Prior to saving cache, verify that there is no cache with a matching key already cached. Previously, we checked if a cache key matching our cache was present in the load step; if not, we would then proceed to attempt to save the cache in the save step (assuming we were not in read-only mode and that there were indeed new Docker images to save). This was problematic when the action was run in parallel; in that case, there were multiple, unnecessary cache save attempts when the cache initially missed but was subsequently saved.
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.
LGTM
Fixes #135.
Prior to saving cache, verify that there is no cache with a matching key already cached. Previously, we checked if a cache key matching our cache was present in the load step; if not, we would then proceed to attempt to save the cache in the save step (assuming we were not in read-only mode and that there were indeed new Docker images to save). This was
problematic when the action was run in parallel; in that case, there were multiple, unnecessary cache save attempts when the cache initially missed but was subsequently saved.