-
Notifications
You must be signed in to change notification settings - Fork 743
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
setup-java post action caching for v4 is slower than v3 #601
Comments
Hello @htpaf |
Hello @htpaf, Thank you once again for creating this issue. We will update you once the changes released. Thank you. |
Thank you for the update and work on this issue @aparnajyothi-y . This issue is related to if not a duplicate of #591. I read the comments over there and @fniephaus mentions the toolkit problem. I am thinking that keepAlive setting might solve the problem but the fix done for other actions such as this setup-ruby fix seems relevant. It would seem better to explicitly complete/end the request not wait for a timeout, whose actual value could be changed upstream at any time, and then have better guarantees and not get regressions. Does that make sense @aparnajyothi-y ? |
The toolkit PR is released in A release PR for setup-java from It should be possible to use the setup-java PR branch to test already... but it is a fork so probably not until it is in this repository. |
Hello @htpaf, Thank you for the information, We will get back you soon on this. |
I tried with setup-java@main (given this merged PR) and got: This looks much better! Great work! So yes @aparnajyothi-y looking forward to when the v4 tag will contain this update. |
Hello everyone, The actions/toolkit#1572 released and updated actions/http-client version to 2.2.1 as part of setup-java v4.2.0 release. Tested from our end, the time difference in the post run process in v4. Please check and confirm to proceed to close this issue. |
Verified with 99b8673 corresponding to https://github.com/actions/setup-java/releases/tag/v4.2.1 So all good. |
Description:
When switching from setup-java v3 to v4 the post run part is significantly slower.
Task version:
v4
Platform:
Runner type:
Repro steps:
Slow:
Fast:
Expected behavior:
v4 should have the same speed as v3.
Both executions had no cache hits and the amount of data was approx 30MB.
Actual behavior:
v4 is in this case orders of magnitude slower than v3.
Additional information:
I have seen that actions setup-node actions/setup-node#878
and setup-ruby ruby/setup-ruby#543 have had the same problem.
It seems that it had to do with the upgrade of the actions/cache version.
I think their solution was to exit the process manually after caching is complete as otherwise the job simply hangs until some timeout.
After looking at this repo for a very short time my guess is that perhaps somewhere
here ->
setup-java/src/cache.ts
Line 150 in 9704b39
a
process.exit(0)
could solve the problem (as I said, I'm only guessing based on the node and ruby solutions).The text was updated successfully, but these errors were encountered: