Skip to content

Commit 7a6de48

Browse files
authored
feat: update api version to be 0.12.0 in order to use new Not constraint (#2603)
Signed-off-by: Tyler Slaton <[email protected]>
1 parent be7049d commit 7a6de48

File tree

6 files changed

+14
-13
lines changed

6 files changed

+14
-13
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/onsi/gomega v1.15.0
2525
github.com/openshift/api v0.0.0-20200331152225-585af27e34fd
2626
github.com/openshift/client-go v0.0.0-20200326155132-2a6cd50aedd0
27-
github.com/operator-framework/api v0.11.1
27+
github.com/operator-framework/api v0.12.0
2828
github.com/operator-framework/operator-registry v1.17.5
2929
github.com/otiai10/copy v1.2.0
3030
github.com/pkg/errors v0.9.1

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,8 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ
927927
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
928928
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
929929
github.com/operator-framework/api v0.7.1/go.mod h1:L7IvLd/ckxJEJg/t4oTTlnHKAJIP/p51AvEslW3wYdY=
930-
github.com/operator-framework/api v0.11.1 h1:5eNUMplyL/GZrnBgG4SS2csO3+Fl4F79OqXN6POHQyA=
931-
github.com/operator-framework/api v0.11.1/go.mod h1:FTiYGm11fZQ3cSX+EQHc/UWoGZAwkGfyeHU+wMJ8jmA=
930+
github.com/operator-framework/api v0.12.0 h1:aHxHk50/Y1J4Ogdk2J6tYofgX+GEqyBPCMyun+JFqV4=
931+
github.com/operator-framework/api v0.12.0/go.mod h1:FTiYGm11fZQ3cSX+EQHc/UWoGZAwkGfyeHU+wMJ8jmA=
932932
github.com/operator-framework/operator-registry v1.17.5 h1:LR8m1rFz5Gcyje8WK6iYt+gIhtzqo52zMRALdmTYHT0=
933933
github.com/operator-framework/operator-registry v1.17.5/go.mod h1:sRQIgDMZZdUcmHltzyCnM6RUoDF+WS8Arj1BQIARDS8=
934934
github.com/otiai10/copy v1.2.0 h1:HvG945u96iNadPoG2/Ja2+AUJeW5YuFQMixq9yirC+k=

pkg/controller/registry/resolver/resolver.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,8 @@ func (pc *predicateConverter) convertConstraints(constraints ...constraints.Cons
833833
case constraint.Any != nil:
834834
subs, perr := pc.convertConstraints(constraint.Any.Constraints...)
835835
preds[i], err = cache.Or(subs...), perr
836-
case constraint.None != nil:
837-
subs, perr := pc.convertConstraints(constraint.None.Constraints...)
836+
case constraint.Not != nil:
837+
subs, perr := pc.convertConstraints(constraint.Not.Constraints...)
838838
preds[i], err = cache.Not(subs...), perr
839839
case constraint.Cel != nil:
840840
preds[i], err = cache.CreateCelPredicate(pc.celEnv, constraint.Cel.Rule, constraint.FailureMessage)

pkg/controller/registry/resolver/resolver_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ func TestSolveOperators_OLMConstraint_CompoundAny(t *testing.T) {
10531053
}
10541054
}
10551055

1056-
func TestSolveOperators_OLMConstraint_CompoundNone(t *testing.T) {
1056+
func TestSolveOperators_OLMConstraint_CompoundNot(t *testing.T) {
10571057
namespace := "olm"
10581058
csName := "community"
10591059
catalog := cache.SourceKey{Name: csName, Namespace: namespace}
@@ -1065,10 +1065,10 @@ func TestSolveOperators_OLMConstraint_CompoundNone(t *testing.T) {
10651065
properties: []*api.Property{
10661066
{
10671067
Type: constraints.OLMConstraintType,
1068-
Value: `{"failureMessage": "compound none constraint",
1068+
Value: `{"failureMessage": "compound not constraint",
10691069
"all": {"constraints": [
10701070
{"gvk": {"group": "g0", "version": "v0", "kind": "k0"}},
1071-
{"none": {"constraints": [
1071+
{"not": {"constraints": [
10721072
{"gvk": {"group": "g1", "version": "v1", "kind": "k1"}},
10731073
{"gvk": {"group": "g2", "version": "v2", "kind": "k2"}}
10741074
]}}

vendor/github.com/operator-framework/api/pkg/constraints/constraint.go

+5-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/modules.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ github.com/openshift/client-go/config/informers/externalversions/config
624624
github.com/openshift/client-go/config/informers/externalversions/config/v1
625625
github.com/openshift/client-go/config/informers/externalversions/internalinterfaces
626626
github.com/openshift/client-go/config/listers/config/v1
627-
# github.com/operator-framework/api v0.11.1
627+
# github.com/operator-framework/api v0.12.0
628628
## explicit; go 1.16
629629
github.com/operator-framework/api/crds
630630
github.com/operator-framework/api/pkg/constraints

0 commit comments

Comments
 (0)