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

feat(resolver): use provided and required apis from grpc #1101

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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