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

compat, build: suppress step errors when quiet=1 is set #14319

Merged

Conversation

flouthoc
Copy link
Collaborator

Match with docker API and suppress step errors when field quiet is set.

Closes: #14315

@openshift-ci
Copy link
Contributor

openshift-ci bot commented May 23, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 23, 2022
@Romain-Geissler-1A
Copy link
Contributor

Hi,

Thank you for fixing this so quickly !

Since I face this problem on a RHEL (8.6 and 9) with the official podman package, and since it seems to me that this fix isn't quite invaside/risky, would it be possible to also consider a backport in branch 4.0 and an official RHEL 8.6/9 podman package release as well ?

Cheers,
Romain

@flouthoc flouthoc force-pushed the suppress-aux-on-quiet branch 2 times, most recently from ae2398b to cb5856c Compare May 23, 2022 10:38
@flouthoc
Copy link
Collaborator Author

Hi,

Thank you for fixing this so quickly !

Since I face this problem on a RHEL (8.6 and 9) with the official podman package, and since it seems to me that this fix isn't quite invaside/risky, would it be possible to also consider a backport in branch 4.0 and an official RHEL 8.6/9 podman package release as well ?

Cheers, Romain

@Romain-Geissler-1A I am not sure if we could backport this or not afaik backports are usually critical bug-fixes but I think since its pretty straight-forward to backport this so maybe this could be picked up as backport candidate.

@mheon @rhatdan Would it be possible to consider this as backport candidate ?

case e := <-stderr.Chan():
if len(stepErrors) > 0 {
Copy link
Member

Choose a reason for hiding this comment

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

No need for length check. For loop will not fire if len==0.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed :)

@mheon
Copy link
Member

mheon commented May 23, 2022

Please open a Bugzilla if you wish to have this backported - the backport process lives there.

Match with docker API and suppress step errors when field quiet is set.

Closes: containers#14315

Signed-off-by: Aditya R <[email protected]>
@flouthoc flouthoc force-pushed the suppress-aux-on-quiet branch from cb5856c to 2133edb Compare May 23, 2022 18:51
@rhatdan
Copy link
Member

rhatdan commented May 23, 2022

LGTM

@flouthoc
Copy link
Collaborator Author

@jwhonce @mheon @rhatdan @nalind PTAL, tests are green.

@rhatdan
Copy link
Member

rhatdan commented May 24, 2022

@Romain-Geissler-1A Can you verify this fix works for you?

@Romain-Geissler-1A
Copy link
Contributor

Hi,

I have started an image in privileged mode based on this Dockerfile https://github.com/containers/podman/blob/main/contrib/podmanimage/upstream/Dockerfile targetting this pull request, started the podman service, cloned my own code and tried running this command, and indeed it seems to work:

[root@6b50235f2201 src]# podman --remote run -t -i --rm "$(podman --remote build --quiet .)"
++ podman --remote build --quiet .
+ podman --remote run -t -i --rm 416e6679f8d104950683bcfbe591d552efd364a67e4ae4c05f7a124c4ef44c53

So as far as I can tell, yes it's validated on my side.

Note: it looks like this diff applies cleanly on branch "v4.0". I tried to rpmbuild it on a centos stream 8 image, but went into errors, so I haven't tried this on an actual RHEL 8, only in the above fedora privileged image.

Cheers,
Romain

@rhatdan
Copy link
Member

rhatdan commented May 24, 2022

/lgtm

@TomSweeneyRedHat
Copy link
Member

Just for historical purposes, the backport BZ was opened here: https://bugzilla.redhat.com/show_bug.cgi?id=2089790

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

podman --remote build --quiet outputs containers build's stderr ouput in client's stdout
6 participants