-
Notifications
You must be signed in to change notification settings - Fork 133
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
Update CDEvents SDK to v0.4 #932
Conversation
Bumps the go-deps group with 6 updates in the / directory: | Package | From | To | | --- | --- | --- | | [cloud.google.com/go/pubsub](https://github.com/googleapis/google-cloud-go) | `1.41.0` | `1.43.0` | | [github.com/DataDog/datadog-api-client-go/v2](https://github.com/DataDog/datadog-api-client-go) | `2.29.0` | `2.30.0` | | [github.com/cdevents/sdk-go](https://github.com/cdevents/sdk-go) | `0.3.2` | `0.4.1` | | [github.com/getsentry/sentry-go](https://github.com/getsentry/sentry-go) | `0.28.1` | `0.29.0` | | [github.com/slok/go-http-metrics](https://github.com/slok/go-http-metrics) | `0.12.0` | `0.13.0` | | [github.com/xanzy/go-gitlab](https://github.com/xanzy/go-gitlab) | `0.107.0` | `0.109.0` | Updates `cloud.google.com/go/pubsub` from 1.41.0 to 1.43.0 - [Release notes](https://github.com/googleapis/google-cloud-go/releases) - [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md) - [Commits](googleapis/google-cloud-go@pubsub/v1.41.0...pubsub/v1.43.0) Updates `github.com/DataDog/datadog-api-client-go/v2` from 2.29.0 to 2.30.0 - [Release notes](https://github.com/DataDog/datadog-api-client-go/releases) - [Changelog](https://github.com/DataDog/datadog-api-client-go/blob/master/CHANGELOG.md) - [Commits](DataDog/datadog-api-client-go@v2.29.0...v2.30.0) Updates `github.com/cdevents/sdk-go` from 0.3.2 to 0.4.1 - [Release notes](https://github.com/cdevents/sdk-go/releases) - [Changelog](https://github.com/cdevents/sdk-go/blob/main/.goreleaser.yaml) - [Commits](cdevents/sdk-go@v0.3.2...v0.4.1) Updates `github.com/getsentry/sentry-go` from 0.28.1 to 0.29.0 - [Release notes](https://github.com/getsentry/sentry-go/releases) - [Changelog](https://github.com/getsentry/sentry-go/blob/master/CHANGELOG.md) - [Commits](getsentry/sentry-go@v0.28.1...v0.29.0) Updates `github.com/slok/go-http-metrics` from 0.12.0 to 0.13.0 - [Release notes](https://github.com/slok/go-http-metrics/releases) - [Changelog](https://github.com/slok/go-http-metrics/blob/master/CHANGELOG.md) - [Commits](slok/go-http-metrics@v0.12.0...v0.13.0) Updates `github.com/xanzy/go-gitlab` from 0.107.0 to 0.109.0 - [Release notes](https://github.com/xanzy/go-gitlab/releases) - [Changelog](https://github.com/xanzy/go-gitlab/blob/main/releases_test.go) - [Commits](xanzy/go-gitlab@v0.107.0...v0.109.0) Updates `google.golang.org/api` from 0.192.0 to 0.196.0 - [Release notes](https://github.com/googleapis/google-api-go-client/releases) - [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md) - [Commits](googleapis/google-api-go-client@v0.192.0...v0.196.0) --- updated-dependencies: - dependency-name: cloud.google.com/go/pubsub dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/DataDog/datadog-api-client-go/v2 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/cdevents/sdk-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/getsentry/sentry-go dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/slok/go-http-metrics dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: github.com/xanzy/go-gitlab dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps - dependency-name: google.golang.org/api dependency-type: direct:production update-type: version-update:semver-minor dependency-group: go-deps ... Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Sunny <[email protected]>
49c68e0
to
3585b77
Compare
I had a look at the CDEvents related build failure due to an API breaking change
Going through the changes, I found this document https://github.com/cdevents/sdk-go/blob/v0.4.1/docs/README.md which shows usage of
As mentioned in the error message, this can be fixed by updating the CDEvents payload used in the test for context type from The following patch fixes the issue diff --git a/internal/server/receiver_handler_test.go b/internal/server/receiver_handler_test.go
index e460f72..2125ee8 100644
--- a/internal/server/receiver_handler_test.go
+++ b/internal/server/receiver_handler_test.go
@@ -145,7 +145,7 @@ func Test_handlePayload(t *testing.T) {
"id": "5555",
"source": "github",
"timestamp": "2023-12-07T14:51:29.908479495Z",
- "type": "dev.cdevents.change.merged.0.1.2",
+ "type": "dev.cdevents.change.merged.0.2.0",
},
"subject": map[string]string{
"type": "change",
@@ -191,7 +191,7 @@ func Test_handlePayload(t *testing.T) {
"id": "5555",
"source": "github",
"timestamp": "2023-12-07T14:51:29.908479495Z",
- "type": "dev.cdevents.change.merged.0.1.2",
+ "type": "dev.cdevents.change.merged.0.2.0",
},
"subject": map[string]string{
"type": "change",
@@ -236,7 +236,7 @@ func Test_handlePayload(t *testing.T) {
"id": "5555",
"source": "github",
"timestamp": "2023-12-07T14:51:29.908479495Z",
- "type": "dev.cdevents.change.merged.0.1.2",
+ "type": "dev.cdevents.change.merged.0.2.0",
},
"subject": map[string]string{
"type": "change",
diff --git a/internal/server/receiver_handlers.go b/internal/server/receiver_handlers.go
index 558c608..5c3dfd7 100644
--- a/internal/server/receiver_handlers.go
+++ b/internal/server/receiver_handlers.go
@@ -32,6 +32,7 @@ import (
"time"
cdevents "github.com/cdevents/sdk-go/pkg/api"
+ cdevents04 "github.com/cdevents/sdk-go/pkg/api/v04"
"github.com/fluxcd/pkg/apis/meta"
"github.com/fluxcd/pkg/runtime/conditions"
"github.com/go-logr/logr"
@@ -205,7 +206,7 @@ func (s *ReceiverServer) validate(ctx context.Context, receiver apiv1.Receiver,
return fmt.Errorf("unable to read CDEvent request body: %s", err)
}
- cdevent, err := cdevents.NewFromJsonBytes(b)
+ cdevent, err := cdevents04.NewFromJsonBytes(b)
if err != nil {
return fmt.Errorf("unable to validate CDEvent event: %s", err)
} |
Signed-off-by: Stefan Prodan <[email protected]>
Signed-off-by: Stefan Prodan <[email protected]>
Bumps the go-deps group with 6 updates in the / directory:
1.41.0
1.43.0
2.29.0
2.30.0
0.3.2
0.4.1
0.28.1
0.29.0
0.12.0
0.13.0
0.107.0
0.109.0
Updates
cloud.google.com/go/pubsub
from 1.41.0 to 1.43.0Commits
58df9c3
chore(main): release pubsub 1.43.0 (#10714)6685397
chore(.github): pin golang.org/x/mod and golang.org/x/tools in renovate (#10835)f0958b0
chore(all): update deps (#10834)ce82b22
vertexai(test): add corpora_test in tokenizer module (#10784)8d008de
feat(bigtable): add "TypeUnspecified" to represent an unspecified type (#10820)caa826c
feat(pubsub): allow trace extraction from protobuf message (#10827)48addbf
fix(pubsub): add attributes before startSpan (#10800)79a0e11
fix(pubsub): close grpc streams on retry (#10624)02b2d12
feat(bigtable): Add client side metrics to feature flag (#10678)0d732cc
fix(datastore): do not delay on final transaction attempt (#10824)Updates
github.com/DataDog/datadog-api-client-go/v2
from 2.29.0 to 2.30.0Release notes
Sourced from github.com/DataDog/datadog-api-client-go/v2's releases.
Changelog
Sourced from github.com/DataDog/datadog-api-client-go/v2's changelog.
Commits
2f7b503
Release 2.30.0 (#2664)3cc5194
Fix maxSignalDuration third party (#2663)5358ddd
GCP-1829: Disable Flaky Synthetic Test (#2662)3fe682a
mark groupby_simple_monitor as deprecated (#2658)6463640
Extend Widget time schema with support for new fixed_span and live_span objec...814e183
Software catalog openapi spec (#2641)3a425ec
[list events v2]Update params description to clarify unit (#2657)8f9d833
Fix VFTs and extracted local variables enum types (#2604)2d033ad
[SLO-3499] Remove hardcoded slo-reporter timestamps (#2660)f7ce1b5
Remove reference to locked (#2656)Updates
github.com/cdevents/sdk-go
from 0.3.2 to 0.4.1Release notes
Sourced from github.com/cdevents/sdk-go's releases.
Commits
d5d4efc
Bump golangci/golangci-lint-action in the actions group (#94)d342ca1
Add support for schema_uri validation (#87)bcd874f
Bump github/codeql-action from 3.25.13 to 3.25.15 in the actions group (#90)1078d50
Bump github/codeql-action from 3.25.12 to 3.25.13 in the actions group (#89)5e81f23
Bump the actions group with 2 updates (#88)5792dda
test with go 1.21 and 1.22 (#86)080d904
Update ci jobs and dependabot config (#84)935f556
Add support for custom events (#85)9ac1c56
Import spec v0.4 and add support for v0.4 Context (#83)f8b8b91
Add specification packages (#78)Updates
github.com/getsentry/sentry-go
from 0.28.1 to 0.29.0Release notes
Sourced from github.com/getsentry/sentry-go's releases.
Changelog
Sourced from github.com/getsentry/sentry-go's changelog.
Commits
1c2b1d2
release: 0.29.017096d2
Prepare 0.29.0 (#883)61d84f8
Revert "Add ability to skip frames (#852)" (#882)871a366
Move ResponseWriter wrapper to internal (#880)24ffea5
Tracing without performance improvements (#862)7085a1d
fix(http): use route name from 'r.Pattern' instead (#875)e5d46d5
Implement hijacker interface for Negroni integration (#871)bff876d
Function grouping prefix fix (#877)72f3bff
ci: add go1.23 (#872)11d3c79
build(deps): bump golangci/golangci-lint-action from 6.0.1 to 6.1.0 (#867)Updates
github.com/slok/go-http-metrics
from 0.12.0 to 0.13.0Release notes
Sourced from github.com/slok/go-http-metrics's releases.
Changelog
Sourced from github.com/slok/go-http-metrics's changelog.
Commits
dab00f5
Bump v0.13.0b266f85
Merge pull request #229 from slok/update-deps-2024090585d2360
Update depsd7e6c4e
Merge pull request #228 from slok/slok/improve-ux-ignore-paths5cb9780
Improve UX of ignore paths8005104
Merge pull request #111 from angristan/skip-paths764140e
Use map instead of list, and add testUpdates
github.com/xanzy/go-gitlab
from 0.107.0 to 0.109.0Release notes
Sourced from github.com/xanzy/go-gitlab's releases.
... (truncated)
Commits
afb6163
Merge pull request #2005 from mXtone/main21134f2
Fix typos for list methods - groups service accounts291685b
Add support for groups service accounts658c4fd
Merge pull request #2004 from RicePatrick/fix-default-branch-typof1d37ee
Fix an issue with omitempty on default_branch_protection_defaults6b15a3b
Merge pull request #2003 from habnux/maina43dcb2
Switch to listfa3f0b2
Merge pull request #2001 from mdevilliers/add_missing_rule_typese9e9ee8
chore: add RuleType to ProjectApprovalRule315e1c6
Merge pull request #1999 from deepflame/feature/update-jira-integrationUpdates
google.golang.org/api
from 0.192.0 to 0.196.0Release notes
Sourced from google.golang.org/api's releases.
Changelog
Sourced from google.golang.org/api's changelog.
Commits
6273efe
chore(main): release 0.196.0 (#2761)7714cd9
chore: bump some deps to latest (#2769)2856eee
chore(all): update all (#2766)00da46b
feat(all): auto-regenerate discovery clients (#2768)6e81c8f
feat(all): auto-regenerate discovery clients (#2765)d9ef5ce
feat(all): auto-regenerate discovery clients (#2764)293fdcd
feat(all): auto-regenerate discovery clients (#2763)21f10ed
feat(all): auto-regenerate discovery clients (#2760)f9bde01
chore(main): release 0.195.0 (#2751)04cbad8
feat(all): auto-regenerate discovery clients (#2759)Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebase
will rebase this PR@dependabot recreate
will recreate this PR, overwriting any edits that have been made to it@dependabot merge
will merge this PR after your CI passes on it@dependabot squash and merge
will squash and merge this PR after your CI passes on it@dependabot cancel merge
will cancel a previously requested merge and block automerging@dependabot reopen
will reopen this PR if it is closed@dependabot close
will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually@dependabot show <dependency name> ignore conditions
will show all of the ignore conditions of the specified dependency@dependabot ignore <dependency name> major version
will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)@dependabot ignore <dependency name> minor version
will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)@dependabot ignore <dependency name>
will close this group update PR and stop Dependabot creating any more for the specific de...Description has been truncated