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

Customize cache download timeout #509

Closed
mrmeyers99 opened this issue Jul 7, 2023 · 9 comments · Fixed by #549
Closed

Customize cache download timeout #509

mrmeyers99 opened this issue Jul 7, 2023 · 9 comments · Fixed by #549
Assignees
Labels
documentation Improvements or additions to documentation feature request New feature or request to improve the current logic

Comments

@mrmeyers99
Copy link

Description:
I would like to be able to set a max time limit that it will spend downloading dependencies. If the download exceeds this time, then it would put a warning in the logs, but then proceed without a cache.

Justification:
Our project has a fairly large (4.5gb) maven cache and for some reason every once in a while the download will go really slow. I'm not sure if it's a problem on our self-hosted runner or on github's side, but it seems there's a built in time out for an hour. That's a really long time to wait for the cache to download. It normally takes about 80 seconds to download.

Are you willing to submit a PR?
Probably not

@mrmeyers99 mrmeyers99 added feature request New feature or request to improve the current logic needs triage labels Jul 7, 2023
@IvanZosimov
Copy link
Contributor

Hi, @mrmeyers99 👋 Thanks for the feature request, we will take a look on it and get back to you with updates.

@FelixGV
Copy link

FelixGV commented Jul 13, 2023

+1, I would also like to customize the timeout. The default is 1h, which is excessive IMHO. I have some GH Actions that take just 10m even without the cache, so it makes no sense to wait 1h. I would probably set the timeout at 1m if it were configurable.

@mrmeyers99
Copy link
Author

A built in retry world be nice as well.

@IvanZosimov
Copy link
Contributor

Hi, @FelixGV and @mrmeyers99, thanks for the feature request. As of version v3.2.1 of the package @actions/cache it's possible to control cache segment restore timeout https://github.com/actions/toolkit/tree/main/packages/cache#cache-segment-restore-timeout. This package is used under the hood of our action. Instead of providing a similar functionality, I'd better update version of the @actions/cache to v3.2.1 and add information about this possibility into the README.md. What do you think?

@IvanZosimov IvanZosimov self-assigned this Aug 24, 2023
@FelixGV
Copy link

FelixGV commented Aug 24, 2023

Great, thanks @IvanZosimov, we can try that out.

@IvanZosimov
Copy link
Contributor

Thanks, I'll ping you when the update of the @actions/cache to v3.2.1 is done.

@IvanZosimov IvanZosimov added the documentation Improvements or additions to documentation label Aug 24, 2023
@FelixGV
Copy link

FelixGV commented Aug 24, 2023

Oh ok it's not done yet, I had misunderstood. Sounds good, LMK then.

@IvanZosimov
Copy link
Contributor

Hi, @FelixGV and @mrmeyers99 👋 The PR with changes related to this issue is merged, as soon as the new version of setup-java is released, I'll ping you.

@IvanZosimov
Copy link
Contributor

Hi, @FelixGV and @mrmeyers99 👋 , the new v4 version of setup-java is released. The functionality you asked for is incorporated in this release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature request New feature or request to improve the current logic
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants