Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg/podman: Print stderr of execs to system stderr when asked for #823

Conversation

HarryMichal
Copy link
Member

@HarryMichal HarryMichal commented Jul 3, 2021

With this the logs (resp. stderr) of all invocations of Podman are shown
when the '--log-podman' option is set.

This change affects the behaviour of spinner which is now hidden when
the logging is turned on.

Depends on #826

@HarryMichal HarryMichal added 3. Enhancement Improvement to an existing feature 6. Minor Change Should not cause breakage 2. Under The Hood Multiple areas of the app are influenced by this ticket labels Jul 3, 2021
@softwarefactory-project-zuul
Copy link

Build failed.

HarryMichal added a commit to HarryMichal/toolbox that referenced this pull request Jul 3, 2021
Without this the logs of Podman (resp. stderr of Podman invocations) are
shown only in chosen parts when the debug logs are requested.

containers#823
@HarryMichal HarryMichal force-pushed the pkg/podman/proper-stderr-handling branch from 042a4c0 to fcbc296 Compare July 3, 2021 12:39
The logic for determining if a spinner can be started is non-trivial and
hard to replicate.

containers#826
With this the logs (resp. stderr) of all invocations of Podman are shown
when the '--log-podman' option is set.

This change affects the behaviour of spinner which is now hidden when
the logging is turned on.

containers#823
@HarryMichal HarryMichal force-pushed the pkg/podman/proper-stderr-handling branch from fcbc296 to 28d97af Compare July 3, 2021 12:48
@softwarefactory-project-zuul
Copy link

Build failed.

@HarryMichal HarryMichal added this to the Release 0.1.0 milestone Jul 3, 2021
Copy link
Member

@debarshiray debarshiray left a comment

Choose a reason for hiding this comment

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

Nice trick with io.MultiWriter!

Sadly, this will won't unbreak the progress bar from podman pull when run as toolbox --verbose because the standard error stream won't be connected to a file descriptor that's a terminal device. We should mention that in the commit message.

@debarshiray
Copy link
Member

Let's fold this into #787

@debarshiray debarshiray closed this Jul 4, 2021
debarshiray pushed a commit to HarryMichal/toolbox that referenced this pull request Jul 4, 2021
This way the standard error stream of the spawned binaries can be
inspected to get a better understanding of the failure, while still
being shown to the user when run with the '--verbose' flag.

Unfortunately, this breaks the progress bar in 'podman pull' because
the standard error stream is no longer connected to a file descriptor
that's a terminal device.

containers#787
containers#823
debarshiray pushed a commit to HarryMichal/toolbox that referenced this pull request Jul 4, 2021
This way the standard error stream of the spawned binaries can be
inspected to get a better understanding of the failure, while still
being shown to the user when run with the '--verbose' flag.

Unfortunately, this breaks the progress bar in 'podman pull' because
the standard error stream is no longer connected to a file descriptor
that's a terminal device.

containers#689
containers#787
containers#823
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. Under The Hood Multiple areas of the app are influenced by this ticket 3. Enhancement Improvement to an existing feature 6. Minor Change Should not cause breakage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants