github-action icon indicating copy to clipboard operation
github-action copied to clipboard

Question: Timeout after 6 hours

Open jazanne opened this issue 4 years ago • 1 comments

I have a workflow setup to run my cypress tests and then notify via slack if there's a failure

Recently, we experienced and issue (while upgrading a dependency) that caused the cypress action to fail before tests even started running (error below for reference, but we have fixed that issue).

However, the workflow continued to "run" until it timed-out at 6 hours. Since it was a timeout, the slack notification was never sent, and it took us multiple days to notice the failing workflow and fix the change.

So my question is - is there a way for us to make the workflow actually fail when it runs into an error like this? I don't know if it was continuing to retry for the whole 6 hours or if it simply hung, but obviously it's not ideal.

The following error was thrown by a plugin. We stopped running your tests because a plugin crashed. Please check your plugins file (`/home/runner/work/git-gatsby/git-gatsby/cypress/plugins/index.js`)

 TypeError: Cannot read property 'compiler' of undefined
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/ts-loader/dist/after-compile.js:19:25
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/ts-loader/dist/instances.js:203:93
    at Hook.eval (eval at create (/home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
    at Hook.CALL_DELEGATE [as _call] (/home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/node_modules/tapable/lib/Hook.js:14:14)
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/lib/Compilation.js:3058:40
    at eval (eval at create (/home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:14:1)
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/lib/Compilation.js:519:10
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/lib/SourceMapDevToolPlugin.js:549:10
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/neo-async/async.js:2830:7
    at done (/home/runner/work/git-gatsby/git-gatsby/node_modules/neo-async/async.js:2865:11)
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/neo-async/async.js:2818:7
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/lib/SourceMapDevToolPlugin.js:544:11
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/lib/HookWebpackError.js:68:3
    at Hook.eval [as callAsync] (eval at create (/home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:15:1)
    at Cache.store (/home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/lib/Cache.js:107:20)
    at ItemCacheFacade.store (/home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/lib/CacheFacade.js:144:15)
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/lib/SourceMapDevToolPlugin.js:534:25
    at arrayEach (/home/runner/work/git-gatsby/git-gatsby/node_modules/neo-async/async.js:2405:9)
    at Object.each (/home/runner/work/git-gatsby/git-gatsby/node_modules/neo-async/async.js:2846:9)
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/webpack/lib/SourceMapDevToolPlugin.js:384:17
    at /home/runner/work/git-gatsby/git-gatsby/node_modules/neo-async/async.js:2830:7
    at done (/home/runner/work/git-gatsby/git-gatsby/node_modules/neo-async/async.js:2865:11)

jazanne avatar Dec 17 '21 19:12 jazanne

I ended up setting a timeout on this step in my Workflow, but I still think this is odd behavior

jazanne avatar Feb 09 '22 16:02 jazanne

@jazanne

You're right that this is odd. Since this is a old issue I would suggest to close it now unless it is reproducible in current versions.

Setting a timeout as you have done is in any case best practice. Sometimes GitHub Actions just don't work the way they are supposed to, without this being a bug in cypress-io/github-action.

MikeMcC399 avatar Nov 07 '23 07:11 MikeMcC399

Closing, since this old issue has become stale. A workaround has already been implemented.

MikeMcC399 avatar Nov 09 '23 11:11 MikeMcC399