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

Explicitly exit the process to not wait for hanging promises #907

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xiniria
Copy link

@xiniria xiniria commented Nov 27, 2023

Description:
Since Node.js 19, the default for keepAlive was changed from false to true. As explained in this similar issue for the Ruby setup action, this causes the Post setup Node action to hang for somewhere between 1 and 5 minutes after running. This PR explicitly exits the process once the run function is completed, to not wait for hanging promises.

Related issue:
Fixes #878

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@xiniria xiniria requested a review from a team as a code owner November 27, 2023 15:16
@xiniria xiniria mentioned this pull request Nov 27, 2023
5 tasks
@Bo98
Copy link

Bo98 commented Nov 29, 2023

Change works as a quick fix, but it's worth noting the proper fix would be to merge actions/toolkit#1572 (or a similar fix on actions/toolkit level) otherwise we'd be copy pasting this exit process hack to tons of other actions/* that cache internally as they update to Node 20.

@xiniria
Copy link
Author

xiniria commented Nov 29, 2023

Change works as a quick fix, but it's worth noting the proper fix would be to merge actions/toolkit#1572 (or a similar fix on actions/toolkit level) otherwise we'd be copy pasting this exit process hack to tons of other actions/* that cache internally as they update to Node 20.

I totally agree, but since we have no leverage over when (or even if) this other PR is merged, this should improve things for a lot of users out there in the meantine, don't you think?

@Bo98
Copy link

Bo98 commented Nov 29, 2023

Yeah for sure. Though given GitHub control both repositories, there's a chance the right person will see it here.

External contributions to actions/toolkit are not currently being reviewed (and haven't for a year) so it felt it was worth mentioning in case they want to make a similar fix themselves. If the toolkit and setup-node teams are totally separate and usually don't collaborate then yeah I imagine merging your workaround makes sense.

@xiniria
Copy link
Author

xiniria commented Dec 4, 2023

@nikolai-laevskii could you have a look at the PR?

@xaviermarchal
Copy link

@nikolai-laevskii any news on this PR that could help us a lot on our delivery?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Slow post-action after v4
3 participants