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

An interval seems to be left running which delays node from exiting for 30 seconds #220

Open
ajrussellsap opened this issue Sep 16, 2024 · 0 comments

Comments

@ajrussellsap
Copy link

When using the project-piper-action from a workflow on a GitHub Enterprise server, I consistently see a 30-second delay when node exits. This has also been noted by colleagues working on completely different projects. This issue seems to happen when no github.com token is specificed and, after some investigation I have tracked it down to being caused by this fetch statement:

https://github.com/SAP/project-piper-action/blob/main/src/fetch.ts#L11

The debug output from a workflow step shows that the delay happens after the step has finished doing everything:

piper-delay

A trace of the action shows that there is something (possibly an interval) that runs every second for 30 seconds which prevents node from exiting:

piper-trace

I wasn't able to determine the precise reason why this fetch command leaves something running every second for the next 30 seconds but I found that using a HEAD request prevented the issue from happening. I have created a pull request for this:

#219

I was not able to use my own fork of project-piper-action directly in my workflow - due to the policy of the GitHub Enterprise server - but I was able to create a workflow that patches the index.js file before it gets called and this fixes the problem. I would be happy to share that workflow privately if it helps.

Anyway, I would very grateful if you could resolve this issue (with my PR or any other way that you see fit) as it is adds about 5 minutes to the run time of every workflow for me and quite a few colleagues.

Many thanks

Alex

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

No branches or pull requests

1 participant