Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

add -q/--quiet to ch-image #1636

Merged
merged 41 commits into from
Sep 15, 2023
Merged

add -q/--quiet to ch-image #1636

merged 41 commits into from
Sep 15, 2023

Conversation

lucaudill
Copy link
Collaborator

closes #1613

@lucaudill lucaudill mentioned this pull request May 25, 2023
@lucaudill lucaudill changed the title add -q/--quiet to executables add -q/--quiet to ch-image May 25, 2023
@lucaudill lucaudill marked this pull request as ready for review May 31, 2023 17:58
@lucaudill lucaudill requested a review from reidpr May 31, 2023 17:58
Copy link
Collaborator

@reidpr reidpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! See suggestions in-line.

bin/ch-image.py.in Outdated Show resolved Hide resolved
bin/ch-image.py.in Outdated Show resolved Hide resolved
bin/ch-image.py.in Outdated Show resolved Hide resolved
doc/ch-image.rst Outdated Show resolved Hide resolved
doc/ch-image.rst Outdated Show resolved Hide resolved
lib/misc.py Show resolved Hide resolved
if (log_quiet > 0):
fail_ct = 0
if (trace_fatal):
ERROR("“quiet” incompatible with “debug”")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to mention the environment variable here too since folks might not make the translation or remember they set it.

test/build/50_ch-image.bats Show resolved Hide resolved
test/build/50_ch-image.bats Outdated Show resolved Hide resolved
lib/misc.py Outdated Show resolved Hide resolved
@reidpr reidpr added this to the 0.35 milestone Sep 5, 2023
@lucaudill lucaudill requested a review from reidpr September 13, 2023 19:59
Copy link
Collaborator

@reidpr reidpr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! Several suggestions in-line.

doc/ch-image.rst Outdated Show resolved Hide resolved
@@ -98,13 +101,15 @@ Common options placed before or after the sub-command:
subprocesses. Profile data should still be written on fatal errors, but
not if the program crashes.

:code:`-q, --quiet`
Be quieter; can be repeated. Incompatible :code:`-v` and suppresses
:code:`--debug` regardless of option order. See the :ref:`FAQ entry on
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should revisit the --debug incompatibility? It seems orthogonal now.

Also --debug seems to be undocumented here.

doc/faq.rst Outdated Show resolved Hide resolved
@@ -1098,6 +1094,153 @@ linuxcontainers.org uses the opposite order for “le” in the architecture nam
$ wget https://uk.lxd.images.canonical.com/images/alpine/3.15/ppc64el/default/20220304_13:00/rootfs.tar.xz
$ ch-image import rootfs.tar.xz ppc64le/alpine:3.17

.. _faq_verbosity:

How can I control Charliecloud’s quietness or verbosity?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Say something about Charliecloud's own stdout in this section?

lib/charliecloud.py Outdated Show resolved Hide resolved
lib/charliecloud.py Show resolved Hide resolved
Comment on lines 650 to 652
if (cli.verbose):
ERROR("“quiet” incompatible with “verbose”")
fail_ct += 1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do it where every -v increases verbosity by 1 and every -q decreases it by 1. I wonder if that's too weird though.

lib/charliecloud.py Outdated Show resolved Hide resolved
lib/charliecloud.py Outdated Show resolved Hide resolved
test/build/50_ch-image.bats Show resolved Hide resolved
@lucaudill lucaudill requested a review from reidpr September 14, 2023 20:30
@reidpr reidpr merged commit ae04e52 into master Sep 15, 2023
@reidpr reidpr deleted the add-quiet_1613 branch September 15, 2023 15:24
@reidpr reidpr removed this from the 0.35 milestone Oct 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ch-image: add -q / --quiet
2 participants