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

Bug 1781366: feat(resolver): fallback to csv parsing if grcp api does not contain info #1194

Merged

Conversation

ecordell
Copy link
Member

Description of the change:
Falls back to parsing the CSV in the grpc api response if expected fields are not present.

Motivation for the change:
Recent changes to the grpc api pulls out information from the CSV on load time via OPM and shares it. OLM is looking in those new fields to find it. If an older registry is used against a newer OLM, OLM will see packages that have no required/provided apis and will fail to resolve dependencies.

No official content was ever shipped with this combination, but users building their own custom catalogs will hit this.

Note: this change is also included in #1105

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-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 12, 2019
@ecordell ecordell changed the title feat(resolver): fallback to csv parsing if grcp api does not contain info Bug 1781366: feat(resolver): fallback to csv parsing if grcp api does not contain info Dec 12, 2019
@openshift-ci-robot
Copy link
Collaborator

@ecordell: This pull request references Bugzilla bug 1781366, which is invalid:

  • expected the bug to target the "4.4.0" release, but it targets "4.3.0" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 1781366: feat(resolver): fallback to csv parsing if grcp api does not contain info

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Dec 12, 2019
@ecordell
Copy link
Member Author

/bugzilla refresh

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Dec 12, 2019
@openshift-ci-robot
Copy link
Collaborator

@ecordell: This pull request references Bugzilla bug 1781366, which is valid. The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

/bugzilla refresh

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.

@openshift-ci-robot openshift-ci-robot removed the bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. label Dec 12, 2019
Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

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

/lgtm

}

// legacy support - if the grpc api doesn't contain the information we need, fallback to csv parsing
if len(required) == 0 && len(provided) == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Just a thought -- but if JSONPath can let us query the provided and required APIs w/o unmarshaling the entire CSV, should we use it to more accurately verify the content of the bundle fields?

(this question shouldn't block the PR)

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking that if the grpc has any provide/required apis, we just trust that (gives us more freedom on the side of the registry going forward).

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 12, 2019
@kevinrizza
Copy link
Member

/lgtm

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ecordell, kevinrizza, njhale

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

@njhale
Copy link
Member

njhale commented Dec 12, 2019

@spadgett Seeing some more console e2e failures here.

@exdx
Copy link
Member

exdx commented Dec 12, 2019

/retest

@ecordell
Copy link
Member Author

/hold cancel

@openshift-merge-robot openshift-merge-robot merged commit 6057571 into operator-framework:master Dec 12, 2019
@openshift-ci-robot
Copy link
Collaborator

@ecordell: All pull requests linked via external trackers have merged. Bugzilla bug 1781366 has been moved to the MODIFIED state.

In response to this:

Bug 1781366: feat(resolver): fallback to csv parsing if grcp api does not contain info

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.

@ecordell
Copy link
Member Author

/cherry-pick release-4.3

@openshift-cherrypick-robot

@ecordell: new pull request created: #1195

In response to this:

/cherry-pick release-4.3

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.

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. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants