Skip to content

Commit

Permalink
Updated the dependencies and fixed the eventing upgrade tests (#1885)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
mgencur and houshengbo committed Sep 13, 2024
1 parent 0b8450e commit caaa1fe
Show file tree
Hide file tree
Showing 486 changed files with 48,618 additions and 18,990 deletions.
32 changes: 20 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ require (
k8s.io/apimachinery v0.30.3
k8s.io/client-go v0.30.3
k8s.io/code-generator v0.30.3
knative.dev/caching v0.0.0-20240815051508-3a2a1b64338c
knative.dev/eventing v0.42.1-0.20240906121836-8c22bf55ee0a
knative.dev/hack v0.0.0-20240904112633-9724320e463f
knative.dev/pkg v0.0.0-20240905103434-a1469cf54480
knative.dev/serving v0.42.1-0.20240906121735-b50a09e08cd2
knative.dev/caching v0.0.0-20240909014459-1bbe214d75e7
knative.dev/eventing v0.42.1-0.20240911141024-c91a9d8a471d
knative.dev/hack v0.0.0-20240909014011-fc6a8452af6d
knative.dev/pkg v0.0.0-20240912132815-3002873b449c
knative.dev/reconciler-test v0.0.0-20240910170818-bb4bca018fb3
knative.dev/serving v0.42.1-0.20240912104927-74ea38ab1b9c
sigs.k8s.io/yaml v1.4.0
)

Expand Down Expand Up @@ -53,13 +54,17 @@ require (
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cloudevents/conformance v0.2.0 // indirect
github.com/cloudevents/sdk-go/observability/opencensus/v2 v2.15.2 // indirect
github.com/cloudevents/sdk-go/sql/v2 v2.15.2 // indirect
github.com/cloudevents/sdk-go/v2 v2.15.2 // indirect
github.com/coreos/go-oidc/v3 v3.9.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-jose/go-jose/v3 v3.0.3 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-logr/logr v1.4.2 // indirect
Expand All @@ -82,6 +87,8 @@ require (
github.com/googleapis/gax-go/v2 v2.12.4 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/influxdata/tdigest v0.0.1 // indirect
github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect
Expand Down Expand Up @@ -111,6 +118,7 @@ require (
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/tsenart/vegeta/v12 v12.12.0 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
github.com/wavesoftware/go-ensure v1.0.0 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 // indirect
Expand All @@ -121,20 +129,20 @@ require (
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/automaxprocs v1.5.3 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
golang.org/x/time v0.6.0 // indirect
golang.org/x/tools v0.24.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/genproto v0.0.0-20240528184218-531527333157 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240808171019-573a1156607a // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240808171019-573a1156607a // indirect
google.golang.org/grpc v1.65.0 // indirect
google.golang.org/grpc v1.66.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand All @@ -146,7 +154,7 @@ require (
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
knative.dev/networking v0.0.0-20240815142417-37fdbdd0854b // indirect
knative.dev/networking v0.0.0-20240909015032-433920a35ef4 // indirect
sigs.k8s.io/controller-runtime v0.7.2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
Expand Down
87 changes: 61 additions & 26 deletions go.sum

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions hack/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ package tools
// This package imports things required by this repository, to force `go mod` to see them as dependencies
import (
_ "k8s.io/code-generator"
_ "knative.dev/eventing/cmd/heartbeats"
_ "knative.dev/hack"
_ "knative.dev/pkg/apiextensions/storageversion/cmd/migrate"
_ "knative.dev/pkg/hack"
_ "knative.dev/reconciler-test/cmd/eventshub"
)
62 changes: 50 additions & 12 deletions test/upgrade/upgradeeventing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,66 @@ limitations under the License.
package upgrade

import (
"log"
"slices"
"testing"

eventingupgrade "knative.dev/eventing/test/upgrade"
"knative.dev/operator/test/upgrade/installation"
pkgtest "knative.dev/pkg/test"
pkgupgrade "knative.dev/pkg/test/upgrade"
"knative.dev/reconciler-test/pkg/environment"
)

var global environment.GlobalEnvironment

func TestEventingUpgrades(t *testing.T) {
restConfig, err := pkgtest.Flags.ClientConfig.GetRESTConfig()
if err != nil {
log.Fatal("Error building client config: ", err)
}

// Getting the rest config explicitly and passing it further will prevent re-initializing the flagset
// in NewStandardGlobalEnvironment(). The upgrade tests use knative.dev/pkg/test which initializes the
// flagset as well.
global = environment.NewStandardGlobalEnvironment(func(cfg environment.Configuration) environment.Configuration {
cfg.Config = restConfig
return cfg
})

g := eventingupgrade.FeatureGroupWithUpgradeTests{
// A feature that will run the same test post-upgrade and post-downgrade.
eventingupgrade.NewFeatureSmoke(eventingupgrade.InMemoryChannelFeature(global)),
// A feature that will be created pre-upgrade and verified/removed post-upgrade.
eventingupgrade.NewFeatureOnlyUpgrade(eventingupgrade.InMemoryChannelFeature(global)),
// A feature that will be created pre-upgrade, verified post-upgrade, verified and removed post-downgrade.
eventingupgrade.NewFeatureUpgradeDowngrade(eventingupgrade.InMemoryChannelFeature(global)),
// A feature that will be created post-upgrade, verified and removed post-downgrade.
eventingupgrade.NewFeatureOnlyDowngrade(eventingupgrade.InMemoryChannelFeature(global)),
}

suite := pkgupgrade.Suite{
Tests: pkgupgrade.Tests{
PreUpgrade: []pkgupgrade.Operation{
EventingCRPreUpgradeTests(),
eventingupgrade.PreUpgradeTest(),
},
PostUpgrade: append([]pkgupgrade.Operation{
EventingTimeoutForUpgrade(),
EventingCRPostUpgradeTests(),
}, eventingupgrade.PostUpgradeTests()...),
PostDowngrade: []pkgupgrade.Operation{
EventingCRPostDowngradeTests(),
eventingupgrade.PostDowngradeTest(),
},
PreUpgrade: slices.Concat(
[]pkgupgrade.Operation{
EventingCRPreUpgradeTests(),
},
g.PreUpgradeTests(),
),
PostUpgrade: slices.Concat(
[]pkgupgrade.Operation{
EventingTimeoutForUpgrade(),
EventingCRPostUpgradeTests(),
eventingupgrade.CRDPostUpgradeTest(),
},
g.PostUpgradeTests(),
),
PostDowngrade: slices.Concat(
[]pkgupgrade.Operation{
EventingCRPostDowngradeTests(),
},
g.PostDowngradeTests(),
),
Continual: []pkgupgrade.BackgroundOperation{
eventingupgrade.ContinualTest(),
},
Expand Down
201 changes: 201 additions & 0 deletions vendor/github.com/cloudevents/conformance/LICENSE

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

Loading

0 comments on commit caaa1fe

Please sign in to comment.