@actions/ccache causing 2min slowdown with Node 20 runtime
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.9k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Saving cache hangs up the node process causing a 2min slowdown. This is related to https://github.com/nodejs/node/issues/47228. This has caused many Github actions to manually call process.exit() to prevent this slow down. Which I think is bad and can cause unexpected bugs to happen in future.
To Reproduce
Steps to reproduce the behavior:
- Call
saveCachein your action with Node 20 runtime
import * as core from '@actions/core'
import * as cache from '@actions/cache'
async function run(): Promise<void> {
try {
await cache.saveCache(".cache", "cache-bug")
} catch (error: any) {
// Show fail error if there is any error
core.error(error)
core.setFailed(error.message)
}
}
run()
Expected behavior
The Node process shouldn't hang up and cause slow down.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the saveCache call shown in the reproduction and run it in an action using the Node 20 runtime. Compare the process behavior with the linked Node.js issue; done means saving the cache no longer leaves the process hanging for about two minutes without requiring process.exit().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100