Skip to content

Add cache restore lookupOnly option - #1286

Merged
kotewar merged 3 commits into
actions:mainfrom
cdce8p:cache-dry-run
Mar 8, 2023
Merged

Add cache restore lookupOnly option#1286
kotewar merged 3 commits into
actions:mainfrom
cdce8p:cache-dry-run

Conversation

@cdce8p

@cdce8p cdce8p commented Dec 23, 2022

Copy link
Copy Markdown
Contributor

This PR adds a lookupOnly option to the cache restore function.
It can be used to check if a cache exists without the need to download it.

Especially useful if e.g. dependency install and actual tests are split across multiple jobs. If the cache restore step for the dependency install has an exact hit, the remaining steps in the job can be skipped. Similarly if the cache is created from scratch and it's just necessary to know if a cache entry already exists.

Would help address
actions/cache#901
actions/cache#831
actions/cache#1020 (comment)
actions/cache#1020 (comment)

Alternative to #1207

CC: @kotewar

@cdce8p
cdce8p requested a review from a team as a code owner December 23, 2022 11:59
@kotewar
kotewar self-requested a review December 26, 2022 04:52
@cdce8p cdce8p mentioned this pull request Jan 30, 2023
10 tasks
@cdce8p cdce8p changed the title Add cache restore dryRun option Add cache restore lookupOnly option Jan 30, 2023

@kotewar kotewar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@kotewar
kotewar merged commit 0e8edb0 into actions:main Mar 8, 2023
@cdce8p
cdce8p deleted the cache-dry-run branch March 8, 2023 12:18
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.

2 participants