Skip to content

Commit

Permalink
Merge pull request #1101 from ecordell/resolver-required-apis
Browse files Browse the repository at this point in the history
feat(resolver): use provided and required apis from grpc
  • Loading branch information
ecordell authored Nov 1, 2019
2 parents eb9a999 + 25901bc commit a6e1e93
Show file tree
Hide file tree
Showing 75 changed files with 3,022 additions and 1,325 deletions.
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ require (
github.com/munnerz/goautoneg v0.0.0-20190414153302-2ae31c8b6b30 // indirect
github.com/openshift/api v3.9.1-0.20190924102528-32369d4db2ad+incompatible
github.com/openshift/client-go v0.0.0-20190923180330-3b6373338c9b
github.com/operator-framework/operator-registry v1.4.0
github.com/operator-framework/operator-registry v1.5.1
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
Expand Down
93 changes: 93 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
Expand Up @@ -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
Expand Down
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
Expand Down Expand Up @@ -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 != "" {
Expand Down
Loading

0 comments on commit a6e1e93

Please sign in to comment.