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

change to log image ref value when resolving name #1032

Merged

Conversation

acornett21
Copy link
Contributor

Description of the change:
Updating error log when calling Resolve method to log ref.String() since if there is an error name will be nil and the logging an empty value is not helpful for troubleshooting.

Motivation for the change:
When running opm add index when Resolve fails, since name is nil the log message does not indicate which registry there is an issue with. Which leads to trying to trouble shoot is it the registry where the index resides, or the registry where the bundle exists (since in alot of cases these are different).

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 added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 17, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 17, 2022

Hi @acornett21. 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.

@grokspawn
Copy link
Contributor

/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 Oct 19, 2022
@grokspawn
Copy link
Contributor

Could you also add a unit test which captures the scenario where resolution fails? It feels like an important edge case.

…be empty in error scenario

Signed-off-by: Adam D. Cornett <adc@redhat.com>
@acornett21
Copy link
Contributor Author

Could you also add a unit test which captures the scenario where resolution fails? It feels like an important edge case.

@grokspawn It looks like there were already test cases for this, I was just unsure on how to run them. They are now updated and passing locally.

@codecov
Copy link

codecov bot commented Oct 19, 2022

Codecov Report

Merging #1032 (4fd00ef) into master (614d6a9) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1032      +/-   ##
==========================================
+ Coverage   51.95%   51.96%   +0.01%     
==========================================
  Files         102      102              
  Lines        9215     9215              
==========================================
+ Hits         4788     4789       +1     
+ Misses       3514     3513       -1     
  Partials      913      913              
Impacted Files Coverage Δ
alpha/veneer/semver/semver.go 60.50% <0.00%> (+0.50%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@exdx
Copy link
Member

exdx commented Nov 3, 2022

/lgtm

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

openshift-ci bot commented Nov 14, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: acornett21, grokspawn

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 Nov 14, 2022
@openshift-merge-robot openshift-merge-robot merged commit d888b72 into operator-framework:master Nov 14, 2022
@acornett21 acornett21 deleted the enhance_log branch November 14, 2022 17:19
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.

None yet

4 participants