#312 download progressbars are printed out into stdio logs
Opened 8 years ago by kparal. Modified 6 years ago

There are now download progressbars printed out into logs when files are being downloaded:

[libtaskotron:file_utils.py:120] 2016-01-08 09:14:47 DEBUG   Downloading: http://kojipkgs.fedoraproject.org/packages/python-matplotlib/1.4.3/9.fc22/i686/python2-matplotlib-1.4.3-9.fc22.i686.rpm
  0%|                                                |ETA:  --:--:--  0.00  B/s
  2%|#                                                |ETA:  0:00:00 64.36 MB/s
  5%|##                                               |ETA:  0:00:00 73.43 MB/s
  8%|####                                             |ETA:  0:00:00 75.56 MB/s
 11%|#####                                            |ETA:  0:00:00 77.82 MB/s
 14%|######                                           |ETA:  0:00:00 79.33 MB/s
 16%|########                                         |ETA:  0:00:00 79.75 MB/s
 19%|#########                                        |ETA:  0:00:00 80.25 MB/s
 22%|###########                                      |ETA:  0:00:00 80.92 MB/s
 25%|############                                     |ETA:  0:00:00 81.48 MB/s
 28%|#############                                    |ETA:  0:00:00 76.86 MB/s
 31%|###############                                  |ETA:  0:00:00 67.87 MB/s
 33%|################                                 |ETA:  0:00:00 71.42 MB/s
 36%|##################                               |ETA:  0:00:00 71.37 MB/s
 39%|###################                              |ETA:  0:00:00 70.64 MB/s
 42%|####################                             |ETA:  0:00:00 69.26 MB/s
 45%|######################                           |ETA:  0:00:00 66.91 MB/s
 48%|#######################                          |ETA:  0:00:00 65.87 MB/s
 50%|########################                         |ETA:  0:00:00 64.96 MB/s
 53%|##########################                       |ETA:  0:00:00 63.72 MB/s
 56%|###########################                      |ETA:  0:00:00 62.41 MB/s
 59%|#############################                    |ETA:  0:00:00 60.41 MB/s
 62%|##############################                   |ETA:  0:00:00 58.65 MB/s
 65%|###############################                  |ETA:  0:00:00 56.84 MB/s
 67%|#################################                |ETA:  0:00:00 55.39 MB/s
 70%|##################################               |ETA:  0:00:00 51.85 MB/s
 73%|####################################             |ETA:  0:00:00 51.34 MB/s
 76%|#####################################            |ETA:  0:00:00 50.95 MB/s
 79%|######################################           |ETA:  0:00:00 50.40 MB/s
 81%|########################################         |ETA:  0:00:00 49.06 MB/s
 84%|#########################################        |ETA:  0:00:00 48.57 MB/s
 87%|##########################################       |ETA:  0:00:00 48.05 MB/s
 90%|############################################     |ETA:  0:00:00 47.54 MB/s
 93%|#############################################    |ETA:  0:00:00 47.14 MB/s
 96%|###############################################  |ETA:  0:00:00 46.71 MB/s
 98%|################################################ |ETA:  0:00:00 46.23 MB/s
100%|#################################################|ETA:  0:00:00 46.16 MB/s
100%|#################################################|Time: 0:00:00 46.14 MB/s

This does seem to affect only 'stdio' logs, not standard taskotron debug logs.

I think this is caused by a combination of two factors:
a) we enabled DEBUG level printing into standard output
b) we run in a remote minion mode and capture stdout over ssh and save it into a log file

So I guess python-progressbar thinks it's printing to a terminal, so it's printing progress bars, but in fact it's stdio over ssh captured to a file. I don't know if we can do something about this, but I file this ticket so that we at least have a look. With the current approach the logs are not really nice and they occupy more disk space.

As a tip, it would be interesting to compare what urlgrabber used to do, and if it behaved differently in this case, find out how it detected terminal/non-terminal output and put the same patch into python-progressbar.


Metadata Update from @kparal:
- Issue tagged with: easyfix

6 years ago

Log in to comment on this ticket.

Metadata