Project

General

Profile

action #114878

isotovideo: Add option to disable color output size:S

Added by tinita about 2 months ago. Updated about 1 month 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:
Difficulty:

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

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

History

#1 Updated by tinita about 2 months ago

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

#2 Updated by mkittler about 2 months ago

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

#3 Updated by okurz about 2 months ago

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

#4 Updated by okurz about 2 months ago

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

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

#5 Updated by openqa_review about 2 months ago

  • Due date set to 2022-08-18

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

#6 Updated by cdywan about 2 months ago

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

#7 Updated by cdywan about 2 months ago

  • Assignee changed from okurz to cdywan

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

#8 Updated by cdywan about 2 months 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.

#9 Updated by cdywan about 2 months 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.

#10 Updated by okurz about 2 months 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

#11 Updated by cdywan about 1 month 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.

#12 Updated by cdywan about 1 month ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF