From 6690a20e8f566283c68e09fc2b4f8c19135cda0c Mon Sep 17 00:00:00 2001 From: knative-automation Date: Fri, 4 Feb 2022 09:15:21 -0800 Subject: [PATCH] upgrade to latest dependencies (#1600) bumping knative.dev/eventing 25bf6fe...fb09241: > fb09241 tame a bit the duck (# 6130) > 7df34f8 Update community files (# 6132) > 62b25af :lipstick: fixing the golang path for the migrator to point to actual pkg (# 6133) > 1748795 Remove deprecated and unmaintained repos from downstream action (# 6131) > cf675de Update community files (# 6115) > c959bfb :lipstick: updating to newer versions of k8s for GH Actions :dizzy: (# 6122) bumping knative.dev/serving 770b911...fe023e3: > fe023e3 Update net-istio nightly (# 12591) > d454d67 Update net-contour nightly (# 12584) > fc43e7c add script to run performance tests using kperf (# 12549) > 62d5aa3 Updates selector labels to `app.kubernetes.io` (# 12587) > 997dea3 Update net-kourier nightly (# 12592) > 82ad2cd Update net-certmanager nightly (# 12590) > 1d95294 Adds a flag to allow customized request headers in conformance tests (# 12540) > 792260d upgrade to latest dependencies (# 12583) > 0e6c2d8 Update community files (# 12589) > 26a2553 Update actions (# 12582) > 2d23214 Move maxDurationSeconds tests from conformance tests to e2e tests (# 12526) > 4e17128 Add flag disable-test-cleanup (# 10001) (# 12482) > 721c2bb upgrade to latest dependencies (# 12575) > 5ce87a4 Update net-certmanager nightly (# 12577) > 923b4fa Update actions (# 12574) > 72ae543 Update community files (# 12573) > fb1b4c1 Update net-istio nightly (# 12576) bumping knative.dev/hack 82bfca1...9b303d6: > 9b303d6 Update community files (# 148) bumping knative.dev/networking d23a068...9ce389c: > 9ce389c Update community files (# 614) > 8ea3045 Update actions (# 613) > e266de2 Update actions (# 612) > 7002b9a Update community files (# 610) bumping knative.dev/pkg f4b57ae...51be315: > 51be315 Update community files (# 2419) > b619c92 Update actions (# 2417) > bab3d0d Update actions (# 2413) > 671e46d :dizzy: we must use `flags` instead of `pflags`, since this is not working. It seems like pflag.* adds the var to its own flag set, not the one package flag uses, and it doesn't expose the internal flag.Var externally - hence this fix. (# 2414) > 7880fb4 Update community files (# 2412) > 8681fe2 Continual tests logging within test scope (# 2293) Signed-off-by: Knative Automation --- go.mod | 10 +++---- go.sum | 24 ++++++++-------- vendor/knative.dev/serving/test/cleanup.go | 8 +++++- .../serving/test/e2e-auto-tls-tests.sh | 3 +- vendor/knative.dev/serving/test/e2e-common.sh | 9 ++++++ vendor/knative.dev/serving/test/e2e_flags.go | 28 +++++++++++++++++++ vendor/knative.dev/serving/test/prober.go | 22 ++++++++++++--- vendor/modules.txt | 10 +++---- 8 files changed, 87 insertions(+), 27 deletions(-) diff --git a/go.mod b/go.mod index 44db43b71d..0160726f78 100644 --- a/go.mod +++ b/go.mod @@ -18,10 +18,10 @@ require ( k8s.io/cli-runtime v0.22.5 k8s.io/client-go v0.22.5 k8s.io/code-generator v0.22.5 - knative.dev/eventing v0.29.1-0.20220201083031-25bf6fe36dfe - knative.dev/hack v0.0.0-20220201013531-82bfca153560 - knative.dev/networking v0.0.0-20220131174231-d23a06807e6c - knative.dev/pkg v0.0.0-20220131144930-f4b57aef0006 - knative.dev/serving v0.29.1-0.20220131194631-770b91180d43 + knative.dev/eventing v0.29.1-0.20220203222422-fb092415eb36 + knative.dev/hack v0.0.0-20220203160821-9b303d690fc9 + knative.dev/networking v0.0.0-20220203170321-9ce389cb574b + knative.dev/pkg v0.0.0-20220203020920-51be315ed160 + knative.dev/serving v0.29.1-0.20220204002619-fe023e3ac57d sigs.k8s.io/yaml v1.3.0 ) diff --git a/go.sum b/go.sum index c05fe5fb40..f572c640c5 100644 --- a/go.sum +++ b/go.sum @@ -1810,25 +1810,27 @@ k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/ k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20211208161948-7d6a63dca704 h1:ZKMMxTvduyf5WUtREOqg5LiXaN1KO/+0oOQPRFrClpo= k8s.io/utils v0.0.0-20211208161948-7d6a63dca704/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -knative.dev/caching v0.0.0-20220118175933-0c1cc094a7f4/go.mod h1:OHsK3XaWmdi2/mPaNBiX8LbefbtM6TptnT90eVbYGSA= -knative.dev/eventing v0.29.1-0.20220201083031-25bf6fe36dfe h1:VLVkZaToXNixhY//FZfAr9fAF7jQQVGo64qT/3pJpfk= -knative.dev/eventing v0.29.1-0.20220201083031-25bf6fe36dfe/go.mod h1:jsc5u3aC+BYmfUR2cRz9jb77krfULStxXkR1EgMUWp0= +knative.dev/caching v0.0.0-20220202132833-33800d337f17/go.mod h1:kWv5fckKHd9e/OSe6tUHKjUtJryWjytea9mnZxJoPLA= +knative.dev/eventing v0.29.1-0.20220203222422-fb092415eb36 h1:x5ScuH42jlrfFrHta2kinhOeWKo8EjCAuT6QACFH/WU= +knative.dev/eventing v0.29.1-0.20220203222422-fb092415eb36/go.mod h1:jsc5u3aC+BYmfUR2cRz9jb77krfULStxXkR1EgMUWp0= knative.dev/hack v0.0.0-20220118141833-9b2ed8471e30/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/hack v0.0.0-20220128200847-51a42b2eb63e/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/hack v0.0.0-20220201013531-82bfca153560 h1:JTQwe928hZokY181gjYKeVdxr+s3v95LDkMs7R0fxfE= knative.dev/hack v0.0.0-20220201013531-82bfca153560/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= +knative.dev/hack v0.0.0-20220203160821-9b303d690fc9 h1:5BoabmjdxeFOICdkJyMn1n8/ny3kNkVMH/2Iel7/mmI= +knative.dev/hack v0.0.0-20220203160821-9b303d690fc9/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/hack/schema v0.0.0-20220128200847-51a42b2eb63e/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0= -knative.dev/networking v0.0.0-20220120043934-ec785540a732/go.mod h1:6cKBV/h/vIQWCPOkds/RvzUmMR8Vz6Dks2NWb0+3xks= -knative.dev/networking v0.0.0-20220131174231-d23a06807e6c h1:0mPVfMikv8wz37qEMSUVXAqoDOn3qRPRSQuxx91nACs= -knative.dev/networking v0.0.0-20220131174231-d23a06807e6c/go.mod h1:RzkiJ/LyijMaMUa6tOerhI9lGvQYpfDY0VttqQIX0yk= +knative.dev/networking v0.0.0-20220202023132-8ea30455281d/go.mod h1:RzkiJ/LyijMaMUa6tOerhI9lGvQYpfDY0VttqQIX0yk= +knative.dev/networking v0.0.0-20220203170321-9ce389cb574b h1:z4MMkQxwftOmkItUzKCkg8XhF45oDys08VE08M8nVtM= +knative.dev/networking v0.0.0-20220203170321-9ce389cb574b/go.mod h1:RzkiJ/LyijMaMUa6tOerhI9lGvQYpfDY0VttqQIX0yk= knative.dev/pkg v0.0.0-20220118160532-77555ea48cd4/go.mod h1:etVT7Tm8pSDf4RKhGk4r7j/hj3dNBpvT7bO6a6wpahs= -knative.dev/pkg v0.0.0-20220121092305-3ba5d72e310a/go.mod h1:etVT7Tm8pSDf4RKhGk4r7j/hj3dNBpvT7bO6a6wpahs= knative.dev/pkg v0.0.0-20220129160148-ca64d3b3ea8c/go.mod h1:BML2uvSEBhY/cpEsAyWv1+vLy2fxNk8VDJ9fT+D0tj4= -knative.dev/pkg v0.0.0-20220131144930-f4b57aef0006 h1:0Kv7dIOimyHno/7jbQ6LCi15ME+e/b5tY0pwi99kanQ= knative.dev/pkg v0.0.0-20220131144930-f4b57aef0006/go.mod h1:bZMFTPDPHV3wXuiQ09UJuEGYYQnfpe81MCxNvsMAiJk= +knative.dev/pkg v0.0.0-20220202132633-b619c92456b9/go.mod h1:bZMFTPDPHV3wXuiQ09UJuEGYYQnfpe81MCxNvsMAiJk= +knative.dev/pkg v0.0.0-20220203020920-51be315ed160 h1:usHculW2JbADkFNQS8LN3e+sQo2xdJfBaP6/XSvHxQ4= +knative.dev/pkg v0.0.0-20220203020920-51be315ed160/go.mod h1:bZMFTPDPHV3wXuiQ09UJuEGYYQnfpe81MCxNvsMAiJk= knative.dev/reconciler-test v0.0.0-20220126171745-740e77ebaace/go.mod h1:XV4cghzCtdASkfUsfMYSnGfGRyd/naDjy9h7Tnae22g= -knative.dev/serving v0.29.1-0.20220131194631-770b91180d43 h1:5mTE+g5pjTFtL+jnLL7y43a+zca/kPNpb2HvD9F3DoA= -knative.dev/serving v0.29.1-0.20220131194631-770b91180d43/go.mod h1:vjtRBoMxJZjrY5OILrkxvq2KhZs7rjpMhSH9IuvObkY= +knative.dev/serving v0.29.1-0.20220204002619-fe023e3ac57d h1:3jOex6SPy9x9LCLabo20CGi3wSiKrKpFtux3un7iBb8= +knative.dev/serving v0.29.1-0.20220204002619-fe023e3ac57d/go.mod h1:Ghcve0KJr4vo+9GkZQaWy2BjhVs4qmwxZW81UxgYaWM= pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= diff --git a/vendor/knative.dev/serving/test/cleanup.go b/vendor/knative.dev/serving/test/cleanup.go index 336f782562..b24a183226 100644 --- a/vendor/knative.dev/serving/test/cleanup.go +++ b/vendor/knative.dev/serving/test/cleanup.go @@ -80,5 +80,11 @@ func EnsureCleanup(t *testing.T, cleanup func()) { // EnsureTearDown will delete created names when the test ends, either via // t.Cleanup, or on interrupt via CleanupOnInterrupt. func EnsureTearDown(t *testing.T, clients *Clients, names *ResourceNames) { - EnsureCleanup(t, func() { TearDown(clients, names) }) + EnsureCleanup(t, func() { + if ServingFlags.SkipCleanupOnFail { + t.Log("skipping cleanup") + return + } + TearDown(clients, names) + }) } diff --git a/vendor/knative.dev/serving/test/e2e-auto-tls-tests.sh b/vendor/knative.dev/serving/test/e2e-auto-tls-tests.sh index d893e0d4c5..4eda7f30bb 100644 --- a/vendor/knative.dev/serving/test/e2e-auto-tls-tests.sh +++ b/vendor/knative.dev/serving/test/e2e-auto-tls-tests.sh @@ -51,7 +51,8 @@ metadata: name: config-domain namespace: ${SYSTEM_NAMESPACE} labels: - serving.knative.dev/release: devel + app.kubernetes.io/name: knative-serving + app.kubernetes.io/version: devel data: ${CUSTOM_DOMAIN_SUFFIX}: "" EOF diff --git a/vendor/knative.dev/serving/test/e2e-common.sh b/vendor/knative.dev/serving/test/e2e-common.sh index 514814fb54..5648fe560f 100644 --- a/vendor/knative.dev/serving/test/e2e-common.sh +++ b/vendor/knative.dev/serving/test/e2e-common.sh @@ -35,6 +35,7 @@ export HTTPS=0 export SHORT=0 export ENABLE_HA=0 export MESH=0 +export PERF=0 export KIND=0 export CLUSTER_DOMAIN=cluster.local @@ -109,6 +110,10 @@ function parse_flags() { readonly MESH=0 return 1 ;; + --perf) + readonly PERF=1 + return 1 + ;; --enable-ha) readonly ENABLE_HA=1 return 1 @@ -281,6 +286,10 @@ function install() { YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/ha") fi + if (( PERF )); then + YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/performance") + fi + if (( KIND )); then YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/kind/core") YTT_FILES+=("${REPO_ROOT_DIR}/test/config/ytt/kind/ingress/${ingress}-kind.yaml") diff --git a/vendor/knative.dev/serving/test/e2e_flags.go b/vendor/knative.dev/serving/test/e2e_flags.go index 73214d7d82..a0cc8e6eb2 100644 --- a/vendor/knative.dev/serving/test/e2e_flags.go +++ b/vendor/knative.dev/serving/test/e2e_flags.go @@ -21,6 +21,8 @@ package test import ( "flag" + "net/http" + "strings" // Load the generic flags of knative.dev/pkg too. _ "knative.dev/pkg/test" @@ -40,10 +42,12 @@ type ServingEnvironmentFlags struct { EnableBetaFeatures bool // Indicates whether we run tests for beta features DisableLogStream bool // Indicates whether log streaming is disabled DisableOptionalAPI bool // Indicates whether to skip conformance tests against optional API + SkipCleanupOnFail bool // Indicates whether to skip cleanup if test fails TestNamespace string // Default namespace for Serving E2E/Conformance tests AltTestNamespace string // Alternative namespace for running cross-namespace tests in TLSTestNamespace string // Namespace for Serving TLS tests ExceedingMemoryLimitSize int // Memory size used to trigger a non-200 response when the service is set with 300MB memory limit. + RequestHeaders string // Extra HTTP request headers sent to the testing deployed KServices. } func initializeServingFlags() *ServingEnvironmentFlags { @@ -76,6 +80,8 @@ func initializeServingFlags() *ServingEnvironmentFlags { flag.BoolVar(&f.DisableOptionalAPI, "disable-optional-api", false, "Set this flag to skip conformance tests against optional API.") + flag.BoolVar(&f.SkipCleanupOnFail, "skip-cleanup-on-fail", false, "Set this flag to skip cleanup if test fails.") + flag.StringVar(&f.TestNamespace, "test-namespace", "serving-tests", "Set this flag to change the default namespace for running tests.") @@ -89,5 +95,27 @@ func initializeServingFlags() *ServingEnvironmentFlags { "Set this flag to the MB of memory consumed by your service in resource limit tests. "+ "You service is set with 300 MB memory limit and shoud return a non-200 response when consuming such amount of memory.") + flag.StringVar(&f.RequestHeaders, "request-headers", "", + "Set this flag to add extra HTTP request headers sent to the testing deployed KServices. "+ + "Format: -request-headers=key1,value1,key2,value2") + return &f } + +// RequestHeader returns a http.Header object including key-value header pairs passed via testing flag. +func (f *ServingEnvironmentFlags) RequestHeader() http.Header { + header := make(http.Header) + + if f.RequestHeaders != "" { + headers := strings.Split(f.RequestHeaders, ",") + if len(headers)%2 != 0 { + panic("incorrect input of request headers: " + f.RequestHeaders) + } + + for i := 0; i < len(headers); i += 2 { + header.Add(headers[i], headers[i+1]) + } + } + + return header +} diff --git a/vendor/knative.dev/serving/test/prober.go b/vendor/knative.dev/serving/test/prober.go index 226c5a59b3..b70e77ce2b 100644 --- a/vendor/knative.dev/serving/test/prober.go +++ b/vendor/knative.dev/serving/test/prober.go @@ -108,6 +108,7 @@ type manager struct { m sync.RWMutex probes map[*url.URL]Prober transportOptions []spoof.TransportOption + requestOptions []spoof.RequestOption } var _ ProberManager = (*manager)(nil) @@ -149,6 +150,9 @@ func (m *manager) Spawn(url *url.URL) Prober { if err != nil { return fmt.Errorf("failed to generate request: %w", err) } + for _, o := range m.requestOptions { + o(req) + } // We keep polling the domain and accumulate success rates // to ultimately establish the SLI and compare to the SLO. @@ -212,18 +216,28 @@ func (m *manager) Foreach(f func(url *url.URL, p Prober)) { } // NewProberManager creates a new manager for probes. -func NewProberManager(logf logging.FormatLogger, clients *Clients, minProbes int64, opts ...spoof.TransportOption) ProberManager { - return &manager{ +func NewProberManager(logf logging.FormatLogger, clients *Clients, minProbes int64, opts ...interface{}) ProberManager { + m := manager{ logf: logf, clients: clients, minProbes: minProbes, probes: make(map[*url.URL]Prober), - transportOptions: opts, + transportOptions: []spoof.TransportOption{}, + requestOptions: []spoof.RequestOption{}, + } + for _, opt := range opts { + switch o := opt.(type) { + case spoof.RequestOption: + m.requestOptions = append(m.requestOptions, o) + case spoof.TransportOption: + m.transportOptions = append(m.transportOptions, o) + } } + return &m } // RunRouteProber starts a single Prober of the given domain. -func RunRouteProber(logf logging.FormatLogger, clients *Clients, url *url.URL, opts ...spoof.TransportOption) Prober { +func RunRouteProber(logf logging.FormatLogger, clients *Clients, url *url.URL, opts ...interface{}) Prober { // Default to 10 probes pm := NewProberManager(logf, clients, 10, opts...) pm.Spawn(url) diff --git a/vendor/modules.txt b/vendor/modules.txt index afe9bbd54c..66f50067f5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -745,7 +745,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# knative.dev/eventing v0.29.1-0.20220201083031-25bf6fe36dfe +# knative.dev/eventing v0.29.1-0.20220203222422-fb092415eb36 ## explicit knative.dev/eventing/pkg/apis/config knative.dev/eventing/pkg/apis/duck @@ -771,10 +771,10 @@ knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1/fake knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake -# knative.dev/hack v0.0.0-20220201013531-82bfca153560 +# knative.dev/hack v0.0.0-20220203160821-9b303d690fc9 ## explicit knative.dev/hack -# knative.dev/networking v0.0.0-20220131174231-d23a06807e6c +# knative.dev/networking v0.0.0-20220203170321-9ce389cb574b ## explicit knative.dev/networking/pkg knative.dev/networking/pkg/apis/networking @@ -782,7 +782,7 @@ knative.dev/networking/pkg/apis/networking/v1alpha1 knative.dev/networking/pkg/client/clientset/versioned knative.dev/networking/pkg/client/clientset/versioned/scheme knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1 -# knative.dev/pkg v0.0.0-20220131144930-f4b57aef0006 +# knative.dev/pkg v0.0.0-20220203020920-51be315ed160 ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck @@ -832,7 +832,7 @@ knative.dev/pkg/tracing/config knative.dev/pkg/tracing/propagation knative.dev/pkg/tracing/propagation/tracecontextb3 knative.dev/pkg/tracker -# knative.dev/serving v0.29.1-0.20220131194631-770b91180d43 +# knative.dev/serving v0.29.1-0.20220204002619-fe023e3ac57d ## explicit knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1