Open BYK opened 7 years ago
Hi, my team and I have just encountered a related problem with yarn console output in Jenkins. The animations of spinners and progress bars produce a tonne of output cluttering our build reports.
We have considered using --silent flag, but we don't want to lose debug/informational output completely. It would be great to have an alternative mode/output format without animations for use in CI tools. Could you please include this issue in your discussion?
Or maybe there is a common way to use yarn in CI tools that we don't know about?
Examples of how it looks like:
Spinner:
⠁ ⠂ phantomjs-prebuilt⠄ phantomjs-prebuilt⡀ phantomjs-prebuilt⢀ phantomjs-prebuilt⠠ phantomjs-prebuilt⠐ phantomjs-prebuilt⠈ phantomjs-prebuilt⠁ phantomjs-prebuilt⠂ phantomjs-prebuilt⠄ phantomjs-prebuilt⡀ phantomjs-prebuilt⢀ phantomjs-prebuilt⠠ phantomjs-prebuilt⠐ phantomjs-prebuilt⠈ phantomjs-prebuilt⠁ phantomjs-prebuilt⠂ phantomjs-prebuilt⠄ phantomjs-prebuilt⡀ phantomjs-prebuilt⢀ phantomjs-prebuilt⠠ phantomjs-prebuilt⠐ phantomjs-prebuilt⠈ phantomjs-prebuilt⠁
Progress bar:
[------------------------------------------------------------------------] 0/83[##################-----------------------------------------------------] 21/83[#######################------------------------------------------------] 27/83[####################################-----------------------------------] 42/83[#####################################################------------------] 62/83[#####################################################################--] 81/83[3/4] Linking dependencies... [10.93.5.110] out: [#######################################################################] 83/83[------------------------------------------------------------------------] 0/83[-----------------------------------------------------------------------] 0/910[##########-----------------------------------------------------------] 132/910[######################-----------------------------------------------] 284/910[#################################------------------------------------] 436/910[##############################################-----------------------] 608/910[#############################################################--------] 800/910[------------------------------------------------------------------------] 0/84[4/4] Building fresh packages...
This is the worst probably (this sample is like 5% of actual output):
Receiving...[-/1] ⠈ waiting...[-/1] ⠈ waiting...[-/1] ⠈ waiting...[-/1] ⠈ waiting...[1/1] ⠈ phantomjs-prebuilt: Receiving...[-/1] ⠁ waiting...[-/1] ⠁ waiting...[-/1] ⠁ waiting...[-/1] ⠁ waiting...[1/1] ⠁ phantomjs-prebuilt: Receiving...[-/1] ⠂ waiting...[-/1] ⠂ waiting...[-/1] ⠂ waiting...[-/1] ⠂ waiting...[1/1] ⠂ phantomjs-prebuilt: Receiving...[-/1] ⠄ waiting...[-/1] ⠄ waiting...[-/1] ⠄ waiting...[-/1] ⠄ waiting...[1/1] ⠄ phantomjs-prebuilt: Receiving...[-/1] ⡀ waiting...[-/1] ⡀ waiting...[-/1] ⡀ waiting...[-/1] ⡀ waiting...[1/1] ⡀ phantomjs-prebuilt: Receiving...[-/1] ⢀ waiting...[-/1] ⢀ waiting...[-/1] ⢀ waiting...[-/1] ⢀ waiting...[1/1] ⢀ phantomjs-prebuilt: Receiving...[-/1] ⠠ waiting...[-/1] ⠠ waiting...[-/1] ⠠ waiting...[-/1] ⠠ waiting...[1/1] ⠠ phantomjs-prebuilt: Receiving...[-/1] ⠐ waiting...[-/1] ⠐ waiting...[-/1] ⠐ waiting...[-/1] ⠐ waiting...[1/1] ⠐ phantomjs-prebuilt: Receiving...[-/1] ⠈ waiting...[-/1] ⠈ waiting...[-/1] ⠈ waiting...[-/1] ⠈ waiting...[1/1] ⠈ phantomjs-prebuilt: Receiving...[-/1] ⠁ waiting...[-/1] ⠁ waiting...[-/1] ⠁ waiting...[-/1] ⠁ waiting...[1/1] ⠁ phantomjs-prebuilt: Receiving...[-/1] ⠂ waiting...[-/1] ⠂ waiting...[-/1] ⠂ waiting...[-/1] ⠂ waiting...[1/1] ⠂ phantomjs-prebuilt: Receiving...[-/1] ⠄ waiting...[-/1] ⠄ waiting...[-/1] ⠄ waiting...[-/1] ⠄ waiting...[1/1] ⠄ phantomjs-prebuilt: Receiving...[-/1] ⡀ waiting...[-/1] ⡀ waiting...[-/1] ⡀ waiting...[-/1] ⡀ waiting...[1/1] ⡀ phantomjs-prebuilt: Receiving...[-/1] ⢀ waiting...[-/1] ⢀ waiting...[-/1] ⢀ waiting...[-/1] ⢀ waiting...[1/1] ⢀ phantomjs-prebuilt: Receiving...[-/1] ⠠ waiting...[-/1] ⠠ waiting...[-/1] ⠠ waiting...[-/1] ⠠ waiting...[1/1] ⠠ phantomjs-prebuilt: Receiving...[-/1] ⠐ waiting...[-/1] ⠐ waiting...[-/1] ⠐ waiting...[-/1] ⠐ waiting...[1/1] ⠐ phantomjs-prebuilt: Receiving...[-/1] ⠈ waiting...[-/1] ⠈ waiting...[-/1] ⠈ waiting...[-/1] ⠈ waiting...[1/1] ⠈ phantomjs-prebuilt: Receiving...[-/1] ⠁ waiting...[-/1] ⠁ waiting...[-/1] ⠁ waiting...[-/1] ⠁ waiting...[1/1] ⠁ phantomjs-prebuilt: Receiving...[-/1] ⠂ waiting...[-/1] ⠂ waiting...[-/1] ⠂ waiting...[-/1] ⠂ waiting...[1/1] ⠂ phantomjs-prebuilt: Receiving...[-/1] ⠄ waiting...[-/1] ⠄ waiting...[-/1] ⠄
We should default to silent mode on CI to reduce the unnecessary log output we produce. A great thing would be to store all debug-level information somewhere temporarily in case we encounter an error and then dump it all only when there's a problem.