Project

General

Profile

Actions

action #114878

closed

isotovideo: Add option to disable color output size:S

Added by tinita about 2 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2022-08-01
Due date:
2022-08-18
% Done:

0%

Estimated time:

Description

Motivation

See #114869

Acceptance criteria

AC1: isotovideo has an option to disable all colored log output, e.g. --nocolor or --monochrome-output|-M

Suggestions

  • Set $ENV{ANSI_COLORS_DISABLED} = 1 if this option is specified

Related issues 1 (0 open1 closed)

Copied from openQA Tests - action #114869: [qe-core] os-autoinst-distri-opensuse pipeline is brokenResolvedszarate2022-08-01

Actions
Actions #1

Updated by tinita about 2 years ago

  • Copied from action #114869: [qe-core] os-autoinst-distri-opensuse pipeline is broken added
Actions #2

Updated by mkittler about 2 years ago

Should be easy to do although I'm wondering why setting the env variable isn't sufficient.

Actions #3

Updated by okurz about 2 years ago

Because nobody will find the environment variable but if command --help states it then it will be used :)

Actions #4

Updated by okurz about 2 years ago

  • Status changed from New to In Progress
  • Assignee set to okurz

I will try to work on this during today's workshop day

Actions #5

Updated by openqa_review about 2 years ago

  • Due date set to 2022-08-18

Setting due date based on mean cycle time of SUSE QE Tools

Actions #6

Updated by livdywan about 2 years ago

  • Subject changed from isotovideo: Add option to disable color output to isotovideo: Add option to disable color output size:S
  • Description updated (diff)
Actions #7

Updated by livdywan about 2 years ago

  • Assignee changed from okurz to livdywan

isotovideo implicitly supports ANSI_COLORS_DISABLED and NO_COLOR. We can actually use this opportunity to document it, in addition to implementing a command-line switch.

https://github.com/os-autoinst/os-autoinst/pull/2143

Actions #8

Updated by livdywan about 2 years ago

After discussing it in the unblock we decided to omit the "auto" option for now and @okurz already proposed a branch with just --color=yes|no support which doesn't require openQA changes. It was bugging me that we couldn't sort out the tests but I'll leave the drafts, and we can re-visit them later.

Actions #9

Updated by livdywan about 2 years ago

  • Status changed from In Progress to Feedback

cdywan wrote:

https://github.com/os-autoinst/os-autoinst/pull/2143

My branch has retroactively become the follow-up branch for color=auto which needs to use IO::Interactive to make it unit-testable. The AC's are fulfilled so the ticket isn't dependent on this being merged.

Actions #10

Updated by okurz about 2 years ago

I agree that the AC's are covered. So I suggest you decide between the following alternatives:

  1. Close the draft PRs and resolve this ticket
  2. Work on the draft PRs
Actions #11

Updated by livdywan about 2 years ago

I'm resolving the ticket because it looks like unit testing is not trivial afterall and that feels like it's dragging on too much.

Enabling and disabling colors via --color=yes and --color=no meanwhile to work nicely.

Actions #12

Updated by livdywan about 2 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF