ros2/ci

Suppress progress bar in CI

rotu opened this issue · 2 comments

rotu commented

In CI, pip shows the progress bar https://ci.ros2.org/job/ci_linux/lastStableBuild/consoleText

This creates log noise and should probably be disabled (maybe with --progress-bar off or --quiet) This can be set with pip config https://pip.pypa.io/en/stable/reference/pip_config/

  Downloading mypy-0.770-cp38-cp38-manylinux1_x86_64.whl (22.6 MB)
�[?25l
�[K     |                                | 10 kB 40.1 MB/s eta 0:00:01
�[K     |                                | 20 kB 45.6 MB/s eta 0:00:01
�[K     |                                | 30 kB 55.6 MB/s eta 0:00:01
�[K     |                                | 40 kB 27.8 MB/s eta 0:00:01
�[K     |                                | 51 kB 31.9 MB/s eta 0:00:01
�[K     |                                | 61 kB 36.1 MB/s eta 0:00:01
�[K     |                                | 71 kB 39.1 MB/s eta 0:00:01
�[K     |▏                               | 81 kB 41.0 MB/s eta 0:00:01
�[K     |▏                               | 92 kB 43.5 MB/s eta 0:00:01
�[K     |▏                               | 102 kB 36.1 MB/s eta 0:00:01
�[K     |▏                               | 112 kB 36.1 MB/s eta 0:00:01
�[K     |▏                               | 122 kB 36.1 MB/s eta 0:00:01
�[K     |▏                               | 133 kB 36.1 MB/s eta 0:00:01
�[K     |▏                               | 143 kB 36.1 MB/s eta 0:00:01
�[K     |▏                               | 153 kB 36.1 MB/s eta 0:00:01
�[K     |▎                               | 163 kB 36.1 MB/s eta 0:00:01
rotu commented

Hmm... locally it seems to suppress the progress bar by default if I pipe the output of pip. So maybe this is because we're telling the script to use a pty which is tricking pip to use interactive output. Unfortunately, I don't see a way to enable colors for pip if run from a non-shell, just disable colors if run from a shell.

Current consensus is to, ideally, find a way to reduce pip's verbosity without dropping all user feedback i.e. a blocking, quiet execution is undesirable.