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

Use the grpc response as the source of truth for update graph data #1105

Merged
merged 2 commits into from
Dec 20, 2019

Conversation

ecordell
Copy link
Member

@ecordell ecordell commented Nov 1, 2019

Description of the change:
This trusts the values coming from the registry pod to determine what an operator replaces.

It also removes the remaining places that csvs needed to be parsed during resolution.

Depends on operator-framework/operator-registry#113 and will need to be updated when it merges.

Motivation for the change:
This allows us to change how the graph is generated in the future.

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 1, 2019
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 1, 2019
@ecordell
Copy link
Member Author

ecordell commented Nov 1, 2019

/retest

1 similar comment
@ecordell
Copy link
Member Author

ecordell commented Nov 1, 2019

/retest

@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 2, 2019
@@ -238,18 +238,14 @@ type Operator struct {

var _ OperatorSurface = &Operator{}

func NewOperatorFromBundle(bundle *api.Bundle, replaces string, startingCSV string, sourceKey CatalogKey) (*Operator, error) {
func NewOperatorFromBundle(bundle *api.Bundle, startingCSV string, sourceKey CatalogKey) (*Operator, error) {
Copy link
Member

Choose a reason for hiding this comment

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

Just asking because I don't know how this works very well:
since the replaces field in the db is an int64 and what is used here is a string that is the equivalent of the replaces field in the csv - does the o.Identifier() extract that replaces csv name from the database/query?

Copy link
Member Author

Choose a reason for hiding this comment

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

The values from replaces in the registry isn't seen by olm at all.

OLM queries for a replacement with FindReplacement, and uses whatever the registry returns as the value for the "replaces" field that it puts in the CSV.

@gallettilance
Copy link
Member

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2019
@ecordell
Copy link
Member Author

ecordell commented Nov 2, 2019

/retest

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Nov 2, 2019
@ecordell
Copy link
Member Author

ecordell commented Nov 2, 2019

/retest

2 similar comments
@ecordell
Copy link
Member Author

ecordell commented Nov 4, 2019

/retest

@ecordell
Copy link
Member Author

ecordell commented Nov 6, 2019

/retest

@dinhxuanvu
Copy link
Member

/retest

1 similar comment
@njhale
Copy link
Member

njhale commented Nov 13, 2019

/retest

@awgreene
Copy link
Member

awgreene commented Nov 14, 2019

/retest

--- FAIL: TestSubscriptionUpdatesMultipleIntermediates (635.26s)

@ecordell
Copy link
Member Author

/retest

instead, updates should be simulated  - in this case, by switching
to a channel that contains an update.
@ecordell
Copy link
Member Author

/retest

@jpeeler
Copy link

jpeeler commented Dec 20, 2019

/retest
Failing test passed for me locally (TestSubscriptionUpdatesMultipleIntermediates).

@jpeeler
Copy link

jpeeler commented Dec 20, 2019

/retest

@jpeeler
Copy link

jpeeler commented Dec 20, 2019

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ecordell, gallettilance, jpeeler

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-merge-robot openshift-merge-robot merged commit 890e13c into operator-framework:master Dec 20, 2019
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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants