GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add `lookup-only` option by cdce8p · Pull Request #1041 · actions/cache

Conversation

@cdce8p

@cdce8p cdce8p commented Dec 23, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Description

Add an advanced option to skip downloading the cache entry.

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 lookup-only 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ktranada reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@cdce8p
cdce8p requested a review from a team as a code owner December 23, 2022 18:45
@github-actions
github-actions Bot requested a review from tanuj077 December 23, 2022 18:45
@github-actions github-actions Bot assigned tanuj077 Dec 23, 2022
@cdce8p cdce8p mentioned this pull request Dec 23, 2022
Skip download option (allow only to check if cache exists for the given key) #901
Closed
@kotewar
kotewar self-requested a review December 26, 2022 04:52
cdce8p added 3 commits January 8, 2023 11:52
@cdce8p
Add new actions/cache version (with dryRun support)
eda4a77
@cdce8p
Add dry-run option
1bb6d25
@cdce8p
Changes after rebase
e614c58
@kotewar kotewar added the area:granular-control Issues related to granular control in saving or restoring cache label Jan 9, 2023
@kotewar
kotewar removed the request for review from tanuj077 January 10, 2023 07:10
@kotewar
Merge branch 'main' into restore-dry-run
09a1e3e
kotewar
kotewar reviewed Jan 16, 2023
View reviewed changes
Comment thread src/restoreImpl.ts Outdated
const enableCrossOsArchive = utils.getInputAsBool(
Inputs.EnableCrossOsArchive
);
const dryRun = utils.getInputAsBool(Inputs.DryRun);

@kotewar kotewar Jan 16, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

Did you try running a sample workflow of this version of action with cache action?
As cache action doesn't have this input and only restore action has, I'm curious if it throws any warning with this implementation?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Jan 16, 2023

Copy link
Copy Markdown
Contributor Author

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.

Not sure I understand your question correctly.

The dry-run input is defined for both the normal cache and also the cache/restore action with default: 'false'.

I'm curious if it throws any warning with this implementation?

Even if it wouldn't be defined, the code shouldn't throw an error. utils.getInputAsBool uses core.getInput under the hood which returns an empty string for undefined variables. The result would thus still be false.

cache/src/utils/actionUtils.ts

Lines 55 to 60 in 22cbf49

export function getInputAsBool(
name: string,
options?: core.InputOptions
): boolean {
const result = core.getInput(name, options);
return result.toLowerCase() === "true";

actions/toolkit -> core.ts

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Jan 16, 2023

Copy link
Copy Markdown
Contributor Author

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.

Pushed a small update for the readmes to reflect the changes in action.yml.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kotewar kotewar Jan 17, 2023

Copy link
Copy Markdown
Contributor

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.

Got it, I was under assumption that this input is only for the restore action.
Which brings me to my next question, how is the behaviour in case of the cache action?
Usually the cache action saves cache in the post step when cache-hit output is set to false. Wouldn't unnecessary caches be saved when dry-run:true and no cache is found?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Jan 17, 2023

Copy link
Copy Markdown
Contributor Author

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.

Which brings me to my next question, how is the behaviour in case of the cache action?
Usually the cache action saves cache in the post step when cache-hit output is set to false. Wouldn't unnecessary caches be saved when dry-run:true and no cache is found?

I don't think so. The main use case I have in mind for it would depend on saving the cache afterwards. dry-run: 'true' is meant to speed up the case where the cache would be created from scratch anyway. If no exact cache is found, it still needs to be created and stored after that to be able to use it for the next run.

This works best, if restore-keys is left empty as downloading those would be skipped as well. However, it can still be archived by stacking the cache/restore (with dry-run: 'true') and normal cache (with restore-keys) action. The first would be there to filter out exact matches, while the following steps would only run if cache-hit is false.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Jan 17, 2023

Copy link
Copy Markdown
Contributor Author

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.

Can we name it better such that the name suits both actions/cache and actions/cache/restore action?

Sure, dry-run was just the first name that came to mind but I can see how it can be confusing.
What do you think of skip-download?

I also though about restore-dry-run or skip-restore but those don't capture the essence of this option or can be misleading as well. I'm open to other suggestions though.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kotewar kotewar Jan 17, 2023

Copy link
Copy Markdown
Contributor

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.

skip-download won't make sense for the restore action right? skip-download sounds more like save-only.

restore-dry-run is still close. My suggestion would be to use something like check-key (although not quite sure what the perfect name here could be), @bishal-pdMSFT do suggest us something that you feel would be good here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Jan 17, 2023

Copy link
Copy Markdown
Contributor Author

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.

skip-download won't make sense for the restore action right?

I'd disagree. Skipping the download is what's happing internally, regardless of cache or restore action. It's also the term I used naturally to describe the parameter in the readme. That's why I thought it might be a good fit.

My suggestion would be to use something like check-key

Just thinking about it, I could imagine that users could be confused by that, especially if the default is false. Is the key not checked unless it's set to true?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kotewar kotewar Jan 17, 2023

Copy link
Copy Markdown
Contributor

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.

skip-download won't make sense for the restore action right?

My reason of saying the same was - downloading is the main job of the restore action and the restore step in the cache action. For cache action, the name skip-download is still fine, but for restore action, if restore (download) itself is not happening then I see a chance of confusion for the users thinking what it would even do if not download the cache itself. 😕 Hence I was tilting more towards something that tell check-key(-but-dont-download)

Few more suggestions from my end...

How about going in the direction of peek like we use in stacks, just see but don't do anything.
Examples:
peek-key / peek-cache
or
lookup / lookup-only
or
spy

Is the key not checked unless it's set to true?

True, it will create a confusion. 😅

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Jan 17, 2023

Copy link
Copy Markdown
Contributor Author

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.

For cache action, the name skip-download is still fine, but for restore action, if restore (download) itself is not happening then I see a chance of confusion for the users thinking what it would even do if not download the cache itself.

Just a thought, would it be enough to expose the option only for cache? On the one hand it would address the main use case, on the other there is some value in exposing the option for all actions.

Hence I was tilting more towards something that tell check-key(-but-dont-download)

lookup-only sounds like it could fit. It would make sense in the docs as well. Something like

* `lookup-only` - Skip downloading cache. Only check if cache entry exists. Default: false

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cdce8p added 2 commits January 16, 2023 23:08
@cdce8p
Update readme
d1960e6
@cdce8p
Rename option to lookup-only
2ef4e06
@kotewar

kotewar commented Jan 30, 2023

Copy link
Copy Markdown
Contributor

Hi @cdce8p, 👋🏽

We had an internal discussion within our team and we felt like this feature might affect the extensibility of the code and feel that having a new action for the same (something like check as suggested by some users) would make more sense from maintenance perspective.

For now we have added the work needed for this new action in our backlog and we will pick this up in the future. In the meantime, if you would want to contribute for the same, you are welcome to do so. :)

Thanks for your contribution, we really appreciate your efforts here. ❤️

We can go ahead with the other PR of yours. I have requested a small test case addition in the same.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cdce8p cdce8p mentioned this pull request Jan 30, 2023
Add check action #1095
Closed
7 of 10 tasks
cdce8p added 3 commits January 30, 2023 22:31
@cdce8p
Merge branch 'main' into restore-dry-run
b60c82c
@cdce8p
Update test name
9478269
@cdce8p
Update package.json + changelog
c022fd8
@cdce8p cdce8p changed the title Add dry-run option Add lookupOnly option Jan 30, 2023
@cdce8p cdce8p changed the title Add lookupOnly option Add lookup-only option Jan 30, 2023
@cdce8p

cdce8p commented Jan 30, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Hi @kotewar,

thanks for the update. After the other PR was done, I took some time today to think about this one some more.

I can understand your point about maintenance. So I did implement a separate new check action. However while writing it and especially the readme, I noticed something interesting. The outputs provided by the current restore actions are exactly the ones I would have chosen for the check one as well. To the point that the final implementation is fairly similar to the approach here, just not with a separate input but a dedicated action instead. That action just uses the extended restore implementation.

Furthermore, it's worth to consider the main use case again and what from the user perspective might be a good solution.

Use case
The main use is probably in a build job to check if a cache entry exists and, if not, to build and save a new one. This is especially useful if the cache doesn't change much over time while also being quite large >500 MB. Thus the new action would help save the time needed to restore (download + unzip) the cache that wouldn't get used anyway, since tests are in a separate job(-matrix).

This would probably look something like this. Note that it's basically necessary to duplicate all inputs from the initial cache action to cache/check and later cache/save. Additionally, a new cache-hit != 'true' check must be added to make sure we don't try to write to an existing key. AFAICT that's also the workflow proposed by MartijnHols/actions-cache in the Cache build output and skipping build section. I believe that might be where the proposal originally came from.

 build:
   steps:
     - uses: actions/checkout@v3

-    - users: actions/cache@v3
+    - users: actions/cache/check@v3
       id: cache-check
       with:
         path: path/to/dependencies
         key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

     - name: Build
       if: steps.cache-check.outputs.cache-hit != 'true'
       run: /build.sh
 
+    - uses: actions/cache/save@v3
+      if: steps.cache-check.outputs.cache-hit != 'true'
+      with:
+        path: path/to/dependencies
+        key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

 test:
   ...

How would that be different to the input parameter? As the lookup-only input is handled by the cache action directly, there is no need to create an additional step and duplicate inputs.

 build:
   steps:
     - uses: actions/checkout@v3

     - users: actions/cache@v3
       id: cache-check
       with:
+        lookup-only: true
         path: path/to/dependencies
         key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}

     - name: Build
       if: steps.cache-check.outputs.cache-hit != 'true'
       run: /build.sh

 test:
   ...

Conclusion
I can fully understand the maintenance argument, tbh I don't know how other user would use it in their workflows. However, just from my perspective I would probably prefer to use just lookup-only: true. It's simpler and less error prone. There could be an argument to doing both actually. The separate check action is certainly more extendable so if other inputs / outputs only for it need to be added, that would be the way to go. Simultaneously, the lookup-only approach is likely the easiest for the most common use case and could be limited to support just that.

To make it easier to compare both, I've rebased this PR as well.

In any case, both approaches depend on some ground work: actions/toolkit#1286

--
I'm interested to hear your opinion on this.

h-mayorquin reacted with thumbs up emoji kotewar reacted with eyes emoji
All reactions
  • 👍 1 reaction
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vsvipul vsvipul assigned kotewar and unassigned tanuj077 Feb 1, 2023
cdce8p added 6 commits February 9, 2023 16:38
@cdce8p
Merge remote-tracking branch 'upstream/main' into restore-dry-run
53a321b
@cdce8p
Update README
28513d5
@cdce8p
Merge branch 'main' into restore-dry-run
1824983
@cdce8p
Update custom package version
380a44a
@cdce8p
Merge branch 'main' into restore-dry-run
ec19e3f
@cdce8p
Update custom package version
9771ee3
@kotewar

kotewar commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

@cdce8p,
Okay I am in agreement with the last comment. Most use cases I saw wanted to do something when the cache doesn't exist. If they want to save the cache, they can use the cache action and if they want to do something else or not do anything, they can use the restore action with the lookup-only option

Did I understand it correctly?

And talking of the extensibility, if we feel this could be breaking in the future, we might have to remove it and do a major release instead with a different set of inputs.
For that reason, shall we instead add an environment variable like we have for SEGMENT_DOWNLOAD_TIMEOUT_MINS so that we can be sure about the extensibility and then?
I am also discussing this internally with my team, but want to get your views on the same.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cdce8p

cdce8p commented Feb 22, 2023

Copy link
Copy Markdown
Contributor Author

@cdce8p, Okay I am in agreement with the last comment. Most use cases I saw wanted to do something when the cache doesn't exist. If they want to save the cache, they can use the cache action and if they want to do something else or not do anything, they can use the restore action with the lookup-only option

Did I understand it correctly?

Yes, exactly.

And talking of the extensibility, if we feel this could be breaking in the future, we might have to remove it and do a major release instead with a different set of inputs. For that reason, shall we instead add an environment variable like we have for SEGMENT_DOWNLOAD_TIMEOUT_MINS so that we can be sure about the extensibility and then?

From what I've seen the use case outline above is the only one I've seen (so far). If someone really wants some other options, I feel doing something like #1095 in the future, in addition to the lookup-only option, might be the better choice. "Make the common case easy, and the edge case possible."

As for the idea to use an environment variable. I'm not sure this would be a good user experience. SEGMENT_DOWNLOAD_TIMEOUT_MINS works as env variable since it applies to all cache steps in a workflow equally. In contrast lookup-only will probably only be used in a few select cases. Users who would benefit from it likely even have multiple different caches per job (my use cases have). As env variable there is the risk it might get misused accidentally, e.g. added to the workflow env and applied to all cache actions even if that wasn't planned. The correct usage would thus require it to be added to the step env individually. Adding lookup-only: true is just easier and would be a better UX IMO.

I am also discussing this internally with my team, but want to get your views on the same.

Thanks for keeping me in the loop here and valuing my opinion! Appreciate that ❤️

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cdce8p

cdce8p commented Mar 7, 2023

Copy link
Copy Markdown
Contributor Author

@kotewar Just wanted to check, are there any updates?

It would be awesome if we could get this over the finish line soon. Especially as not much work is left. Please let me know if I can help in any way.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kotewar

kotewar commented Mar 8, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Sorry, I was looking into another issues and forgot about this one.
I've approved the toolkit PR. Let's get it released first and then we can release the cache action.

Update - released the toolkit.

cdce8p reacted with thumbs up emoji pascallj reacted with hooray emoji
All reactions
  • 👍 1 reaction
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kotewar
Merge branch 'main' into restore-dry-run
da1f7b9
kotewar
kotewar reviewed Mar 8, 2023
View reviewed changes
Comment thread package.json Resolved

Uh oh!

There was an error while loading. Please reload this page.

@cdce8p
Update @actions/cache to 3.2.0
d57039c
@kotewar

kotewar commented Mar 9, 2023

Copy link
Copy Markdown
Contributor

Hi @cdce8p,

I was testing the action, and found that the log says cache restored, I think that gives wrong info to the user as in the earlier logs we say skipping download

Lookup only - skipping download

Cache restored from key: key1

Screenshot 2023-03-09 at 12 04 54 PM

I was thinking it will better if we print something else or don't print the restored log when its a lookup-only case.

cdce8p reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bishal-pdMSFT
bishal-pdMSFT reviewed Mar 9, 2023
View reviewed changes
Comment thread action.yml Outdated
default: 'false'
required: false
lookup-only:
description: 'Skip downloading cache. Only check if cache entry exists'

@bishal-pdMSFT bishal-pdMSFT Mar 9, 2023

Copy link
Copy Markdown

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.

Does it check for exact match only? If so, then restore-keys will be ignored. May be we should call that out here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kotewar kotewar Mar 9, 2023

Copy link
Copy Markdown
Contributor

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.

restore-keys won't be ignored, we can update the description to something like

description: 'Check if a cache entry exists for the given input(s) (key, restore-keys) without downloading the cache'

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cdce8p reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@bishal-pdMSFT bishal-pdMSFT Mar 9, 2023

Copy link
Copy Markdown

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.

@kotewar @cdce8p what is the output when restore key matches? We can't set cache-hit to true as that is true only in case of exact match.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kotewar kotewar Mar 9, 2023

Copy link
Copy Markdown
Contributor

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.

The output cache-hit will be false in that case.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@pascallj pascallj Mar 9, 2023

Copy link
Copy Markdown

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.

What's the purpose of accepting the restore-keys argument if we only set cache-hit to true when an exact match is found? Or do we return the matched key as well just like the restore action? If I understand correctly there is currently no difference in output between no exact match but a partial match.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Mar 9, 2023

Copy link
Copy Markdown
Contributor Author

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.

If I understand correctly there is currently no difference in output between no exact match but a partial match.

Not quite. cache-hit will be true for exact matches. Think of it like this: When adding lookup-only the action behaves just the same (incl. the outputs) as without the argument. The only difference being that the cache entry isn't actually downloaded and extracted.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@pascallj pascallj Mar 9, 2023

Copy link
Copy Markdown

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.

I see. Normally there is a purpose of using the restore-keys because you are actually restoring something, but cache-hit will still be false. So from the view of the action there is still a cache miss. With this option there are no side effects when a match has occurred on one of the restore-keys.

While writing this I'm wondering: did I always misinterpret the note on cache-hit and does it also return true when an exact hit has been found on one of the restore-keys but just not on a partial match on the restore-keys?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Mar 9, 2023

Copy link
Copy Markdown
Contributor Author

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.

While writing this I'm wondering: did I always misinterpret the note on cache-hit and does it also return true when an exact hit has been found on one of the restore-keys but just not on a partial match on the restore-keys?

cache-hit will only be true for an exact match on the primary key.

cache/src/restoreImpl.ts

Lines 67 to 72 in 940f3d7

const isExactKeyMatch = utils.isExactKeyMatch(
core.getInput(Inputs.Key, { required: true }),
cacheKey
);
core.setOutput(Outputs.CacheHit, isExactKeyMatch.toString());

That doesn't mean though there aren't no side effects now with lookup-only: true if the key doesn't match. cache-matched-key is still set.

cache/src/restoreImpl.ts

Lines 64 to 65 in 940f3d7

// Store the matched cache key in states
stateProvider.setState(State.CacheMatchedKey, cacheKey);

--
In practice, I suspect the option will most likely only be used to check for an exact key (i.e. without restore-keys) but there might be other use cases I haven't though about yet which could use it. In any way as explained here #1041 (comment) the current implementation is not only simpler then a dedicated check action #1095 (which would have provided the option to remove the input) but also provides a better UX.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@pascallj pascallj Mar 9, 2023

Copy link
Copy Markdown

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.

Thank you. If that's always the case, then cache-matched-key should be mentioned as an output of the main action. Currently the only documented output is cache-hit. Therefore I assumed there were no side-effects in that case. Or this option should only be available in the restore action where this output is actually documented.

-- In practice, I suspect the option will most likely only be used to check for an exact key (i.e. without restore-keys) but there might be other use cases I haven't though about yet which could use it. In any way as explained here #1041 (comment) the current implementation is not only simpler then a dedicated check action #1095 (which would have provided the option to remove the input) but also provides a better UX.

I currently have a usecase where I cache all images in a matrix, and use them in another different matrix later on. In the setup I assume that if one file is successfully cached, all files (with the same prefix) are successfully cached. If this assumption is incorrect the matrix workflow will still succeed but less efficient (however it is unlikely that it would ever happen). It would be a waste to spin up the entire caching matrix just to check each key for a match. During the matrix workflow, each job uses only one file so there is no need to cache them into one key.

But in this case I can check for a match on one particular key instead and it will still have the same result.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kotewar kotewar Mar 9, 2023

Copy link
Copy Markdown
Contributor

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.

I agree, cache-matched-key (and even cache-primary-key like we have in restore action) will be helpful in the main action's output. We can plan to add it. In case anyone wants to contribute for the same, please feel free to do so. 😄

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pascallj reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
bishal-pdMSFT
bishal-pdMSFT reviewed Mar 9, 2023
View reviewed changes
Comment thread __tests__/restore.test.ts Outdated
expect(failedMock).toHaveBeenCalledTimes(0);
});

