License Scanner stalls at `npm ci`
Summary
The License Scanner is currently failing in some projects because it is reaching the maximum job timeout for the project (Upwards of an hour).
[v3.28.1] Installing 10.14.2 via asdf ...
ERROR: Job failed: execution took longer than 1h0m0s seconds
With debugging enabled, we can see that we're getting stuck at npm ci --production
:
section_start:1603818703:_opt_asdf_bin_asdf_install_nodejs_10_14_2
[0K/opt/asdf/bin/asdf install nodejs 10.14.2
[v3.28.1] /opt/asdf/bin/asdf install nodejs 10.14.2
[v3.28.1] node-v10.14.2-linux-x64.tar.gz: OK
Installing [33mbower[39m npm package... [32mSUCCESS[39m
Installing [33mbower-npm-resolver[39m npm package... [32mSUCCESS[39m
Installing [33mnpm-install-peers[39m npm package... [32mSUCCESS[39m
Installing [33myarn[39m npm package... [32mSUCCESS[39m
section_end:1603818746:_opt_asdf_bin_asdf_install_nodejs_10_14_2
[0K
section_start:1603818746:_opt_asdf_bin_asdf_local_nodejs_10_14_2
[0K/opt/asdf/bin/asdf local nodejs 10.14.2
[v3.28.1] /opt/asdf/bin/asdf local nodejs 10.14.2
section_end:1603818746:_opt_asdf_bin_asdf_local_nodejs_10_14_2
[0K
section_start:1603818746:_opt_asdf_bin_asdf_reshim
[0K/opt/asdf/bin/asdf reshim
[v3.28.1] /opt/asdf/bin/asdf reshim
section_end:1603818747:_opt_asdf_bin_asdf_reshim
[0K
section_start:1603818747:npm_ci___production
[0Knpm ci --production
[v3.28.1] npm ci --production
With our current code, we don't write to the log until the command is finished. Since it is timing out, we're unable to see what is actually happening.
Addition context: https://gitlab.slack.com/archives/CCBJYEWAW/p1603810843408500
Steps to reproduce
See ZD Ticket
Example Project
See ZD Ticket
What is the current bug behavior?
The License Scanning job runs but fails to complete and reaches the timeout limit.
What is the expected correct behavior?
The License Scanning job should complete or provide more verbose debugging logs so we can understand where the job is failing.
Output of checks
This happens on GitLab.com 13.6.0-pre 88b24406 GitLab Shared Runners 13.5.0-rc2 (71c90c86)