-
Notifications
You must be signed in to change notification settings - Fork 61.8k
actions/cache key is not only about exact match #14145
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
Comments
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines. |
In case server has some settings, which don't let some types of SMTP request to be handled, SMTP client may receive 5xx, 4xx, 3xx codes. This patch fixes the problem, when on the client side this SMTP codes are not handled normally. Instead of runtime error and unusual message that there is some connection error. The value of key for cache-step bumped to v4. That is needed for changing postfix of the key. During testing of changes there were troubles with cache-reload described and reported in github/docs#14145. Fixes #13
In case server has some settings, which don't let some types of SMTP request to be handled, SMTP client may receive 5xx, 4xx, 3xx codes. This patch fixes the problem, when on the client side this SMTP codes are not handled normally. Instead of runtime error and unusual message that there is some connection error. The value of key for cache-step bumped to v4. That is needed for changing postfix of the key. During testing of changes there were troubles with cache-reload described and reported in github/docs#14145. Fixes #13
In case server has some settings, which don't let some types of SMTP request to be handled, SMTP client may receive 5xx, 4xx, 3xx codes. This patch fixes the problem, when on the client side this SMTP codes are not handled normally. Instead of runtime error and unusual message that there is some connection error. The value of key for cache-step bumped to v4. That is needed for changing postfix of the key. During testing of changes there were troubles with cache-reload described and reported in github/docs#14145. Fixes #13
In case server has some settings, which don't let some types of SMTP request to be handled, SMTP client may receive 5xx, 4xx, 3xx codes. This patch fixes the problem, when on the client side this SMTP codes are not handled normally. Instead of runtime error and unusual message that there is some connection error. The value of key for cache-step bumped to v4. That is needed for changing postfix of the key. During testing of changes there were troubles with cache-reload described and reported in github/docs#14145. Fixes #13
In case server has some settings, which don't let some types of SMTP request to be handled, SMTP client may receive 5xx, 4xx, 3xx codes. This patch fixes the problem, when on the client side this SMTP codes are not handled normally. Instead of runtime error and unusual message that there is some connection error. The value of key for cache-step bumped to v4. That is needed for changing value of the key. During testing of changes there were troubles with cache-reload described and reported in github/docs#14145. Fixes #13
In case server has some settings, which don't let some types of SMTP request to be handled, SMTP client may receive 5xx, 4xx, 3xx codes. This patch fixes the problem, when on the client side this SMTP codes are not handled normally. Instead of runtime error and unusual message that there is some connection error. The value of key for cache-step bumped to v4. That is needed for changing value of the key. During testing of changes there were troubles with cache-reload described and reported in github/docs#14145. Fixes #13
Hi @Totktonada ! Thanks for opening this issue. At the moment, the documentation states:
Can you suggest how we could clarify this? Feel free to open a PR and we can iterate on the language there, if you'd like! |
This comment was marked as spam.
This comment was marked as spam.
The The main problem is not here. Let's look at the following paragraph:
The whole paragraph is about Next, the list below:
The same problem. The logic about prefixing is described for I would prefer to leave a feedback and go ahead, but if the problem still not clear enough, I'll open a pull request. |
This is a gentle bump for the docs team that this issue is waiting for technical review. |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
@Totktonada Thanks so much for your patience. I spoke with the team and we are not going to accept this contribution 💛. We really appreciate your time and interest in improving GitHub docs 💖 . |
@ramyaparimi Can you reveal a reason, please? |
@Totktonada I am extremely sorry for closing this issue. I didn't notice the comment with an SME review earlier and closed it assuming it was not reviewed by an SME. I apologize for this and I am going to reopen this issue and get this triaged for a writer's review 👀. Thanks so much for your patience and understanding 💖. |
Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert 👀 |
@Totktonada I have triaged this for a subject matter expert to review the approach in this comment. Thanks so much for your patience 💖 . |
This is a gentle bump for the docs team that this issue is waiting for technical review. |
👋 @Totktonada Thanks so much for your patience as the team reviewed your suggestions! You (or anyone else!) are welcome to open a PR making the changes described in #14145 (comment) 💖 |
Hi @Totktonada 👋🏻 We're reviewing all open It looks as if this article and the information about We'll plan to close this issue at the end of the week unless you have further feedback on this article. |
@felicitymay, hi! I guess you're about 9569184. As I see, the information about In my understanding (if nothing was changed in the cache action implementation), the documentation should make clear the following points.
|
Thank you for getting back to us so quickly with clear feedback. I'm not an actions expert, so this is really helpful. 💖 I'll update the issue summary soon and this will be ready for someone to work on. We usually get a lot of contributions during Hacktoberfest. |
Before updating the content plan for fixing the documentation, I spent some time looking at the documentation for the cache action. I'm now wondering if the behavior you observed is the intended behavior. I'm going to check with the action maintainers because the partial matching behavior on |
Thank you! I would highlight one related point. I don't remember precisely now, but even if the We can't lean on |
Hi @Totktonada. Thank you for your patience with this discussion and for all your thoughtful feedback. ✨ I've just had a discussion with a member of the team that is taking over support of this action. They agree that the behavior you've uncovered might well be unintended. We're going to look into the behavior internally and update this article once we've corrected any problems with the action itself. I'm going to close this issue as we will track both the action and documentation updates internally. Thank you for all your help identifying this inconsistency 🙇🏻♀️ |
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
What part(s) of the article would you like to see updated?
The documentation provides description of
key
andrestore-keys
fields. The actual behaviour is the following:key
match existing cache entry exactly, the cache is restored andcache-hit
output value is set to'true'
.key
match a prefix of an existing cache entry, the cache is restored andcache-hit
output value is set to''
.The latter is not obvious from the documentation. To be honest, I would even say that the article reads like it works in the opposite way.
The reason why I misunderstood the documentation is the following. The description of the
key
does not say anything about exact/prefix match. It also say that match is called 'cache hit', so, I guess, it is whencache-hit
is set to'true'
: exact match.Next,
restore-keys
description differentiates 'exact match' and 'partial match' (prefix match in fact). So my guess was that ifkey
would behave this way, it would be described as the common behaviour of both fields. Now it looks like a highlight thatrestore-keys
works differenctly fromkey
, but that's not so.I would also highlight that
cache-hit
value is not described. It is quite non-obvious that a cache may be restored, but the output value will give''
, because it is not exact match.Additional information
One can verify the behaviour youself. Let's create a workflow file with the following content and push it to a branch:
Next, change the cache key:
And push it to a branch. What will occur? The cache will be restored from
my-cache-key-v1-draft
,steps.cache.outputs.cache-hit
will be''
, so we'll run the 'Generate file' step and get a failure.In fact, we made two mistakes here:
key
is about exact match.cache-hit
will be'true'
.Those pitfalls should at least be highlighted in the documentation. However, to be honest, those are good candidates to revisit in a next major version of the action.
Content Plan
Guidance here
The text was updated successfully, but these errors were encountered: