Skip to content

Conversation

@akihikokuroda
Copy link
Member

Description of the change:
Adding a warning log entry when opm index rm is issued for a non-existing package

Motivation for the change:
Closes #675

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

@openshift-ci openshift-ci bot requested review from exdx and timflannagan September 14, 2021 21:05
@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 14, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 14, 2021

Hi @akihikokuroda. Thanks for your PR.

I'm waiting for a operator-framework member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@kevinrizza
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 16, 2021
return err
}
if len(csvNames) == 0 {
logrus.WithFields(logrus.Fields{"pkg": packageName}).Warnf("package doesn't exist")
Copy link
Member

Choose a reason for hiding this comment

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

Should this be an error instead of a warning?

Copy link
Member

Choose a reason for hiding this comment

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

We should probably just return here.

Copy link
Member

Choose a reason for hiding this comment

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

Do we need some testing if we're changing behavior here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for reviewing. I'll change the warning to the error and return here. I'll look into the test change, too.

Copy link
Member

Choose a reason for hiding this comment

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

I think the linter error is just fixed by running go-fmt

@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #779 (764704d) into master (a3253eb) will increase coverage by 0.03%.
The diff coverage is 100.00%.

❗ Current head 764704d differs from pull request most recent head 7b2d1a9. Consider uploading reports for the commit 7b2d1a9 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #779      +/-   ##
==========================================
+ Coverage   50.90%   50.94%   +0.03%     
==========================================
  Files         102      102              
  Lines        8753     8755       +2     
==========================================
+ Hits         4456     4460       +4     
+ Misses       3458     3456       -2     
  Partials      839      839              
Impacted Files Coverage Δ
pkg/sqlite/load.go 38.48% <100.00%> (+0.37%) ⬆️

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 a3253eb...7b2d1a9. Read the comment docs.

@akihikokuroda
Copy link
Member Author

I changed to return the error to caller so that the caller can handle the error. I also updated the test. Thanks!

Signed-off-by: akihikokuroda <akuroda@us.ibm.com>
@exdx
Copy link
Contributor

exdx commented Feb 3, 2022

/lgtm

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

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 4, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: akihikokuroda, 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 4, 2022
@openshift-merge-robot openshift-merge-robot merged commit 5566e4b into operator-framework:master Feb 4, 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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Removing a non-existent operator from an index image does not produce an error or a warning message

6 participants