Skip to content

Commit 8fbf189

Browse files
committed
Bump github.com/cloudevents/sdk-go to v2.5.0
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]>
1 parent fef771d commit 8fbf189

File tree

119 files changed

+1808
-1928
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1808
-1928
lines changed

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.13
44

55
require (
66
github.com/aws/aws-sdk-go v1.31.12 // indirect
7-
github.com/cloudevents/sdk-go/v2 v2.1.0
7+
github.com/cloudevents/sdk-go/v2 v2.5.0
88
github.com/docker/cli v20.10.8+incompatible // indirect
99
github.com/docker/docker v20.10.8+incompatible // indirect
1010
github.com/emicklei/go-restful v2.15.0+incompatible // indirect
@@ -22,7 +22,9 @@ require (
2222
github.com/pkg/errors v0.9.1
2323
github.com/tektoncd/plumbing v0.0.0-20210514044347-f8a9689d5bd5
2424
go.opencensus.io v0.23.0
25+
go.uber.org/multierr v1.7.0 // indirect
2526
go.uber.org/zap v1.19.0
27+
golang.org/x/net v0.0.0-20210903162142-ad29c8ab022f // indirect
2628
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
2729
gomodules.xyz/jsonpatch/v2 v2.2.0
2830
k8s.io/api v0.21.4

go.sum

Lines changed: 6 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/reconciler/events/cloudevent/cloud_event_controller_test.go

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ func TestSendCloudEventWithRetries(t *testing.T) {
319319
},
320320
Status: v1beta1.TaskRunStatus{Status: objectStatus},
321321
},
322-
wantCEvent: "Validation: valid",
322+
wantCEvent: "Context Attributes,",
323323
wantEvent: "",
324324
}, {
325325
name: "test-send-cloud-event-pipelinerun",
@@ -332,7 +332,7 @@ func TestSendCloudEventWithRetries(t *testing.T) {
332332
},
333333
Status: v1beta1.PipelineRunStatus{Status: objectStatus},
334334
},
335-
wantCEvent: "Validation: valid",
335+
wantCEvent: "Context Attributes,",
336336
wantEvent: "",
337337
}, {
338338
name: "test-send-cloud-event-failed",
@@ -350,18 +350,15 @@ func TestSendCloudEventWithRetries(t *testing.T) {
350350
ctx := setupFakeContext(t, tc.clientBehaviour, true)
351351
ctx, cancel := context.WithCancel(ctx)
352352
defer cancel()
353-
err := SendCloudEventWithRetries(ctx, tc.object)
354-
if err != nil {
353+
if err := SendCloudEventWithRetries(ctx, tc.object); err != nil {
355354
t.Fatalf("Unexpected error sending cloud events: %v", err)
356355
}
357356
ceClient := Get(ctx).(FakeClient)
358-
err = checkCloudEvents(t, &ceClient, tc.name, tc.wantCEvent)
359-
if err != nil {
357+
if err := checkCloudEvents(t, &ceClient, tc.name, tc.wantCEvent); err != nil {
360358
t.Fatalf(err.Error())
361359
}
362360
recorder := controller.GetEventRecorder(ctx).(*record.FakeRecorder)
363-
err = checkEvents(t, recorder, tc.name, tc.wantEvent)
364-
if err != nil {
361+
if err := checkEvents(t, recorder, tc.name, tc.wantEvent); err != nil {
365362
t.Fatalf(err.Error())
366363
}
367364
})
@@ -380,14 +377,14 @@ func TestSendCloudEventWithRetriesInvalid(t *testing.T) {
380377
object: &v1beta1.TaskRun{
381378
Status: v1beta1.TaskRunStatus{},
382379
},
383-
wantCEvent: "Validation: valid",
380+
wantCEvent: "Context Attributes,",
384381
wantEvent: "",
385382
}, {
386383
name: "test-send-cloud-event-pipelinerun",
387384
object: &v1beta1.PipelineRun{
388385
Status: v1beta1.PipelineRunStatus{},
389386
},
390-
wantCEvent: "Validation: valid",
387+
wantCEvent: "Context Attributes,",
391388
wantEvent: "",
392389
}}
393390
for _, tc := range tests {

vendor/github.com/cloudevents/sdk-go/v2/alias.go

Lines changed: 14 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudevents/sdk-go/v2/binding/binary_writer.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudevents/sdk-go/v2/binding/doc.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudevents/sdk-go/v2/binding/encoding.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudevents/sdk-go/v2/binding/event_message.go

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudevents/sdk-go/v2/binding/finish_message.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/cloudevents/sdk-go/v2/binding/format/doc.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)