You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
When comparing v4 to v3, significant time difference in the post run process #591
The principal difference for me seems to be on the maven cache, but I don't know if this is the cause of the time difference.
I have updated the action version only because of nodejs16 deprecation.
We experience the same. We have self-hosted runners, and since recently (might have coincided with the upgrade from v3 to v4) started having Post run hanging and timing out after 8-10 minutes.
I'm not 100% but it seems this could be caused by the same problem I reported in #596 (comment). Apparently, the http-client is broken on Node 20 because the keepAlive default was changed, see actions/toolkit#1572.
Hello @brenoavm, Thank you once again for creating this issue.
We have investigated about the issue and able to reproduce the issue but there is no major changes in setup-java that affect the performance time from v3 to v4 other than node 20 upgrade. We tried multiple scenarios and found that the this long time duration is due to the dependencies installation time for node20. As per the node.js official documentation for node 20, we found that from node v19, Global instance of Agent uses keep-alive by default for all HTTP client requests .And the current usage is - HttpClient implementation uses globalAgent when RequestOptions.keepAlive is set to false.
Thank you @fniephaus for this reference. The issue resolves after RequestOptions.keepAlive is applied properly on node20 runtime. Please find the screenshot for reference.
Please confirm to proceed to close this issue as it is not related to setup-java. Thank you.
As I mentioned in #596 (comment), I don't think it's a good idea to close the ticket. The root problem needs to be fixed in @actions/http-client but this action depends on it. Moreover, my understanding is that setup-java and the GHA toolkit which includes @actions/http-client are both maintained by GitHub. Is there no way you can help get actions/toolkit#1572 reviewed and merged?
Reacted by Dominique Thornton DJ and Jaakko Tompuri
@aparnajyothi-y, my investigations as to why this post action now takes an extra 2 minutes to run have led me to this issue.
Like @fniephaus I too am wondering why no one has even reviewed actions/toolkit#1572. There have been 30 something PRs closed since it was opened in October of 2023. I get that there's a lot to be done & it's busy over there, but this is something that's costing companies like my own extra $$$ due to a potential misconfiguration in GitHub's toolkit.
I know 2 minutes may not sound like a lot, but when you're running 50+ builds a day which use this feature, it adds up quick.
Reacted by Fabio Niephaus, Jaakko Tompuri and Dainius Stepulevicius
Hello everyone, The Toolkit PR 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.
Activity
brenoavm commentedon Feb 2, 2024
I'm having the same issue when running the following actions:
The principal difference for me seems to be on the maven cache, but I don't know if this is the cause of the time difference.
I have updated the action version only because of nodejs16 deprecation.
V3:

V4:

v-HarithaVattikuti commentedon Feb 2, 2024
Hello @kdkdhoho
Thank you for creating this issue. We will investigate it and get back to you as soon as we have some feedback.
kirillgroshkov commentedon Feb 8, 2024
We experience the same. We have self-hosted runners, and since recently (might have coincided with the upgrade from v3 to v4) started having
Post runhanging and timing out after 8-10 minutes.fniephaus commentedon Feb 14, 2024
I'm not 100% but it seems this could be caused by the same problem I reported in #596 (comment). Apparently, the
http-clientis broken on Node 20 because the keepAlive default was changed, see actions/toolkit#1572.v-aparnajyothi-y commentedon Feb 21, 2024
Hello @brenoavm, Thank you once again for creating this issue.
We have investigated about the issue and able to reproduce the issue but there is no major changes in setup-java that affect the performance time from v3 to v4 other than node 20 upgrade. We tried multiple scenarios and found that the this long time duration is due to the dependencies installation time for node20. As per the node.js official documentation for node 20, we found that from node v19, Global instance of Agent uses keep-alive by default for all HTTP client requests .And the current usage is - HttpClient implementation uses globalAgent when RequestOptions.keepAlive is set to false.
Thank you @fniephaus for this reference. The issue resolves after RequestOptions.keepAlive is applied properly on node20 runtime. Please find the screenshot for reference.
Please confirm to proceed to close this issue as it is not related to setup-java. Thank you.
fniephaus commentedon Feb 21, 2024
As I mentioned in #596 (comment), I don't think it's a good idea to close the ticket. The root problem needs to be fixed in
@actions/http-clientbut this action depends on it. Moreover, my understanding is thatsetup-javaand the GHA toolkit which includes@actions/http-clientare both maintained by GitHub. Is there no way you can help get actions/toolkit#1572 reviewed and merged?djthornton1212 commentedon Feb 21, 2024
@aparnajyothi-y, my investigations as to why this post action now takes an extra 2 minutes to run have led me to this issue.
Like @fniephaus I too am wondering why no one has even reviewed actions/toolkit#1572. There have been 30 something PRs closed since it was opened in October of 2023. I get that there's a lot to be done & it's busy over there, but this is something that's costing companies like my own extra $$$ due to a potential misconfiguration in GitHub's toolkit.
I know 2 minutes may not sound like a lot, but when you're running 50+ builds a day which use this feature, it adds up quick.
fniephaus commentedon Feb 28, 2024
Could we get an update on this please? In the meantime, a new release was published and it's very unfortunate a fix for this was not included.
v-aparnajyothi-y commentedon Mar 1, 2024
Hello @fniephaus, The PR merged and waiting for the release to fix the slow post setup issue. We will update you once the changes released. Thank you.
v-aparnajyothi-y commentedon Mar 15, 2024
Hello everyone, The Toolkit PR 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.
fniephaus commentedon Mar 15, 2024
I can confirm that this is now fixed with
v4.2.0. Our builds run 3min faster again. Thank you!v-aparnajyothi-y commentedon Mar 28, 2024
Hello everyone, Closing this issue as the issue resolved and confirmed.