test("restore with lookup-only set", async () => {

@bishal-pdMSFT bishal-pdMSFT Mar 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

Should this test be moved to restoreImpl.tests.ts as it is a common functionality?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Mar 9, 2023

Copy link
Copy Markdown
Contributor Author

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.

Happy to do so but I think restore.test.ts does fit. The way I understand it is that restoreImpl.test.ts include all tests directly related to the cache restore, e.g. what happens if a key is found / want when it isn't, the path matches / doesn't match. In contrast restore.test.ts tests additional functionality, like failOnCacheMiss or now lookupOnly.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kotewar kotewar Mar 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

Can we instead a new test in restoreImpl.tests.ts to test the behaviour when lookupOnly is set to true? I think that way both files will cover their respective code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@cdce8p cdce8p Mar 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

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.

Hope I understood you correctly. As the test already checked the behavior of lookupOnly: true, I moved it to restoreImpl.test.ts. Please let me know if you had something else in mind.

lookupOnly: false is implicitly tested in every other test case as this is the default behavior.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@kotewar kotewar Mar 9, 2023

Copy link
Copy Markdown
Contributor

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.

The only thing I had in mind was to check for the behavior of lookupOnly: true in the restoreImpl tests, than the wrapper code. I think what you've done looks fine as restoreImpl.test.ts was missing a lookupOnly: true case which it has now. :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cdce8p
Code review
84097c0
@cdce8p

cdce8p commented Mar 9, 2023

Copy link
Copy Markdown
Contributor Author

I was thinking it will better if we print something else or don't print the restored log when its a lookup-only case.

I do believe it's useful to know which cache would have been restored. Updated the log statement.

kotewar reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

kotewar
kotewar reviewed Mar 9, 2023
View reviewed changes
Comment thread src/restoreImpl.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

cdce8p added 2 commits March 9, 2023 11:46
@cdce8p
Update log statement
1840896
@cdce8p
Move test case
b417e12
kotewar
kotewar approved these changes Mar 9, 2023
View reviewed changes

@kotewar kotewar left a comment

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kotewar
kotewar merged commit 940f3d7 into actions:main Mar 9, 2023
@cdce8p
cdce8p deleted the restore-dry-run branch March 9, 2023 12:36
@kotewar

kotewar commented Mar 9, 2023

Copy link
Copy Markdown
Contributor

Hey @cdce8p 👋🏽

Thanks a lot of your contribution and apologies for the delay in reviewing.

I've released the new version v3.3.0 to marketplace and also tagged v3 to the latest version.

Thanks again for your great work, we appreciate it. 😊 ❤️

pascallj reacted with hooray emoji cdce8p reacted with heart emoji lvpx reacted with rocket emoji
All reactions
  • 🎉 1 reaction
  • ❤️ 1 reaction
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cdce8p

cdce8p commented Mar 9, 2023

Copy link
Copy Markdown
Contributor Author

Thanks @kotewar ❤️

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pascallj pascallj mentioned this pull request Mar 9, 2023
Use lookup-only action to check if cache exists chenxiaolong/avbroot#81
Merged
dapirian referenced this pull request in trunk-io/plugins Mar 9, 2023
@renovate
Update all non-major dependencies (#191)
6076efe
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/cache](https://togithub.com/actions/cache) | action | minor |
`v3.2.4` -> `v3.3.0` |
| [github/codeql-action](https://togithub.com/github/codeql-action) |
action | patch | `v2.2.3` -> `v2.2.5` |
| [trunk-io/trunk-action](https://togithub.com/trunk-io/trunk-action) |
action | patch | `v1.0.6` -> `v1.0.7` |

---

### Release Notes

<details>
<summary>actions/cache</summary>

### [`v3.3.0`](https://togithub.com/actions/cache/releases/tag/v3.3.0)

[Compare
Source](https://togithub.com/actions/cache/compare/v3.2.6...v3.3.0)

#### What's Changed

- Bug: Permission is missing in cache delete example by
[@&#8203;kotokaze](https://togithub.com/kotokaze) in
[https://github.com/actions/cache/pull/1123](https://togithub.com/actions/cache/pull/1123)
- Add `lookup-only` option by
[@&#8203;cdce8p](https://togithub.com/cdce8p) in
[https://github.com/actions/cache/pull/1041](https://togithub.com/actions/cache/pull/1041)

#### New Contributors

- [@&#8203;kotokaze](https://togithub.com/kotokaze) made their first
contribution in
[https://github.com/actions/cache/pull/1123](https://togithub.com/actions/cache/pull/1123)

**Full Changelog**: actions/cache@v3...v3.3.0

### [`v3.2.6`](https://togithub.com/actions/cache/releases/tag/v3.2.6)

[Compare
Source](https://togithub.com/actions/cache/compare/v3.2.5...v3.2.6)

##### What's Changed

- Updated branch in Force deletion of caches by
[@&#8203;t-dedah](https://togithub.com/t-dedah) in
[https://github.com/actions/cache/pull/1108](https://togithub.com/actions/cache/pull/1108)
- Fix zstd not being used after zstd version upgrade to 1.5.4 on hosted
runners by [@&#8203;pdotl](https://togithub.com/pdotl) in
[https://github.com/actions/cache/pull/1118](https://togithub.com/actions/cache/pull/1118)

**Full Changelog**: actions/cache@v3...v3.2.6

### [`v3.2.5`](https://togithub.com/actions/cache/releases/tag/v3.2.5)

[Compare
Source](https://togithub.com/actions/cache/compare/v3.2.4...v3.2.5)

##### What's Changed

- Rewrite readmes by [@&#8203;jsoref](https://togithub.com/jsoref) in
[https://github.com/actions/cache/pull/1085](https://togithub.com/actions/cache/pull/1085)
- Fixed typos and formatting in docs by
[@&#8203;kotewar](https://togithub.com/kotewar) in
[https://github.com/actions/cache/pull/1076](https://togithub.com/actions/cache/pull/1076)
- Fixing paths for OSes by
[@&#8203;kotewar](https://togithub.com/kotewar) in
[https://github.com/actions/cache/pull/1101](https://togithub.com/actions/cache/pull/1101)
- Release patch version update by
[@&#8203;Phantsure](https://togithub.com/Phantsure) in
[https://github.com/actions/cache/pull/1105](https://togithub.com/actions/cache/pull/1105)

##### New Contributors

- [@&#8203;jsoref](https://togithub.com/jsoref) made their first
contribution in
[https://github.com/actions/cache/pull/1085](https://togithub.com/actions/cache/pull/1085)

**Full Changelog**: actions/cache@v3...v3.2.5

</details>

<details>
<summary>github/codeql-action</summary>

###
[`v2.2.5`](https://togithub.com/github/codeql-action/compare/v2.2.4...v2.2.5)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.2.4...v2.2.5)

###
[`v2.2.4`](https://togithub.com/github/codeql-action/compare/v2.2.3...v2.2.4)

[Compare
Source](https://togithub.com/github/codeql-action/compare/v2.2.3...v2.2.4)

</details>

<details>
<summary>trunk-io/trunk-action</summary>

###
[`v1.0.7`](https://togithub.com/trunk-io/trunk-action/releases/tag/v1.0.7)

[Compare
Source](https://togithub.com/trunk-io/trunk-action/compare/v1.0.6...v1.0.7)

Introduce a caching-only mode, controlled via `check-mode:
populate_cache_only`.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/trunk-io/plugins).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTkuMiIsInVwZGF0ZWRJblZlciI6IjM0LjE1OS4yIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate Bot mentioned this pull request Jun 16, 2023
Bump dependencies gitfool/Pulumi.Dungeon#98
Closed
1 task
kayman-mk referenced this pull request in Hapag-Lloyd/terraform-aws-bastion-host-ssm Nov 23, 2023
@renovate
chore(deps): update actions/cache action to v3.3.2 (#178)
2cf4e23
[![Mend Renovate logo
banner](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/cache](https://togithub.com/actions/cache) | action | minor |
`v3.2.5` -> `v3.3.2` |

---

### Release Notes

<details>
<summary>actions/cache (actions/cache)</summary>

### [`v3.3.2`](https://togithub.com/actions/cache/releases/tag/v3.3.2)

[Compare
Source](https://togithub.com/actions/cache/compare/v3.3.1...v3.3.2)

##### What's Changed

- Fixed readme with new segment timeout values by
[@&#8203;kotewar](https://togithub.com/kotewar) in
[https://github.com/actions/cache/pull/1133](https://togithub.com/actions/cache/pull/1133)
- Readme fixes by [@&#8203;kotewar](https://togithub.com/kotewar) in
[https://github.com/actions/cache/pull/1134](https://togithub.com/actions/cache/pull/1134)
- Updated description of the lookup-only input for main action by
[@&#8203;kotewar](https://togithub.com/kotewar) in
[https://github.com/actions/cache/pull/1130](https://togithub.com/actions/cache/pull/1130)
- Change two new actions mention as quoted text by
[@&#8203;bishal-pdMSFT](https://togithub.com/bishal-pdMSFT) in
[https://github.com/actions/cache/pull/1131](https://togithub.com/actions/cache/pull/1131)
- Update Cross-OS Caching tips by
[@&#8203;pdotl](https://togithub.com/pdotl) in
[https://github.com/actions/cache/pull/1122](https://togithub.com/actions/cache/pull/1122)
- Bazel example (Take
[#&#8203;2](https://togithub.com/actions/cache/issues/2)️⃣) by
[@&#8203;vorburger](https://togithub.com/vorburger) in
[https://github.com/actions/cache/pull/1132](https://togithub.com/actions/cache/pull/1132)
- Remove actions to add new PRs and issues to a project board by
[@&#8203;jorendorff](https://togithub.com/jorendorff) in
[https://github.com/actions/cache/pull/1187](https://togithub.com/actions/cache/pull/1187)
- Consume latest toolkit and fix dangling promise bug by
[@&#8203;chkimes](https://togithub.com/chkimes) in
[https://github.com/actions/cache/pull/1217](https://togithub.com/actions/cache/pull/1217)
- Bump action version to 3.3.2 by
[@&#8203;bethanyj28](https://togithub.com/bethanyj28) in
[https://github.com/actions/cache/pull/1236](https://togithub.com/actions/cache/pull/1236)

##### New Contributors

- [@&#8203;vorburger](https://togithub.com/vorburger) made their first
contribution in
[https://github.com/actions/cache/pull/1132](https://togithub.com/actions/cache/pull/1132)
- [@&#8203;jorendorff](https://togithub.com/jorendorff) made their first
contribution in
[https://github.com/actions/cache/pull/1187](https://togithub.com/actions/cache/pull/1187)
- [@&#8203;chkimes](https://togithub.com/chkimes) made their first
contribution in
[https://github.com/actions/cache/pull/1217](https://togithub.com/actions/cache/pull/1217)
- [@&#8203;bethanyj28](https://togithub.com/bethanyj28) made their first
contribution in
[https://github.com/actions/cache/pull/1236](https://togithub.com/actions/cache/pull/1236)

**Full Changelog**: actions/cache@v3...v3.3.2

### [`v3.3.1`](https://togithub.com/actions/cache/releases/tag/v3.3.1)

[Compare
Source](https://togithub.com/actions/cache/compare/v3.3.0...v3.3.1)

##### What's Changed

- Reduced download segment size to 128 MB and timeout to 10 minutes by
[@&#8203;kotewar](https://togithub.com/kotewar) in
[https://github.com/actions/cache/pull/1129](https://togithub.com/actions/cache/pull/1129)

**Full Changelog**: actions/cache@v3...v3.3.1

### [`v3.3.0`](https://togithub.com/actions/cache/releases/tag/v3.3.0)

[Compare
Source](https://togithub.com/actions/cache/compare/v3.2.6...v3.3.0)

##### What's Changed

- Bug: Permission is missing in cache delete example by
[@&#8203;kotokaze](https://togithub.com/kotokaze) in
[https://github.com/actions/cache/pull/1123](https://togithub.com/actions/cache/pull/1123)
- Add `lookup-only` option by
[@&#8203;cdce8p](https://togithub.com/cdce8p) in
[https://github.com/actions/cache/pull/1041](https://togithub.com/actions/cache/pull/1041)

##### New Contributors

- [@&#8203;kotokaze](https://togithub.com/kotokaze) made their first
contribution in
[https://github.com/actions/cache/pull/1123](https://togithub.com/actions/cache/pull/1123)

**Full Changelog**: actions/cache@v3...v3.3.0

### [`v3.2.6`](https://togithub.com/actions/cache/releases/tag/v3.2.6)

[Compare
Source](https://togithub.com/actions/cache/compare/v3.2.5...v3.2.6)

##### What's Changed

- Updated branch in Force deletion of caches by
[@&#8203;t-dedah](https://togithub.com/t-dedah) in
[https://github.com/actions/cache/pull/1108](https://togithub.com/actions/cache/pull/1108)
- Fix zstd not being used after zstd version upgrade to 1.5.4 on hosted
runners by [@&#8203;pdotl](https://togithub.com/pdotl) in
[https://github.com/actions/cache/pull/1118](https://togithub.com/actions/cache/pull/1118)

**Full Changelog**: actions/cache@v3...v3.2.6

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/Hapag-Lloyd/terraform-aws-bastion-host-ssm).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuNTkuOCIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Dakshjain1 pushed a commit to SvavaCapital/cache that referenced this pull request Apr 19, 2024
@cdce8p @kotewar @Dakshjain1
Add lookup-only option (actions#1041)
ade52fb
* Add new actions/cache version (with dryRun support)

* Add dry-run option

* Changes after rebase

* Update readme

* Rename option to lookup-only

* Update test name

* Update package.json + changelog

* Update README

* Update custom package version

* Update custom package version

* Update @actions/cache to 3.2.0

* Code review

* Update log statement

* Move test case

---------

Co-authored-by: Sankalp Kotewar <[email protected]>
@coderabbitai coderabbitai Bot mentioned this pull request Apr 21, 2026
ci: add cache loco1842/cmdex#25
Merged
hub966 added a commit to dev394582/cache that referenced this pull request Jul 24, 2026
@hub966 @lvpx
@kotokaze @cdce8p @kotewar Bishal Prasad @davidB @vorburger Vipul @jorendorff @jidicula @chkimes @bethanyj28 @to-s @janisz @takost @robherley @yacaovsnc @todgru @ottlinger @Olegt0rr @joshmgross @fchimpan @x612skm @Link- @Jcambass @mackey0225 @llakala @idleberg @jww3 @dependabot @janco-absa @Tobbe @sebbalex @salmanmkc @nebuk89 @GhadimiR @XZTDean @github-advanced-security @RyPeck
Merge pull request actions#1747 from actions/yacaovsnc/update-depende…
5293c36
…ncy (#1)

* 3.2.6

* Bump @actions/cache version

* Update package-lock.json

* Fix zstd breaking after new version release

* Fix license

* Update Cross-OS Caching tips

* docs: Add missing permission in cache delete example (actions#1123)

* Add `lookup-only` option (actions#1041)

* Add new actions/cache version (with dryRun support)

* Add dry-run option

* Changes after rebase

* Update readme

* Rename option to lookup-only

* Update test name

* Update package.json + changelog

* Update README

* Update custom package version

* Update custom package version

* Update @actions/cache to 3.2.0

* Code review

* Update log statement

* Move test case

---------

Co-authored-by: Sankalp Kotewar <[email protected]>

* Change two new actions mention as quoted text

* Add example for Bazel

* Fix example for Bazel

* Reduced download segment size to 128 MB and timeout to 10 minutes (actions#1129)

* Changed segment size to 128mb & timeout to 10 min

* Updated license

* Updated licenses

* Fixed readme with new segment timeout values (actions#1133)

* Readme fixes (actions#1134)

* Update README.md

* Update README.md

* Create separate Linux/macOS examples for Bazel

* Updated description of the lookup-only input for main action (actions#1130)

* Updated description of the lookup-only input for main action

* Update README.md

Co-authored-by: Bishal Prasad <[email protected]>

* Update README.md

---------

Co-authored-by: Bishal Prasad <[email protected]>

* Clarify that macos-latest image has bazelisk

* Remove actions to add new PRs and issues to a project board

The project doesn't seem to exist, so this always fails.

* Consume latest toolkit and fix dangling promise bug (actions#1217)

* Consume latest toolkit and fix dangling promise bug

* Pass earlyExit parameter to run method so tests don't hang

* Pass earlyExit parameter to run method so tests don't hang

* Refactor restore files to have better patterns for testing

* style

* bump action version to 3.3.2

* Add to RELEASES.md

* added save-always input

* Update action.yml

Co-authored-by: Tomasz Janiszewski <[email protected]>

* Revert "Update action.yml"

This reverts commit 3b7dac1.

* Update action to node20

* Update check-dist node version

* Rebuild dist

* Update license

* replace deprecated @zeit/ncc with @vercel/ncc

* Bump version

* Update "only-" actions to node20

* Apply workaround for earlyExit

* Fix format

* cache v3.3.3

* licensed

* Fix dist

* Update README.md

* Update examples

* update documentation to use <action>@v4

* add release action

* update @actions/cache

* licensed cache

* Fix fail-on-cache-miss not working

* Bump version

* Add test case for process exit

Co-authored-by: Bethany <[email protected]>

* Update README.md and use v4 of checkout action (actions#1437)

Update examples to use latest available checkout action v4.

* Explicit use bash for Windows (actions#1377)

Co-authored-by: Josh Gross <[email protected]>

* Fix cache-hit output when cache missed (actions#1404)

* fix: cache-hit output

* fix: Output chache hit timing

* fix: Output chache hit timing

---------

Co-authored-by: Josh Gross <[email protected]>

* Clarify that the `restore-keys` input is a string in the docs  (actions#1434)

* Fix Description for restore-keys at Readme

As previously the restore-keys were defined as an ordered lists which is
wrong as per the issue description where the actual format is a
multi-line string with one key per line.

* Added a space between the sentence of restore-keys description

While at the PR review it's been identified there's a need for a space
between the sentence

	```
	An ordered multiline string listing the prefix-matched keys,that are
	used for restoring stale cache if no cache hit occurred for key.
	```

where it's written as "prefix-matched keys,that are" this commit will
address the review comment and introduce a space between
"prefix-matched keys, that are" and change the sentence to

	```
	An ordered multiline string listing the prefix-matched keys, that are
        used for restoring stale cache if no cache hit occurred for key.
	```

* Change restore-keys description at cache/restore/action.yml and cache/action.yml

* Add workflow file for publishing releases to immutable action package

This workflow file publishes new action releases to the immutable action package of the same name as this repo.

This is part of the Immutable Actions project which is not yet fully released to the public. First party actions like this one are part of our initial testing of this feature.

* Deprecate `save-always` input (actions#1452)

The `save-always` input added in v4 is not
working as intended due to
`post-if` expressions not supporting the input
context.
To avoid breaking users who have already added
this input to their workflows, it is being
deprecated now and will be removed
in the next major version (v5).
See actions#1315 for more details.

* Fix typo: depening -> depending (actions#1462)

Co-authored-by: Josh Gross <[email protected]>

* restore action's README now references v4 instead of v3 (actions#1445)

Co-authored-by: Josh Gross <[email protected]>

* Prepare `4.1.0` release (actions#1464)

* Restore original behavior of `cache-hit` output (actions#1467)

* Restore original behavior of `cache-hit` output

* Bump version to 4.1.1

* Add Bun example (actions#1456)

* Add Bun example

* Fix Bun Windows example

* Revise `isGhes` logic

* ran `npm run build`

* appease the linter

* added unit tests

* Bump braces from 3.0.2 to 3.0.3

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](micromatch/braces@3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* Create dependabot.yml

* Prepare release 4.1.2

* Bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump actions/stale from 3 to 9

Bumps [actions/stale](https://github.com/actions/stale) from 3 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@v3...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump actions/setup-node from 3 to 4

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Bump github/codeql-action from 2 to 3

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Upgrade @actions/cache to 4.0.0

* Update RELEASES.md

* Upgrade @vercel/ncc to 0.38.3

* Upgrade @actions/core to 1.11.1 and other deps

* Add licensed output

* Add reviewed licensed packages

* Add lodash to list of reviewed licenses

* Add licensed output

* Rerun CI

* Add 3.4.0 release notes

* Correct GitHub Spelling in caching-strategies.md (actions#1526)

GitHub was spelled incorrectly 3 lines under the Understanding how to choose path section

* docs: Make the "always save prime numbers" example more clear (actions#1525)

* Update force deletion docs due a recent deprecation (actions#1500)

* fix: update force deletion docs due a recent deprecation

* fix: applied josh's suggestions

---------

Co-authored-by: Josh Gross <[email protected]>

* bump @actions/cache to v4.0.1

* Update publish-immutable-actions.yml

* bump @actions/cache to v4.0.2, prep for v4.2.2 release

* add changes

* changed

* mask whole url

* debugging

* type

* artifact changes

* update cache package to mask whole sas to the end of the line

* mask

* update

* latest test before pr

* updated cache with latest changes

* updates

* new package

* update cache with main

* Update to use the latest version of the cache package to obfuscate the SAS

* Update releases.md

* Update README.md

* update to node24

* update licences

* @protobuf-ts/plugin to dev dependencies

* Add licensed output

* Add licensed output

* Update the licensed workflow to use the latest version

* Fix the workflow to use licensed from source

* Fix bundle exec

* Fix with another approach

* Prepare release 4.2.4

* Add note on runner versions

* license and compiled

* Approve license

* Upgrade actions/cache to 4.1.0 and prepare 4.3.0 release

* Update licensed cache

* Update cache to use local cache package and Node 24 support

- Use local cache package with file:../packages/cache instead of published version
- Update all action.yml files to use node24 runtime
- Update dependencies to support Node 24 (@types/[email protected])
- Rebuild dist files with local cache package
- Add engines field requiring node >=24

* Build dist files for Node 24

* chore: rebuild dist with local @actions/cache (core v2, exec v2)

* chore: use local @actions/core, exec, io packages

* Build with @actions/cache v5.0.0

* Use published @actions/core, exec, io v2.0.0

* chore: rebuild with @actions/cache v5.0.0

Uses updated cache package that removes @azure/ms-rest-js dependency to fix Node 24 punycode deprecation warning.

* Update with core 2.0.1 which has exec 2.0.0

* chore: update @actions/core to 2.0.1

* Latest dist with core changes

* Extra dist change

* chore: use published @actions/cache v5.0.0

* chore: update license cache for @actions/cache v5.0.0

* chore: rebuild dist with @actions/cache v5.0.0

* chore: update actions/checkout to v5 in workflow files

* chore: bump version to 5.0.0 for Node.js 24 support

* docs: update README with v5 release notes

* Revert "docs: update README with v5 release notes"

This reverts commit fe92eaf.

* chore: revert README to main branch state

* chore: set version to 4.3.0 for prepare release PR

* chore: rebuild dist with version 4.3.0

* chore: regenerate package-lock.json

* undo readme changes

* Prepare v5.0.0 release

- Bump package version to 5.0.0

- Add v5.0.0 release notes (Node.js 24 runtime + runner requirement)

* docs: update README for v5 release with Node 24 and runner version requirements

* readme note

* docs: highlight v5 runner requirement in releases

* fix: update @actions/cache with storage-blob fix for Node.js 24 punycode deprecation

* peer

* fix: update @actions/cache to ^5.0.1 for Node.js 24 punycode fix

Updates @actions/cache to version 5.0.1 which includes the @azure/storage-blob
update that fixes the punycode deprecation warning on Node.js 24.

* fix: update license files for @actions/cache, fast-xml-parser, and strnum

* fix: add peer property to package-lock.json for dependencies

* chore: release v5.0.1

- Bump version to 5.0.1
- Fix Node.js 24 punycode deprecation warning via @actions/[email protected]
- Updates @azure/storage-blob to ^12.29.1

Related: actions#1685

* docs: Update examples to cache@v5

* docs: Update other actions in examples to the latest version

* Bump actions/cache to 5.0.3

* Add PR link to releases

* Build

* Update licensed record for cache

* license for httpclient

* Add 5.0.3 builds

* Upgrade dependencies and address security warnings

- Bump `@actions/cache` to v5.0.5
- Bump `@actions/core` to v2.0.3

* Add licensed output

* Add review for the @actions/http-client license

* Update contribution docs

* Add note

* Potential fix for code scanning alert no. 52: Workflow does not contain permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Fix permissions for workflows/workflow.yml

* Fix workflow permissions and cleanup

* Cleanup workflow file names

* Update .github/workflows/pr-opened-workflow.yml

Co-authored-by: Copilot <[email protected]>

* Rewrite and simplify

* Add wait for proxy

* Fix resolution

* Add traffic sanity check step

* Fix cache key in examples.md for bun.lock

Updated cache key to use 'bun.lock' instead of 'bun.lockb' for consistency.

* Update dependencies & patch security vulnerabilities

* Add licenses

* Update RELEASES

* Update ts-http-runtime to 0.3.5

* npm run build generated dist files

* licensed changes

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Lovepreet Singh <[email protected]>
Co-authored-by: Kotokaze <[email protected]>
Co-authored-by: Marc Mueller <[email protected]>
Co-authored-by: Sankalp Kotewar <[email protected]>
Co-authored-by: Bishal Prasad <[email protected]>
Co-authored-by: David Bernard <[email protected]>
Co-authored-by: Michael Vorburger <[email protected]>
Co-authored-by: Michael Vorburger ⛑️ <[email protected]>
Co-authored-by: Vipul <[email protected]>
Co-authored-by: Jason Orendorff <[email protected]>
Co-authored-by: Johanan Idicula <[email protected]>
Co-authored-by: Chad Kimes <[email protected]>
Co-authored-by: bethanyj28 <[email protected]>
Co-authored-by: Bethany <[email protected]>
Co-authored-by: to-s <[email protected]>
Co-authored-by: Tomasz Janiszewski <[email protected]>
Co-authored-by: to-s <[email protected]>
Co-authored-by: Tatyana Kostromskaya <[email protected]>
Co-authored-by: Rob Herley <[email protected]>
Co-authored-by: Yang Cao <[email protected]>
Co-authored-by: todgru <[email protected]>
Co-authored-by: P. Ottlinger <[email protected]>
Co-authored-by: Oleg A. <[email protected]>
Co-authored-by: Josh Gross <[email protected]>
Co-authored-by: r4mimu <[email protected]>
Co-authored-by: Soubhik Kumar Mitra <[email protected]>
Co-authored-by: Bassem Dghaidi <[email protected]>
Co-authored-by: Joel Ambass <[email protected]>
Co-authored-by: mackey0225 <[email protected]>
Co-authored-by: Eman Resu <[email protected]>
Co-authored-by: Jan T. Sott <[email protected]>
Co-authored-by: John Wesley Walker III <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: janco-absa <[email protected]>
Co-authored-by: Tobbe Lundberg <[email protected]>
Co-authored-by: Alessandro Sebastiani <[email protected]>
Co-authored-by: Salman Chishti <[email protected]>
Co-authored-by: Ben De St Paer-Gotch <[email protected]>
Co-authored-by: Ryan Ghadimi <[email protected]>
Co-authored-by: XZTDean <[email protected]>
Co-authored-by: Ryan Ghadimi <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Ryan Peck <[email protected]>
@coderabbitai coderabbitai Bot mentioned this pull request Jul 29, 2026
chore(ci): stop rebuilding cross on every release run berachain/bera-reth#280
Open
@coderabbitai coderabbitai Bot mentioned this pull request Aug 7, 2026
🔧 chore: utilize Playwright docker image trevclev0/terminal-quiz#218
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

3 more reviewers
@bishal-pdMSFT bishal-pdMSFT bishal-pdMSFT left review comments
@pascallj pascallj pascallj left review comments
@kotewar kotewar kotewar approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@kotewar kotewar

Labels

area:granular-control Issues related to granular control in saving or restoring cache

Projects

None yet

Milestone

No milestone

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

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@cdce8p @kotewar @bishal-pdMSFT @pascallj @tanuj077
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.