Skip to content

Commit caaa1fe

Browse files
mgencurhoushengbo
andauthored
Updated the dependencies and fixed the eventing upgrade tests (#1885)
* Updated the dependencies and fixed the eventing upgrade tests * Initialize global var * Vendor eventshub and update dependencies * Vendor eventing/cmd/heartbeats --------- Co-authored-by: Vincent Hou <[email protected]>
1 parent 0b8450e commit caaa1fe

File tree

486 files changed

+48618
-18990
lines changed

Some content is hidden

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

486 files changed

+48618
-18990
lines changed

go.mod

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ require (
2020
k8s.io/apimachinery v0.30.3
2121
k8s.io/client-go v0.30.3
2222
k8s.io/code-generator v0.30.3
23-
knative.dev/caching v0.0.0-20240815051508-3a2a1b64338c
24-
knative.dev/eventing v0.42.1-0.20240906121836-8c22bf55ee0a
25-
knative.dev/hack v0.0.0-20240904112633-9724320e463f
26-
knative.dev/pkg v0.0.0-20240905103434-a1469cf54480
27-
knative.dev/serving v0.42.1-0.20240906121735-b50a09e08cd2
23+
knative.dev/caching v0.0.0-20240909014459-1bbe214d75e7
24+
knative.dev/eventing v0.42.1-0.20240911141024-c91a9d8a471d
25+
knative.dev/hack v0.0.0-20240909014011-fc6a8452af6d
26+
knative.dev/pkg v0.0.0-20240912132815-3002873b449c
27+
knative.dev/reconciler-test v0.0.0-20240910170818-bb4bca018fb3
28+
knative.dev/serving v0.42.1-0.20240912104927-74ea38ab1b9c
2829
sigs.k8s.io/yaml v1.4.0
2930
)
3031

@@ -53,13 +54,17 @@ require (
5354
github.com/blendle/zapdriver v1.3.1 // indirect
5455
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
5556
github.com/cespare/xxhash/v2 v2.3.0 // indirect
57+
github.com/cloudevents/conformance v0.2.0 // indirect
58+
github.com/cloudevents/sdk-go/observability/opencensus/v2 v2.15.2 // indirect
5659
github.com/cloudevents/sdk-go/sql/v2 v2.15.2 // indirect
5760
github.com/cloudevents/sdk-go/v2 v2.15.2 // indirect
61+
github.com/coreos/go-oidc/v3 v3.9.0 // indirect
5862
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5963
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
6064
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
6165
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
6266
github.com/felixge/httpsnoop v1.0.4 // indirect
67+
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
6368
github.com/go-kit/log v0.2.1 // indirect
6469
github.com/go-logfmt/logfmt v0.5.1 // indirect
6570
github.com/go-logr/logr v1.4.2 // indirect
@@ -82,6 +87,8 @@ require (
8287
github.com/googleapis/gax-go/v2 v2.12.4 // indirect
8388
github.com/gorilla/websocket v1.5.1 // indirect
8489
github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 // indirect
90+
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
91+
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
8592
github.com/imdario/mergo v0.3.16 // indirect
8693
github.com/influxdata/tdigest v0.0.1 // indirect
8794
github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect
@@ -111,6 +118,7 @@ require (
111118
github.com/spf13/pflag v1.0.5 // indirect
112119
github.com/stretchr/testify v1.9.0 // indirect
113120
github.com/tsenart/vegeta/v12 v12.12.0 // indirect
121+
github.com/valyala/bytebufferpool v1.0.0 // indirect
114122
github.com/wavesoftware/go-ensure v1.0.0 // indirect
115123
go.opencensus.io v0.24.0 // indirect
116124
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
@@ -121,20 +129,20 @@ require (
121129
go.uber.org/atomic v1.10.0 // indirect
122130
go.uber.org/automaxprocs v1.5.3 // indirect
123131
go.uber.org/multierr v1.11.0 // indirect
124-
golang.org/x/crypto v0.26.0 // indirect
125-
golang.org/x/net v0.28.0 // indirect
132+
golang.org/x/crypto v0.27.0 // indirect
133+
golang.org/x/net v0.29.0 // indirect
126134
golang.org/x/sync v0.8.0 // indirect
127-
golang.org/x/sys v0.24.0 // indirect
128-
golang.org/x/term v0.23.0 // indirect
129-
golang.org/x/text v0.17.0 // indirect
135+
golang.org/x/sys v0.25.0 // indirect
136+
golang.org/x/term v0.24.0 // indirect
137+
golang.org/x/text v0.18.0 // indirect
130138
golang.org/x/time v0.6.0 // indirect
131139
golang.org/x/tools v0.24.0 // indirect
132140
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
133141
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
134142
google.golang.org/genproto v0.0.0-20240528184218-531527333157 // indirect
135143
google.golang.org/genproto/googleapis/api v0.0.0-20240808171019-573a1156607a // indirect
136144
google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a // indirect
137-
google.golang.org/grpc v1.65.0 // indirect
145+
google.golang.org/grpc v1.66.0 // indirect
138146
google.golang.org/protobuf v1.34.2 // indirect
139147
gopkg.in/inf.v0 v0.9.1 // indirect
140148
gopkg.in/yaml.v2 v2.4.0 // indirect
@@ -146,7 +154,7 @@ require (
146154
k8s.io/klog/v2 v2.130.1 // indirect
147155
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect
148156
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
149-
knative.dev/networking v0.0.0-20240815142417-37fdbdd0854b // indirect
157+
knative.dev/networking v0.0.0-20240909015032-433920a35ef4 // indirect
150158
sigs.k8s.io/controller-runtime v0.7.2 // indirect
151159
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
152160
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect

go.sum

Lines changed: 61 additions & 26 deletions
Large diffs are not rendered by default.

hack/tools.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ package tools
1919
// This package imports things required by this repository, to force `go mod` to see them as dependencies
2020
import (
2121
_ "k8s.io/code-generator"
22+
_ "knative.dev/eventing/cmd/heartbeats"
2223
_ "knative.dev/hack"
2324
_ "knative.dev/pkg/apiextensions/storageversion/cmd/migrate"
2425
_ "knative.dev/pkg/hack"
26+
_ "knative.dev/reconciler-test/cmd/eventshub"
2527
)

test/upgrade/upgradeeventing_test.go

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,66 @@ limitations under the License.
2020
package upgrade
2121

2222
import (
23+
"log"
24+
"slices"
2325
"testing"
2426

2527
eventingupgrade "knative.dev/eventing/test/upgrade"
2628
"knative.dev/operator/test/upgrade/installation"
29+
pkgtest "knative.dev/pkg/test"
2730
pkgupgrade "knative.dev/pkg/test/upgrade"
31+
"knative.dev/reconciler-test/pkg/environment"
2832
)
2933

34+
var global environment.GlobalEnvironment
35+
3036
func TestEventingUpgrades(t *testing.T) {
37+
restConfig, err := pkgtest.Flags.ClientConfig.GetRESTConfig()
38+
if err != nil {
39+
log.Fatal("Error building client config: ", err)
40+
}
41+
42+
// Getting the rest config explicitly and passing it further will prevent re-initializing the flagset
43+
// in NewStandardGlobalEnvironment(). The upgrade tests use knative.dev/pkg/test which initializes the
44+
// flagset as well.
45+
global = environment.NewStandardGlobalEnvironment(func(cfg environment.Configuration) environment.Configuration {
46+
cfg.Config = restConfig
47+
return cfg
48+
})
49+
50+
g := eventingupgrade.FeatureGroupWithUpgradeTests{
51+
// A feature that will run the same test post-upgrade and post-downgrade.
52+
eventingupgrade.NewFeatureSmoke(eventingupgrade.InMemoryChannelFeature(global)),
53+
// A feature that will be created pre-upgrade and verified/removed post-upgrade.
54+
eventingupgrade.NewFeatureOnlyUpgrade(eventingupgrade.InMemoryChannelFeature(global)),
55+
// A feature that will be created pre-upgrade, verified post-upgrade, verified and removed post-downgrade.
56+
eventingupgrade.NewFeatureUpgradeDowngrade(eventingupgrade.InMemoryChannelFeature(global)),
57+
// A feature that will be created post-upgrade, verified and removed post-downgrade.
58+
eventingupgrade.NewFeatureOnlyDowngrade(eventingupgrade.InMemoryChannelFeature(global)),
59+
}
60+
3161
suite := pkgupgrade.Suite{
3262
Tests: pkgupgrade.Tests{
33-
PreUpgrade: []pkgupgrade.Operation{
34-
EventingCRPreUpgradeTests(),
35-
eventingupgrade.PreUpgradeTest(),
36-
},
37-
PostUpgrade: append([]pkgupgrade.Operation{
38-
EventingTimeoutForUpgrade(),
39-
EventingCRPostUpgradeTests(),
40-
}, eventingupgrade.PostUpgradeTests()...),
41-
PostDowngrade: []pkgupgrade.Operation{
42-
EventingCRPostDowngradeTests(),
43-
eventingupgrade.PostDowngradeTest(),
44-
},
63+
PreUpgrade: slices.Concat(
64+
[]pkgupgrade.Operation{
65+
EventingCRPreUpgradeTests(),
66+
},
67+
g.PreUpgradeTests(),
68+
),
69+
PostUpgrade: slices.Concat(
70+
[]pkgupgrade.Operation{
71+
EventingTimeoutForUpgrade(),
72+
EventingCRPostUpgradeTests(),
73+
eventingupgrade.CRDPostUpgradeTest(),
74+
},
75+
g.PostUpgradeTests(),
76+
),
77+
PostDowngrade: slices.Concat(
78+
[]pkgupgrade.Operation{
79+
EventingCRPostDowngradeTests(),
80+
},
81+
g.PostDowngradeTests(),
82+
),
4583
Continual: []pkgupgrade.BackgroundOperation{
4684
eventingupgrade.ContinualTest(),
4785
},

vendor/github.com/cloudevents/conformance/LICENSE

Lines changed: 201 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)