Graphcool / graphcool-framework

Apache License 2.0
1.77k stars 131 forks source link

flush timeout is too low #536

Open baerrach opened 6 years ago

baerrach commented 6 years ago

Current behavior

gcf command appears to do nothing.

Running with DEBUG=* prefix just shows "util timed out" and what I really want to see is the stacktrace of who called timeout so I can look into the problem in more detail.

Hacking the code and creating a stacktrace shows its located in \<anonymous> ... not very useful.

2018-06-26T03:09:12.620Z EnvironmentMigrator graphcoolPath <path> does not exist
2018-06-26T03:09:12.626Z environment XXXX
Error: timed out
    at \node_modules\graphcool-framework\node_modules\graphcool-cli-engine\src\util.ts:38:36
    at <anonymous>
2018-06-26T03:09:13.738Z util timed out

after futzing around with every timeout I could find, I located the problem to CLI.ts:149

      await timeout(this.flush(), 1000)

Changing this to timeout to 2000 got past this problem and onto others.

Reproduction

$ gcf --version
graphcool-framework/0.11.5 (windows-x64) node-v9.10.0