Skip to content
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

Clarify that the restore-keys input is a string in the docs #1434

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

x612skm
Copy link
Contributor

@x612skm x612skm commented Jul 18, 2024

Previously the description of restore-keys confusingly implied that it might accept a YAML list, which is wrong. This patch corrects that to say, it's a string.

Closes #1173

@x612skm x612skm requested a review from a team as a code owner July 18, 2024 17:07
README.md Outdated Show resolved Hide resolved
@x612skm x612skm changed the title Fix description for restore-keys at Readme #1173 Fix description for restore-keys at Readme Jul 19, 2024
@x612skm x612skm changed the title Fix description for restore-keys at Readme Clarify that the restore-keys input is a string in the docs Jul 19, 2024
@x612skm x612skm requested a review from webknjaz July 19, 2024 11:06
@x612skm
Copy link
Contributor Author

x612skm commented Jul 19, 2024

@bethanyj28, mind taking a look at this PR?

@joshmgross joshmgross enabled auto-merge (squash) July 31, 2024 16:53
@joshmgross joshmgross disabled auto-merge July 31, 2024 16:54
@@ -54,7 +54,7 @@ If you are using a `self-hosted` Windows runner, `GNU tar` and `zstd` are requir

* `key` - An explicit key for a cache entry. See [creating a cache key](#creating-a-cache-key).
* `path` - A list of files, directories, and wildcard patterns to cache and restore. See [`@actions/glob`](https://github.com/actions/toolkit/tree/main/packages/glob) for supported patterns.
* `restore-keys` - An ordered list of prefix-matched keys to use for restoring stale cache if no cache hit occurred for key.
* `restore-keys` - An ordered multiline string listing the prefix-matched keys, that are used for restoring stale cache if no cache hit occurred for key.
Copy link
Member

Choose a reason for hiding this comment

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

Can you update

cache/restore/action.yml

Lines 11 to 13 in e47d9f9

restore-keys:
description: 'An ordered list of keys to use for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.'
required: false
and

cache/action.yml

Lines 11 to 13 in e47d9f9

restore-keys:
description: 'An ordered list of keys to use for restoring stale cache if no cache hit occurred for key. Note `cache-hit` returns false in this case.'
required: false
to match this new description?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done @joshmgross Mind taking a relook?

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.
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.
	```
@joshmgross joshmgross enabled auto-merge (squash) August 6, 2024 14:26
@joshmgross joshmgross merged commit 57b8e40 into actions:main Aug 6, 2024
14 checks passed
siddhantdange pushed a commit to buildpulse/cache that referenced this pull request Oct 4, 2024
…s#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
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.

Incorrect documentation for restore-keys
3 participants