Skip to content

Rollup node/UX: only show progress bars in tty

Alain Mebsout requested to merge alain@functori@no-progress-no-tty into master

Context

!10979 (merged) has introduced progress bars for the rollup node but this functionality is not very well suited when the output of the rollup node is redirected outside of a tty (the logs fill up with intermediate displays of progress and escape codes). This MR makes it so that the Progress_bar module does not produce animation outside of a tty. Instead only the message on a single line is outputed.

Fixes #6660 (closed).

Manually testing the MR

  1. Modify the file <data-dir>/storage/version to change the version of the store of the rollup node and force a migration.
  2. Start the rollup node normally and observe that a progress bar is displayed on the terminal.
  3. Repeat (1).
  4. Start the rollup node with octez-smart-rollup-node run &> /tmp/rnlog and observe that /tmp/rnlog is not filled with escape codes.
Edited by Alain Mebsout

Merge request reports