Skip to content

Commit

Permalink
Bump github.com/cloudevents/sdk-go to v2.5.0
Browse files Browse the repository at this point in the history
This updates the cloudevents dependency from v2.1.0 to v2.5.0. This is over a year
old and catches us up quite far.

There was one manual change in the cloud_event_controller_test.go file. CloudEvents
changed the string representation of an event, which our tests looked for. This
matches the change to their upstream test: github.com/cloudevents/sdk-go/pull/639.

Signed-off-by: Dan Lorenc <[email protected]>
  • Loading branch information
dlorenc committed Sep 6, 2021
1 parent fef771d commit 8fbf189
Show file tree
Hide file tree
Showing 119 changed files with 1,808 additions and 1,928 deletions.
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.13

require (
github.com/aws/aws-sdk-go v1.31.12 // indirect
github.com/cloudevents/sdk-go/v2 v2.1.0
github.com/cloudevents/sdk-go/v2 v2.5.0
github.com/docker/cli v20.10.8+incompatible // indirect
github.com/docker/docker v20.10.8+incompatible // indirect
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
Expand All @@ -22,7 +22,9 @@ require (
github.com/pkg/errors v0.9.1
github.com/tektoncd/plumbing v0.0.0-20210514044347-f8a9689d5bd5
go.opencensus.io v0.23.0
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.19.0
golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
gomodules.xyz/jsonpatch/v2 v2.2.0
k8s.io/api v0.21.4
Expand Down
14 changes: 6 additions & 8 deletions go.sum

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

17 changes: 7 additions & 10 deletions pkg/reconciler/events/cloudevent/cloud_event_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ func TestSendCloudEventWithRetries(t *testing.T) {
},
Status: v1beta1.TaskRunStatus{Status: objectStatus},
},
wantCEvent: "Validation: valid",
wantCEvent: "Context Attributes,",
wantEvent: "",
}, {
name: "test-send-cloud-event-pipelinerun",
Expand All @@ -332,7 +332,7 @@ func TestSendCloudEventWithRetries(t *testing.T) {
},
Status: v1beta1.PipelineRunStatus{Status: objectStatus},
},
wantCEvent: "Validation: valid",
wantCEvent: "Context Attributes,",
wantEvent: "",
}, {
name: "test-send-cloud-event-failed",
Expand All @@ -350,18 +350,15 @@ func TestSendCloudEventWithRetries(t *testing.T) {
ctx := setupFakeContext(t, tc.clientBehaviour, true)
ctx, cancel := context.WithCancel(ctx)
defer cancel()
err := SendCloudEventWithRetries(ctx, tc.object)
if err != nil {
if err := SendCloudEventWithRetries(ctx, tc.object); err != nil {
t.Fatalf("Unexpected error sending cloud events: %v", err)
}
ceClient := Get(ctx).(FakeClient)
err = checkCloudEvents(t, &ceClient, tc.name, tc.wantCEvent)
if err != nil {
if err := checkCloudEvents(t, &ceClient, tc.name, tc.wantCEvent); err != nil {
t.Fatalf(err.Error())
}
recorder := controller.GetEventRecorder(ctx).(*record.FakeRecorder)
err = checkEvents(t, recorder, tc.name, tc.wantEvent)
if err != nil {
if err := checkEvents(t, recorder, tc.name, tc.wantEvent); err != nil {
t.Fatalf(err.Error())
}
})
Expand All @@ -380,14 +377,14 @@ func TestSendCloudEventWithRetriesInvalid(t *testing.T) {
object: &v1beta1.TaskRun{
Status: v1beta1.TaskRunStatus{},
},
wantCEvent: "Validation: valid",
wantCEvent: "Context Attributes,",
wantEvent: "",
}, {
name: "test-send-cloud-event-pipelinerun",
object: &v1beta1.PipelineRun{
Status: v1beta1.PipelineRunStatus{},
},
wantCEvent: "Validation: valid",
wantCEvent: "Context Attributes,",
wantEvent: "",
}}
for _, tc := range tests {
Expand Down
24 changes: 14 additions & 10 deletions vendor/github.com/cloudevents/sdk-go/v2/alias.go

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

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

5 changes: 5 additions & 0 deletions vendor/github.com/cloudevents/sdk-go/v2/binding/doc.go

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

5 changes: 5 additions & 0 deletions vendor/github.com/cloudevents/sdk-go/v2/binding/encoding.go

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

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

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

5 changes: 5 additions & 0 deletions vendor/github.com/cloudevents/sdk-go/v2/binding/format/doc.go

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

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

12 changes: 12 additions & 0 deletions vendor/github.com/cloudevents/sdk-go/v2/binding/message.go

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

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

5 changes: 5 additions & 0 deletions vendor/github.com/cloudevents/sdk-go/v2/binding/spec/doc.go

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

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

5 changes: 5 additions & 0 deletions vendor/github.com/cloudevents/sdk-go/v2/binding/spec/spec.go

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

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

18 changes: 13 additions & 5 deletions vendor/github.com/cloudevents/sdk-go/v2/binding/to_event.go

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

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

5 changes: 5 additions & 0 deletions vendor/github.com/cloudevents/sdk-go/v2/binding/write.go

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

Loading

0 comments on commit 8fbf189

Please sign in to comment.