cache(gha): add timeout attr for cache export/import #4702
Merged
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.
related to https://github.com/moby/buildkit/actions/runs/8062307240/job/22024437641?pr=4698#step:7:1683
closes #4705
On repositories relying heavily on GitHub Actions Cache backend with BuildKit, it can take more than 5 minutes (current default) for the request to succeed due to GitHub rate limit or if export is quite huge (often sees with
mode=max
).This PR adds a
timeout
attribute for GitHub Actions cache export/import (maybe import is not necessary) so user can specify a custom value if he wants to.Also increases default timeout to 10 minutes.
If we are not ok with this change, we can just set
ignore-error=true
in our workflows to avoid failures on this repo, see #4705@dvdksn Needs docs follow-up if accepted https://docs.docker.com/build/cache/backends/gha/