Page MenuHomePhabricator

Cumin: replace colorama
Closed, ResolvedPublic

Description

In stretch there is a regression in colorama in conjunction with tqdm that leads to a slow down of the progress of the script proportional to the amount of data printed to stdout/err. Colorama starts having very huge stacktraces and the process is stuck at 100% CPU for an increasingly amount of time while more data is printed.

Given the very simple usage of colors that is made in Cumin as of now, it seems much more feasible to replace the colorama library (as all that cross-OS support is not needed) and add a simple module with ANSI escape sequence support.

Event Timeline

Volans triaged this task as High priority.Feb 25 2019, 2:24 PM
Volans created this task.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFeb 25 2019, 2:24 PM
Volans moved this task from Backlog to Up next on the SRE-tools board.Feb 25 2019, 2:24 PM

Change 481858 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/spicerack@master] remote: suppress Cumin's output

https://gerrit.wikimedia.org/r/481858

If only linux terminal support is needed, maybe something like tput would be a good way to approach this (this looks pretty neat: https://github.com/erikrose/blessings)

jijiki added a subscriber: jijiki.Feb 25 2019, 10:57 PM

Change 481858 merged by Volans:
[operations/software/spicerack@master] remote: suppress Cumin's output

https://gerrit.wikimedia.org/r/481858

Volans moved this task from Up next to In Progress on the SRE-tools board.Jul 19 2019, 9:22 PM

Change 524601 had a related patch set uploaded (by Volans; owner: Volans):
[operations/software/cumin@master] dependency: replace colorama with custom module

https://gerrit.wikimedia.org/r/524601

Change 524601 merged by jenkins-bot:
[operations/software/cumin@master] dependency: replace colorama with custom module

https://gerrit.wikimedia.org/r/524601

Volans closed this task as Resolved.Jul 19 2019, 10:19 PM