Skip to content

Conversation

@cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Jan 30, 2023

Description

Alternative or in addition to #1041 as suggested by @kotewar in #1041 (comment).

Add a dedicated action to check if a cache entry exists without actually downloading it.

Note
Requires actions/toolkit#1286

This PR currently links a custom version of actions/toolkit with the PR changes to be able to test it.

Motivation and Context

Fixes #901
Fixes #831
#1020 (comment)
#1020 (comment)

If dependency install / cache setup and the actual tests are split across multiple jobs, it's often unnecessary to restore the cache if an exact cache-hit occurred. Similarly, if the cache is created from scratch, it's only necessary to know if a cache entry already exists.

Using dry-run in these cases saves time and resources, especially for larger caches which don't need to be restored.

How Has This Been Tested?

Added test case and run a test workflow using the feature branch.

Screenshots (if appropriate):

--

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (add or update README or docs)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@cdce8p cdce8p requested a review from a team as a code owner January 30, 2023 21:18
@github-actions github-actions bot requested a review from Phantsure January 30, 2023 21:24
@kotewar kotewar requested review from kotewar and removed request for Phantsure January 31, 2023 09:50
@kotewar kotewar assigned kotewar and unassigned Phantsure Jan 31, 2023
@kotewar
Copy link
Contributor

kotewar commented Jan 31, 2023

@cdce8p, I'll review this shortly and also discuss with my team regarding this PR and your comment on the other one.

This might take some time, but thanks for your contribution again! 😃

@cdce8p
Copy link
Contributor Author

cdce8p commented Feb 19, 2023

Hi @kotewar 👋🏻, any update? Just saw a new issue pop up #1113.

@kotewar
Copy link
Contributor

kotewar commented Feb 21, 2023

Sorry for the delay, I'll review the PR today. @cdce8p

@cdce8p
Copy link
Contributor Author

cdce8p commented Feb 21, 2023

Sorry for the delay, I'll review the PR today. @cdce8p

Awesome, thanks! Just updated all PRs to include the zstd fix.

@cdce8p cdce8p mentioned this pull request Feb 22, 2023
10 tasks
@cdce8p
Copy link
Contributor Author

cdce8p commented Mar 9, 2023

Now that #1041 has been merged, I'm going to close this one. Please feel free to reuse any of it in case something like this should be added in the future.

@cdce8p cdce8p closed this Mar 9, 2023
@cdce8p cdce8p deleted the check branch March 9, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip download option (allow only to check if cache exists for the given key) Allow optionally testing for cache-hit without restoring old cache

3 participants