Skip to content

Conversation

@ankitathomas
Copy link
Contributor

Read container names from only stdout to avoid podman warnings on stderr.

Closes #689

@codecov
Copy link

codecov bot commented Aug 9, 2021

Codecov Report

Merging #745 (75d254d) into master (c2fc1fd) will increase coverage by 0.23%.
The diff coverage is 50.20%.

❗ Current head 75d254d differs from pull request most recent head 6dc9024. Consider uploading reports for the commit 6dc9024 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #745      +/-   ##
==========================================
+ Coverage   50.19%   50.43%   +0.23%     
==========================================
  Files         100      102       +2     
  Lines        8531     8721     +190     
==========================================
+ Hits         4282     4398     +116     
- Misses       3421     3473      +52     
- Partials      828      850      +22     
Impacted Files Coverage Δ
alpha/action/generate_dockerfile.go 81.81% <ø> (ø)
alpha/action/init.go 100.00% <ø> (ø)
alpha/action/list.go 67.70% <0.00%> (ø)
alpha/declcfg/declcfg.go 100.00% <ø> (ø)
alpha/declcfg/declcfg_to_model.go 76.19% <ø> (ø)
alpha/declcfg/load.go 83.56% <ø> (ø)
alpha/declcfg/model_to_declcfg.go 100.00% <ø> (ø)
alpha/declcfg/properties.go 100.00% <ø> (ø)
alpha/declcfg/write.go 71.69% <ø> (ø)
alpha/model/error.go 100.00% <ø> (ø)
... and 27 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c2fc1fd...6dc9024. Read the comment docs.

if exitErr, ok := err.(*exec.ExitError); ok {
msg = fmt.Sprintf("%s: %s", err, exitErr.Stderr)
}
r.logger.Errorf(msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: would logging the error here and then bubbling it up cause the message to occur twice in a row in the command output?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, generally speaking, logging at the source and then returning an error can lead to duplicate error logging, so if we can double-check how we're handling logging at the various call sites, and instead bubble the error up that should be sufficient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like it bubbles up, fixed the extra logging

Copy link

@dubee dubee left a comment

Choose a reason for hiding this comment

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

@ankitathomas, can you also change the other occurrences of CombinedOutput in the Unpack method? It looks like there are two more calls in Unpack that combine stdout and stderr.

Copy link

@dubee dubee left a comment

Choose a reason for hiding this comment

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

@ankitathomas, any updates on this one?

Signed-off-by: Ankita Thomas <ankithom@redhat.com>
@ankitathomas
Copy link
Contributor Author

@ankitathomas, can you also change the other occurrences of CombinedOutput in the Unpack method? It looks like there are two more calls in Unpack that combine stdout and stderr.

The other uses of CombinedOutput are only ever used as error messages, unlike the one instance fixed here that was using the CombinedOutput to look for a container name on stdout. The issue should go away with just this one fixed.

@timflannagan
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 5, 2022
@joelanford
Copy link
Member

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 3, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ankitathomas, joelanford

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 Feb 3, 2022
@openshift-merge-robot openshift-merge-robot merged commit d59081d into operator-framework:master Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OPM fails to create index with Podman 3.0.1

6 participants