toolkit icon indicating copy to clipboard operation
toolkit copied to clipboard

@actions/ccache causing 2min slowdown with Node 20 runtime

Open chirag-droid opened this issue 2 years ago • 0 comments

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:

  1. Call saveCache in 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.

chirag-droid avatar Jan 29 '24 14:01 chirag-droid