Skip to content

Commit

Permalink
feat(resolver): use provided and required apis from grpc instead of
Browse files Browse the repository at this point in the history
calculating from the csv
  • Loading branch information
ecordell committed Oct 31, 2019
1 parent 190fc72 commit 8ed2e64
Showing 74 changed files with 3,011 additions and 1,313 deletions.
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -26,9 +26,7 @@ require (
github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b
github.com/operator-framework/operator-registry v1.4.0
github.com/pkg/errors v0.8.1
github.com/prometheus/client_golang v0.9.2
github.com/prometheus/common v0.0.0-20190104105734-b1c43a6df3ae // indirect
github.com/prometheus/procfs v0.0.0-20190104112138-b1a0a9a36d74 // indirect
github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829
github.com/sirupsen/logrus v1.4.2
github.com/soheilhy/cmux v0.1.4 // indirect
github.com/spf13/cobra v0.0.5
@@ -54,6 +52,8 @@ replace (
github.com/openshift/api => github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible
github.com/openshift/client-go => github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b

github.com/operator-framework/operator-registry => ../operator-registry

// Pin to kube 1.16
k8s.io/api => k8s.io/api v0.0.0-20190918155943-95b840bb6a1f
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.0.0-20190918161926-8f644eb6e783
91 changes: 91 additions & 0 deletions go.sum

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/controller/operators/catalog/operator.go
Original file line number Diff line number Diff line change
@@ -866,7 +866,7 @@ func (o *Operator) ensureSubscriptionCSVState(logger *logrus.Entry, sub *v1alpha
}
bundle, _, _ := querier.FindReplacement(&csv.Spec.Version.Version, sub.Status.CurrentCSV, sub.Spec.Package, sub.Spec.Channel, resolver.CatalogKey{Name: sub.Spec.CatalogSource, Namespace: sub.Spec.CatalogSourceNamespace})
if bundle != nil {
o.logger.Tracef("replacement %s bundle found for current bundle %s", bundle.Name, sub.Status.CurrentCSV)
o.logger.Tracef("replacement %s bundle found for current bundle %s", bundle.CsvName, sub.Status.CurrentCSV)
out.Status.State = v1alpha1.SubscriptionStateUpgradeAvailable
} else {
out.Status.State = v1alpha1.SubscriptionStateAtLatest
5 changes: 3 additions & 2 deletions pkg/controller/registry/resolver/evolver.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package resolver

import (
opregistry "github.com/operator-framework/operator-registry/pkg/registry"
"github.com/pkg/errors"

"github.com/operator-framework/operator-registry/pkg/api"
)

// TODO: this should take a cancellable context for killing long resolution
@@ -76,7 +77,7 @@ func (e *NamespaceGenerationEvolver) checkForUpdates() error {

func (e *NamespaceGenerationEvolver) addNewOperators(add map[OperatorSourceInfo]struct{}) error {
for s := range add {
var bundle *opregistry.Bundle
var bundle *api.Bundle
var key *CatalogKey
var err error
if s.StartingCSV != "" {
Loading

0 comments on commit 8ed2e64

Please sign in to comment.