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

Upgrade dependencies #627

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
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ require (
k8s.io/apiserver v0.19.7
k8s.io/client-go v0.19.7
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009
knative.dev/eventing v0.20.1-0.20210208155752-37eaf717b34a
knative.dev/eventing v0.20.1-0.20210210152747-c4e9c3ba2031
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf
knative.dev/pkg v0.0.0-20210208175252-a02dcff9ee26
)
5 changes: 2 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1270,15 +1270,14 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H
k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ=
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/eventing v0.20.1-0.20210208155752-37eaf717b34a h1:VfRjbzKlv8I8kOzbx0SrlxaDu8LTQmGfKRr7oGYDN8U=
knative.dev/eventing v0.20.1-0.20210208155752-37eaf717b34a/go.mod h1:LnrksqAahqR5Ts5gTdsNuEIomiVPyBgusTAMyUVVN+4=
knative.dev/eventing v0.20.1-0.20210210152747-c4e9c3ba2031 h1:kgc4BxVaWwMLVHg9I6m05Nq0TlkVQi7xDKSI2ug+Enc=
knative.dev/eventing v0.20.1-0.20210210152747-c4e9c3ba2031/go.mod h1:cNevML3a/1zuY3VP/mpnw0hQnZj344wCissYRi8B1Oo=
knative.dev/hack v0.0.0-20210120165453-8d623a0af457 h1:jEBITgx/lQydGncM0uetpv/ZqawRzb2aSfEaYoMeDjM=
knative.dev/hack v0.0.0-20210120165453-8d623a0af457/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20210120165453-8d623a0af457/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf h1:u4cY4jr2LYvhoz/1HBWEPsMiLkm0HMdDTfmmw1RE8zE=
knative.dev/hack v0.0.0-20210203173706-8368e1f6eacf/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/pkg v0.0.0-20210130001831-ca02ef752ac6/go.mod h1:X4NPrCo8NK3hbDVan9Vm7mf5io3ZoINakAdrpSXVB08=
knative.dev/pkg v0.0.0-20210208131226-4b2ae073fa06/go.mod h1:72bhCSsMqNteAB/T7gZN6w/bnMz+GwGE92+RUmhjzF8=
knative.dev/pkg v0.0.0-20210208175252-a02dcff9ee26 h1:PkJB1M77wYBI1UF5vp8y4fRnYQDu1IkRWswp6CgRRSo=
knative.dev/pkg v0.0.0-20210208175252-a02dcff9ee26/go.mod h1:TJSdebQOWX5N2bszohOYVi0H1QtXbtlYLuMghAFBMhY=
knative.dev/reconciler-test v0.0.0-20210203100806-0603b747dcc9/go.mod h1:iNDjVEzkqU1BKYqoaE33uiq7IZEtlTc9gUOFdWkQtkc=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ func (t *Trigger) Validate(ctx context.Context) *apis.FieldError {
errs := t.Spec.Validate(ctx).ViaField("spec")
errs = t.validateAnnotation(errs, DependencyAnnotation, t.validateDependencyAnnotation)
errs = t.validateAnnotation(errs, InjectionAnnotation, t.validateInjectionAnnotation)
if apis.IsInUpdate(ctx) {
original := apis.GetBaseline(ctx).(*Trigger)
errs = errs.Also(t.CheckImmutableFields(ctx, original))
}
return errs
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ type PingSourceSpec struct {
// +optional
Data string `json:"data,omitempty"`

// DataBase64 is base64 encoded binary data used as the body of the event posted to the sink. Default is empty.
// DataBase64 is the base64-encoded string of the actual event's body posted to the sink. Default is empty.
// Mutually exclusive with Data.
// +optional
DataBase64 string `json:"dataBase64,omitempty"`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package helpers

import (
"context"
"strings"
"testing"

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -71,7 +72,7 @@ func BrokerV1Beta1ControlPlaneTest(
})

t.Run("Ready Trigger V1Beta1 (no Broker) set Broker and includes status.subscriber Uri", func(t *testing.T) {
triggerV1Beta1ReadyAfterBrokerIncludesSubURI(t, triggerNoBroker, brokerName, client)
triggerV1Beta1CanNotUpdateBroker(t, triggerNoBroker, brokerName, client)
})

t.Run("Ready Trigger V1Beta1 includes status.subscriber Uri", func(t *testing.T) {
Expand Down Expand Up @@ -120,7 +121,7 @@ func triggerV1Beta1ReadyBrokerReadyHelper(triggerName, brokerName string, client
client.WaitForResourceReadyOrFail(trigger.Name, testlib.TriggerTypeMeta)
}

func triggerV1Beta1ReadyAfterBrokerIncludesSubURI(t *testing.T, triggerName, brokerName string, client *testlib.Client) {
func triggerV1Beta1CanNotUpdateBroker(t *testing.T, triggerName, brokerName string, client *testlib.Client) {
err := reconciler.RetryUpdateConflicts(func(attempts int) (err error) {
tr, err := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Get(context.Background(), triggerName, metav1.GetOptions{})
if err != nil {
Expand All @@ -130,28 +131,12 @@ func triggerV1Beta1ReadyAfterBrokerIncludesSubURI(t *testing.T, triggerName, bro
_, e := client.Eventing.EventingV1beta1().Triggers(client.Namespace).Update(context.Background(), tr, metav1.UpdateOptions{})
return e
})
if err != nil {
t.Fatalf("Error: Could not update trigger %s: %v", triggerName, err)
if err == nil {
t.Fatalf("Error: Was able to update the trigger.Spec.Broker %s", triggerName)
}

client.WaitForResourceReadyOrFail(triggerName, testlib.TriggerTypeMeta)

var tr *eventingv1beta1.Trigger
triggers := client.Eventing.EventingV1beta1().Triggers(client.Namespace)
err = client.RetryWebhookErrors(func(attempts int) (err error) {
var e error
client.T.Logf("Getting v1beta1 trigger %s", triggerName)
tr, e = triggers.Get(context.Background(), triggerName, metav1.GetOptions{})
if e != nil {
client.T.Logf("Failed to get trigger %q: %v", triggerName, e)
}
return err
})
if err != nil {
t.Fatalf("Error: Could not get trigger %s: %v", triggerName, err)
}
if tr.Status.SubscriberURI == nil {
t.Fatalf("Error: trigger.Status.SubscriberURI is nil but Broker Addressable & Ready")
if !strings.Contains(err.Error(), "Immutable fields changed (-old +new): broker, spec") {
t.Fatalf("Unexpected failure to update trigger, expected Immutable fields changed (-old +new): broker, spec But got: %v", err)
}
}

Expand Down
5 changes: 3 additions & 2 deletions vendor/knative.dev/eventing/test/e2e/helpers/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# helpers

This package contains helper functions that are used in the actual tests. These
functions can be referenced in other repositories (like `eventing-contrib`) for
adding similar tests.
functions can be referenced in other repositories (like inside the
`eventing-***` inside the `knative-sandbox` organization) for adding similar
tests.
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/eventing v0.20.1-0.20210208155752-37eaf717b34a
# knative.dev/eventing v0.20.1-0.20210210152747-c4e9c3ba2031
## explicit
knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/configs
Expand Down