yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.44k stars 2.73k forks source link

Default to silent mode on CI #4066

Open BYK opened 7 years ago

BYK commented 7 years ago

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.

mateusz-sznura commented 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] ⠄