From fc9d85ab2049d2918781bb7a466b45f0f6b38c27 Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Wed, 31 Mar 2021 07:57:09 +0000 Subject: [PATCH] upgrade to latest dependencies bumping knative.dev/hack 9b73a25...b6ab329: > b6ab329 Add a comment to explain why we have a long wait_until_pods_running function (# 60) > 58edbdc [schema cli] correct arrays (# 58) > 97362eb go test flag should go first (# 54) > 57abacd Don't redirect STDERR to /dev/null when querying pods (# 55) bumping knative.dev/eventing 248cd1b...dca8b0a: > dca8b0a 4962 test coverage kncloudevents (# 5171) > 18e33bf increase webhook timeout values to be larger than probe timeouts. (# 5175) > f526e3d adding channel subscription smoke tests (# 5177) > 6d403f8 fix lease not always being released (# 5162) > 9ababf2 update downstream test to also run on main branch PRs (# 5145) > 9362696 Channel Conformance tests for Spec and Status shapes. (# 5152) > 3ebce0d relax malformed ce response code to 4xx (# 5154) > 8ff609f add tests for various missing required fields (# 5144) > 979f99e Changing cluster role's name check to check only suffix for source spec conformance testing (# 5105) > 724f4ed adding role and role selector test for channels (# 5141) > 116a571 Fix comment on podspecable-binding clusterrole (# 5142) > c820f42 Channel Conformance Tests, CRD (# 5138) > d3e856a upgrade to latest dependencies (# 5140) > b5b547f adding todo stubs for channel conformance tests (# 5127) > 5947002 add test for rejecting malformed CE (# 5135) > f9de675 broker.status.address.url is not required (# 5134) > 04ab20f rename downstream-test-go to actions-downstream-test (# 5133) > 9e8f2df add conformance test for checking GET method gets rejected (# 5132) > 88b3c90 More unit tests for pingsource (# 5106) > c039526 Add create KinD cluster script (# 5126) > aecb58c Format markdown (# 5116) > 1ba9ebd add test for wrong version of CE (# 5124) > e2e9edf Use correlation between send / response events (# 5108) > 33cc21a Adjust resources.requests of eventing-webhook (# 5112) > 2dcdb47 Add Eventing 1.0 to the roadmap (# 5043) > 4e1a66b Update community support instructions with ux issue template info (# 5109) > c42772d KafkaChannel hack to upgrade (# 5085) > a95567e statuscode 200-299 (# 5102) > 85c4286 add data plane for ce versions (# 5101) > 025f1c1 Broker/Trigger Conformance Tests, invalid trigger.spec.filters (# 5089) > 266b743 use timing and common config from reconciler-test (# 5094) > c1124d5 Format markdown (# 5093) > de960c7 Update common github actions (# 5090) > 8983fc8 Change spec redirects to template used by docs (# 5092) > 48fb081 broker changes come from the env. (# 5088) > 23d1519 Format markdown (# 5083) > df48abb Schema tool for Eventing v1 (# 5087) > 3b812fc Switch slinkydeveloper and devguyio rotations (# 5084) > 07939c5 fix trigger conf tests (# 5082) > 646b9e2 add unit tests to reconciler/apiserversource (# 5067) > b09cc03 add ./ to file (# 5078) > ef536d4 Start adding spec based conformance tests for Broker/Trigger. (# 5072) > 60043be Add KO_FLAGS usage to chaosduck build (# 5075) > b2ea385 Add redirect link (# 5077) > c8b0b6b Remove specs for eventing and point to new location in specs repo (# 5057) > 1184217 Update support info with machine-readable rotation (# 5068) bumping knative.dev/serving 057c203...1fef748: > 1fef748 Add passthrough LB functionality to the stats scraper (# 11076) > c6ddb40 upgrade to latest dependencies (# 11081) > d6ea20a drop gloo from third party & e2e scripts (# 11080) > 5813b79 Drop misleading comment in autoscaler main (# 11073) > 0711285 upgrade to latest dependencies (# 11077) > 3190050 Update net-istio nightly (# 11072) > 350184b Drop explicit namespaces and system imports (# 11054) > 9f1b7eb Update net-istio nightly (# 11055) > c799d89 upgrade to latest dependencies (# 11067) > 7931069 Use kubectl replace instead of patch to restore config-gc (# 11062) > 2bbfc27 Thread network config into the autoscaler (# 11056) > 8ab7b39 Remove hardcoded config names throughout (# 11057) > 3244771 Drop tracing config testdata in activator (# 11053) > 69610eb upgrade to latest dependencies (# 11061) > 6126291 Update net-certmanager nightly (# 11029) > 25a49c8 Bump request timeout in TestProbeQueueNotReady to fix flake (# 11050) > 6a45e7d Update net-istio nightly (# 11030) > 9b024b4 Update net-contour nightly (# 11028) > a597700 Add a proxy-builder to make use of passthrough loadbalancing (# 11035) > 34d7b4b upgrade to latest dependencies (# 11040) > 5dbe774 upgrade to latest dependencies (# 11036) > 2081525 Fix HTTP2 feature-gate threading in queue-proxy (# 11022) > 2490284 use-new-helpts (# 11018) > d55482e Bypass tracing handler if tracing is disabled (# 11016) > 37dedfa Skip flaky HTTP2 probe test (# 11027) > d5d489c Reduce allocations to store config on context in Activator (# 11013) > 1a0d326 Prevent MaxScaleLimit being exceeded on update (# 11010) > 4682e3e Use service-host-name helper in Activator creation (# 11021) > fb5af24 upgrade to latest dependencies (# 11020) > c9296e1 Add HA test for DomainMapping controller (# 10816) > b5d1348 Add a benchmark for the entire handler chain of the activator (# 11014) > ccf35f1 Update net-istio nightly (# 11002) > 069c635 add to mon reviewers (# 10972) > 0e8410a Format markdown (# 11001) > 3e2b15e Collapse revision context into specialized context to avoid allocations (# 11009) > 4e5fde5 Only allocate named logger if necessary in activator (# 11008) > 9ee92b1 Default PeriodSeconds of the readiness probe to 1 if unset (# 10992) > 27757ec Fix concurrency reporter log to use the correct key (# 11007) > 60a7f99 Add lint for aliasing autoscaling import correctly (# 10885) > 05f16c6 Update net-kourier nightly (# 10989) > decdaf4 Update net-contour nightly (# 10988) > b7ef994 Add ux issue template to community contact instructions (# 10993) > 08e4e0e Update net-kourier nightly (# 10977) > 9cdf9b0 Update net-certmanager nightly (# 10976) > a78e43e Update net-istio nightly (# 10974) > aeae909 Update common github actions (# 10969) > 8179fc6 set httpoption in kingress spec from cm (# 10412) > 77383a4 upgrade to latest dependencies (# 10971) > df03bdb Format markdown (# 10970) > df6c235 Update support info with machine-readable rotation (# 10955) > 3a6856b Add triage instructions for support rotation (# 10965) > 5af85b7 Format markdown (# 10968) > 90de379 Point spec files and runtime contract file to the specs repo (# 10967) > e66e402 Update net-istio nightly (# 10964) > a10bc74 upgrade to latest dependencies (# 10956) bumping knative.dev/pkg 6a33a1a...952fdd9: > 952fdd9 Update common github actions (# 2077) > 6317ec6 Update DEVELOPMENT.md (# 2069) > a5005d3 Bump k8s min version to v1.18.0 (# 2076) > 808d622 Escape path before returning it in a response (# 2075) > 71e938e Fix int conversion in statefulset ordinals (# 2074) > 3b7934e Update webhook/README.md to reflect current packages (# 2062) > 9d92ea1 Update reconciler_controller.go (# 2066) > 78ca070 upgrade to latest dependencies (# 2070) > b558677 Use TB interface, rather than T pointer when doing test stuff (# 2064) > 9bf9eeb rename downstream-test-go to actions-downstream-test (# 2065) > dfeeb18 Update common github actions (# 2059) > de0a8c9 upgrade to latest dependencies (# 2060) Signed-off-by: Knative Automation --- go.mod | 8 ++-- go.sum | 47 +++++++++++-------- .../v1alpha1/githubsource/controller.go | 2 +- .../eventing/pkg/adapter/v2/main.go | 11 ++++- .../pkg/apis/eventing/v1/trigger_types.go | 1 + .../apis/eventing/v1beta1/trigger_types.go | 1 + .../messaging/v1/subscription_defaults.go | 6 ++- .../messaging/v1/subscription_validation.go | 10 +++- .../v1beta1/subscription_defaults.go | 6 ++- .../v1beta1/subscription_validation.go | 10 +++- .../pkg/kncloudevents/message_receiver.go | 18 ++++++- vendor/knative.dev/hack/e2e-tests.sh | 11 +++-- vendor/knative.dev/hack/library.sh | 5 +- vendor/knative.dev/hack/presubmit-tests.sh | 2 +- vendor/knative.dev/networking/pkg/network.go | 12 +++++ .../generators/reconciler_controller.go | 2 +- .../knative.dev/pkg/leaderelection/config.go | 4 +- .../pkg/reconciler/testing/context.go | 6 +-- vendor/knative.dev/pkg/tracing/zipkin.go | 1 - vendor/knative.dev/pkg/version/version.go | 3 +- vendor/knative.dev/pkg/webhook/README.md | 2 +- vendor/knative.dev/pkg/webhook/webhook.go | 3 +- .../apis/autoscaling/annotation_validation.go | 31 +++++++----- .../pkg/apis/serving/v1/revision_lifecycle.go | 6 +-- vendor/modules.txt | 10 ++-- 25 files changed, 153 insertions(+), 65 deletions(-) diff --git a/go.mod b/go.mod index 74fab898e..5b71933c9 100644 --- a/go.mod +++ b/go.mod @@ -14,10 +14,10 @@ require ( k8s.io/api v0.19.7 k8s.io/apimachinery v0.19.7 k8s.io/client-go v0.19.7 - knative.dev/eventing v0.21.1-0.20210315222641-248cd1b3cc69 - knative.dev/hack v0.0.0-20210309141825-9b73a256fd9a - knative.dev/pkg v0.0.0-20210315160101-6a33a1ab29ac - knative.dev/serving v0.21.1-0.20210315221641-057c20302c88 + knative.dev/eventing v0.21.1-0.20210330142021-dca8b0acf039 + knative.dev/hack v0.0.0-20210325223819-b6ab329907d3 + knative.dev/pkg v0.0.0-20210331065221-952fdd90dbb0 + knative.dev/serving v0.21.1-0.20210331064021-1fef74827920 ) replace github.com/prometheus/client_golang => github.com/prometheus/client_golang v0.9.2 diff --git a/go.sum b/go.sum index 7bd722ff9..a41585243 100644 --- a/go.sum +++ b/go.sum @@ -24,6 +24,7 @@ cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4g cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -118,6 +119,7 @@ github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24 github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blang/semver v3.5.0+incompatible h1:CGxCgetQ64DKk7rdZ++Vfnb1+ogGNnB17OJKJXD2Cfs= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -149,6 +151,7 @@ github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMX github.com/containerd/stargz-snapshotter/estargz v0.0.0-20201223015020-a9a0c2d64694/go.mod h1:E9uVkkBKf0EaC39j2JVW9EzdNhYvpz6eQIjILHebruk= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -403,7 +406,9 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.14.6/go.mod h1:zdiPV4Yse/1gnckTHtghG4GkDEdKCRJduHpTxT3/jcw= github.com/grpc-ecosystem/grpc-gateway v1.14.8 h1:hXClj+iFpmLM8i3lkO6i4Psli4P2qObQuQReiII26U8= github.com/grpc-ecosystem/grpc-gateway v1.14.8/go.mod h1:NZE8t6vs6TnwLL/ITkaK8W3ecMLGAbh2jXTclvpiwYo= +github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= @@ -490,6 +495,7 @@ github.com/lightstep/tracecontext.go v0.0.0-20181129014701-1757c391b1ac h1:+2b6i github.com/lightstep/tracecontext.go v0.0.0-20181129014701-1757c391b1ac/go.mod h1:Frd2bnT3w5FB5q49ENTfVlztJES+1k/7lyWX2+9gq/M= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= @@ -606,8 +612,6 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T github.com/prometheus/common v0.0.0-20181126121408-4724e9255275/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= -github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.19.0 h1:Itb4+NjG9wRdkAWgVucbM/adyIXxEhbw0866e0uZE6A= github.com/prometheus/common v0.19.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/procfs v0.0.0-20181204211112-1dc9a6cbc91a/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -653,6 +657,7 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -660,6 +665,7 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/sqs/goreturns v0.0.0-20181028201513-538ac6014518/go.mod h1:CKI4AZ4XmGV240rTHfO0hfE83S6/a3/Q1siZJ/vXf7A= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -676,6 +682,7 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= @@ -718,8 +725,6 @@ go.opencensus.io v0.22.4-0.20200608061201-1901b56b9515/go.mod h1:yxeiOL68Rb0Xd1d go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5 h1:dntmOdLpSpHlVqbW5Eay97DelsZHe+55D+xC6i0dDS0= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.22.6 h1:BdkrbWrzDlV9dnbzoP7sfN+dHheJ4J9JOaYxcUDL+ok= -go.opencensus.io v0.22.6/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v0.16.0/go.mod h1:e4GKElweB8W2gWUqbghw0B8t5MCTccc9212eNHnOHwA= @@ -969,6 +974,7 @@ golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1113,8 +1119,6 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.35.0 h1:TwIQcH3es+MojMVojxxfQ3l3OF2KzlRxML2xZq0kRo8= -google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0 h1:o1bcQ6imQMIOpdrO3SWf2z5RV72WbDwdXuK0MDlc8As= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1147,6 +1151,7 @@ gopkg.in/go-playground/webhooks.v5 v5.13.0 h1:e9vtkQZK464+UdL3YjRox2yR8JSmh2094P gopkg.in/go-playground/webhooks.v5 v5.13.0/go.mod h1:LZbya/qLVdbqDR1aKrGuWV6qbia2zCYSR5dpom2SInQ= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= @@ -1213,19 +1218,23 @@ k8s.io/legacy-cloud-providers v0.19.7/go.mod h1:dsZk4gH9QIwAtHQ8CK0Ps257xlfgoXE3 k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -knative.dev/caching v0.0.0-20210311181225-4b366c7a9f99/go.mod h1:OlAEAfCSUjHVetZp/hpMw3lzAGHfTEQyu2a5dgf/7Qo= -knative.dev/eventing v0.21.1-0.20210315222641-248cd1b3cc69 h1:kCXnai8c/s3kyc493IFMHGvjiXjzRKXNAGltyUTJ410= -knative.dev/eventing v0.21.1-0.20210315222641-248cd1b3cc69/go.mod h1:/qYD+5fKsmlHtgzv5uu/5RT3iygmciQySN1MNCBsEG8= -knative.dev/hack v0.0.0-20210309141825-9b73a256fd9a h1:0UGKyvFzY1Czu0lP9+0IrJhwtKe2oNLI2GYa7MIQ5c0= -knative.dev/hack v0.0.0-20210309141825-9b73a256fd9a/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= -knative.dev/networking v0.0.0-20210311182125-f51c10d6fcf0 h1:TSc8t5E5UIjSqMltmPXIwuTqzx/NqzWhy286izs8I2I= -knative.dev/networking v0.0.0-20210311182125-f51c10d6fcf0/go.mod h1:dBcp0JBxATXsbCKK43cA6LxTricz4Ur3dPHataW5J64= -knative.dev/pkg v0.0.0-20210311174826-40488532be3f/go.mod h1:pn/vClSL/iCW40TlFR91EhtmMmsyPQR2V2LavDAOOMs= -knative.dev/pkg v0.0.0-20210315160101-6a33a1ab29ac h1:aGbaOcyNqxnvvujRtSMfkwehPER3TTsAw5mgCVqYZ08= -knative.dev/pkg v0.0.0-20210315160101-6a33a1ab29ac/go.mod h1:7swdJzGy7U6iq8538vt2yFsZJqmnSAxMFexWK9Ktyes= -knative.dev/reconciler-test v0.0.0-20210312233400-e0697952bd54/go.mod h1:xLwRGlh70/Y+W5EVHprlfkEzE5ytDLynnOzKFEIeiLg= -knative.dev/serving v0.21.1-0.20210315221641-057c20302c88 h1:LQV+y62xPciiUZnMyuHdVfyhCiVbzCmWd2b1ScYdHDo= -knative.dev/serving v0.21.1-0.20210315221641-057c20302c88/go.mod h1:5cO/KA08FzPBPuCa5CU2lEGZOP8V/zUgvoluuPcL1lQ= +knative.dev/caching v0.0.0-20210329131824-8fab885b7b87/go.mod h1:YY1Tq3vY0ZH68yPSBhgVGN8fNUF4k8eq6uLg/4mOHxA= +knative.dev/eventing v0.21.1-0.20210330142021-dca8b0acf039 h1:skDjBvseFTDncrI6ZF5Vxu9dP9innYrZictqXgqtsaU= +knative.dev/eventing v0.21.1-0.20210330142021-dca8b0acf039/go.mod h1:UE4xmtZ/fZWmbFOLL9u1WuBxxnTm9GmGQceuKram4Kg= +knative.dev/hack v0.0.0-20210317214554-58edbdc42966/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= +knative.dev/hack v0.0.0-20210325223819-b6ab329907d3 h1:km0Rrh0T9/wA2pivQm1hqSPVwgNgGCHC2WNn3GakZmE= +knative.dev/hack v0.0.0-20210325223819-b6ab329907d3/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= +knative.dev/hack/schema v0.0.0-20210325223819-b6ab329907d3/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0= +knative.dev/networking v0.0.0-20210329132124-45fe1f5dd35e h1:KVdsfMbpNRON/IMxZJkSlcaCVS6ot9G01A9nxht0eD8= +knative.dev/networking v0.0.0-20210329132124-45fe1f5dd35e/go.mod h1:sfplBxhMqToDapZRmMK2CWvaKmmIEH9MSDCF+c1uMGE= +knative.dev/pkg v0.0.0-20210318052054-dfeeb1817679/go.mod h1:o1aTlbc+h60DP9P6nd/WmP99Ny9Ls3U/JIjL4xMgqpw= +knative.dev/pkg v0.0.0-20210329065222-9d92ea16c0d3/go.mod h1:PD5g8hUCXq6iR3tILjmZeJBvQfXGnHMPKryq54qHJhg= +knative.dev/pkg v0.0.0-20210330162221-808d62257db6/go.mod h1:PD5g8hUCXq6iR3tILjmZeJBvQfXGnHMPKryq54qHJhg= +knative.dev/pkg v0.0.0-20210331065221-952fdd90dbb0 h1:z05hcB4br0qz7JdwIoUSTXLTF+7ThuJ+R6NFfXd1Y4Q= +knative.dev/pkg v0.0.0-20210331065221-952fdd90dbb0/go.mod h1:PD5g8hUCXq6iR3tILjmZeJBvQfXGnHMPKryq54qHJhg= +knative.dev/reconciler-test v0.0.0-20210329193624-ea6f47034b61/go.mod h1:QSd2hWDDwFh+9AHOkiECsj2ZY2DGJBKnj6aT6LITBuw= +knative.dev/serving v0.21.1-0.20210331064021-1fef74827920 h1:hVlKsmA/rnd0R5Yc7fqEoiipETJr4HGP1/9Y1VtGTOA= +knative.dev/serving v0.21.1-0.20210331064021-1fef74827920/go.mod h1:x9ZJYMFE+APfIgOGADUJiEmEGTJawfOYVV36oKJ5hjg= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= diff --git a/pkg/client/injection/reconciler/sources/v1alpha1/githubsource/controller.go b/pkg/client/injection/reconciler/sources/v1alpha1/githubsource/controller.go index 148ae86ff..154f351cc 100644 --- a/pkg/client/injection/reconciler/sources/v1alpha1/githubsource/controller.go +++ b/pkg/client/injection/reconciler/sources/v1alpha1/githubsource/controller.go @@ -50,7 +50,7 @@ const ( // NewImpl returns a controller.Impl that handles queuing and feeding work from // the queue through an implementation of controller.Reconciler, delegating to // the provided Interface and optional Finalizer methods. OptionsFn is used to return -// controller.Options to be used but the internal reconciler. +// controller.Options to be used by the internal reconciler. func NewImpl(ctx context.Context, r Interface, optionsFns ...controller.OptionsFn) *controller.Impl { logger := logging.FromContext(ctx) diff --git a/vendor/knative.dev/eventing/pkg/adapter/v2/main.go b/vendor/knative.dev/eventing/pkg/adapter/v2/main.go index b4b76988e..1079a6a25 100644 --- a/vendor/knative.dev/eventing/pkg/adapter/v2/main.go +++ b/vendor/knative.dev/eventing/pkg/adapter/v2/main.go @@ -23,6 +23,7 @@ import ( "log" "net/http" "strconv" + "sync" "time" cloudevents "github.com/cloudevents/sdk-go/v2" @@ -178,6 +179,8 @@ func MainWithInformers(ctx context.Context, component string, env EnvConfigAcces ctx = leaderelection.WithStandardLeaderElectorBuilder(ctx, kubeclient.Get(ctx), *leConfig) } + wg := sync.WaitGroup{} + // Create and start controller is needed if ctor := ControllerFromContext(ctx); ctor != nil { ctrl := ctor(ctx, adapter) @@ -190,13 +193,19 @@ func MainWithInformers(ctx context.Context, component string, env EnvConfigAcces } logger.Info("Starting controller") - go controller.StartAll(ctx, ctrl) + wg.Add(1) + go func() { + defer wg.Done() + controller.StartAll(ctx, ctrl) + }() } // Finally start the adapter (blocking) if err := adapter.Start(ctx); err != nil { logger.Fatalw("Start returned an error", zap.Error(err)) } + + wg.Wait() } func ConstructEnvOrDie(ector EnvConfigConstructor) EnvConfigAccessor { diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/trigger_types.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/trigger_types.go index 7e27a9cbe..f40e80292 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1/trigger_types.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1/trigger_types.go @@ -117,6 +117,7 @@ type TriggerStatus struct { duckv1.Status `json:",inline"` // SubscriberURI is the resolved URI of the receiver for this Trigger. + // +optional SubscriberURI *apis.URL `json:"subscriberUri,omitempty"` } diff --git a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/trigger_types.go b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/trigger_types.go index 49b5d04b4..3a5c9ccfc 100644 --- a/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/trigger_types.go +++ b/vendor/knative.dev/eventing/pkg/apis/eventing/v1beta1/trigger_types.go @@ -120,6 +120,7 @@ type TriggerStatus struct { duckv1.Status `json:",inline"` // SubscriberURI is the resolved URI of the receiver for this Trigger. + // +optional SubscriberURI *apis.URL `json:"subscriberUri,omitempty"` } diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_defaults.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_defaults.go index c2ddc46ac..6cdf2bab9 100644 --- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_defaults.go +++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_defaults.go @@ -25,5 +25,9 @@ func (s *Subscription) SetDefaults(ctx context.Context) { } func (ss *SubscriptionSpec) SetDefaults(ctx context.Context) { - // TODO anything? + // HACK if a channel ref is a kafka channel ref, we need to hack it around to use only v1beta1 + // TODO(slinkydeveloper) REMOVE AFTER 0.22 release + if ss.Channel.Kind == "KafkaChannel" && ss.Channel.APIVersion == "messaging.knative.dev/v1alpha1" { + ss.Channel.APIVersion = "messaging.knative.dev/v1beta1" + } } diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go index f2496bc7a..e3f3a5172 100644 --- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go +++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1/subscription_validation.go @@ -80,8 +80,16 @@ func (s *Subscription) CheckImmutableFields(ctx context.Context, original *Subsc return nil } + // TODO(slinkydeveloper) + // HACK around the immutability check to make sure the update script can upgrade the api version + // REMOVE AFTER 0.22 release + ignoredFields := []string{"Subscriber", "Reply"} + if original.Spec.Channel.Kind == "KafkaChannel" && original.Spec.Channel.APIVersion == "messaging.knative.dev/v1alpha1" && s.Spec.Channel.APIVersion == "messaging.knative.dev/v1beta1" { + ignoredFields = append(ignoredFields, "Channel.APIVersion") + } + // Only Subscriber and Reply are mutable. - ignoreArguments := cmpopts.IgnoreFields(SubscriptionSpec{}, "Subscriber", "Reply") + ignoreArguments := cmpopts.IgnoreFields(SubscriptionSpec{}, ignoredFields...) if diff, err := kmp.ShortDiff(original.Spec, s.Spec, ignoreArguments); err != nil { return &apis.FieldError{ Message: "Failed to diff Subscription", diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1beta1/subscription_defaults.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1beta1/subscription_defaults.go index 16fd42ea5..6694bb17a 100644 --- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1beta1/subscription_defaults.go +++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1beta1/subscription_defaults.go @@ -25,5 +25,9 @@ func (s *Subscription) SetDefaults(ctx context.Context) { } func (ss *SubscriptionSpec) SetDefaults(ctx context.Context) { - // TODO anything? + // HACK if a channel ref is a kafka channel ref, we need to hack it around to use only v1beta1 + // TODO(slinkydeveloper) REMOVE AFTER 0.22 release + if ss.Channel.Kind == "KafkaChannel" && ss.Channel.APIVersion == "messaging.knative.dev/v1alpha1" { + ss.Channel.APIVersion = "messaging.knative.dev/v1beta1" + } } diff --git a/vendor/knative.dev/eventing/pkg/apis/messaging/v1beta1/subscription_validation.go b/vendor/knative.dev/eventing/pkg/apis/messaging/v1beta1/subscription_validation.go index 5cf8c2e85..6d316efbb 100644 --- a/vendor/knative.dev/eventing/pkg/apis/messaging/v1beta1/subscription_validation.go +++ b/vendor/knative.dev/eventing/pkg/apis/messaging/v1beta1/subscription_validation.go @@ -75,8 +75,16 @@ func (s *Subscription) CheckImmutableFields(ctx context.Context, original *Subsc return nil } + // TODO(slinkydeveloper) + // HACK around the immutability check to make sure the update script can upgrade the api version + // REMOVE AFTER 0.22 release + ignoredFields := []string{"Subscriber", "Reply"} + if original.Spec.Channel.Kind == "KafkaChannel" && original.Spec.Channel.APIVersion == "messaging.knative.dev/v1alpha1" && s.Spec.Channel.APIVersion == "messaging.knative.dev/v1beta1" { + ignoredFields = append(ignoredFields, "Channel.APIVersion") + } + // Only Subscriber and Reply are mutable. - ignoreArguments := cmpopts.IgnoreFields(SubscriptionSpec{}, "Subscriber", "Reply") + ignoreArguments := cmpopts.IgnoreFields(SubscriptionSpec{}, ignoredFields...) if diff, err := kmp.ShortDiff(original.Spec, s.Spec, ignoreArguments); err != nil { return &apis.FieldError{ Message: "Failed to diff Subscription", diff --git a/vendor/knative.dev/eventing/pkg/kncloudevents/message_receiver.go b/vendor/knative.dev/eventing/pkg/kncloudevents/message_receiver.go index 4ca1c2d08..7be261f69 100644 --- a/vendor/knative.dev/eventing/pkg/kncloudevents/message_receiver.go +++ b/vendor/knative.dev/eventing/pkg/kncloudevents/message_receiver.go @@ -38,7 +38,11 @@ type HTTPMessageReceiver struct { server *http.Server listener net.Listener - checker http.HandlerFunc + checker http.HandlerFunc + drainQuietPeriod time.Duration + + // Used to signal when receiver is listening + Ready chan interface{} } // HTTPMessageReceiverOption enables further configuration of a HTTPMessageReceiver. @@ -48,6 +52,9 @@ func NewHTTPMessageReceiver(port int, o ...HTTPMessageReceiverOption) *HTTPMessa h := &HTTPMessageReceiver{ port: port, } + + h.Ready = make(chan interface{}) + for _, opt := range o { opt(h) } @@ -64,6 +71,13 @@ func WithChecker(checker http.HandlerFunc) HTTPMessageReceiverOption { } } +// WithDrainQuietPeriod configures the QuietPeriod for the Drainer. +func WithDrainQuietPeriod(duration time.Duration) HTTPMessageReceiverOption { + return func(h *HTTPMessageReceiver) { + h.drainQuietPeriod = duration + } +} + // Blocking func (recv *HTTPMessageReceiver) StartListen(ctx context.Context, handler http.Handler) error { var err error @@ -74,6 +88,7 @@ func (recv *HTTPMessageReceiver) StartListen(ctx context.Context, handler http.H drainer := &handlers.Drainer{ Inner: CreateHandler(handler), HealthCheck: recv.checker, + QuietPeriod: recv.drainQuietPeriod, } recv.server = &http.Server{ Addr: recv.listener.Addr().String(), @@ -82,6 +97,7 @@ func (recv *HTTPMessageReceiver) StartListen(ctx context.Context, handler http.H errChan := make(chan error, 1) go func() { + close(recv.Ready) errChan <- recv.server.Serve(recv.listener) }() diff --git a/vendor/knative.dev/hack/e2e-tests.sh b/vendor/knative.dev/hack/e2e-tests.sh index 0b8548f66..c5906d610 100644 --- a/vendor/knative.dev/hack/e2e-tests.sh +++ b/vendor/knative.dev/hack/e2e-tests.sh @@ -37,12 +37,15 @@ function teardown_test_resources() { # Parameters: $1..$n - any go test flags, then directories containing the tests to run. function go_test_e2e() { local go_test_args=() + [[ ! " $*" == *" -tags="* ]] && go_test_args+=("-tags=e2e") + [[ ! " $*" == *" -count="* ]] && go_test_args+=("-count=1") + [[ ! " $*" == *" -race"* ]] && go_test_args+=("-race") + # Remove empty args as `go test` will consider it as running tests for the current directory, which is not expected. for arg in "$@"; do [[ -n "$arg" ]] && go_test_args+=("$arg") done - [[ ! " $*" == *" -tags="* ]] && go_test_args+=("-tags=e2e") - report_go_test -race -count=1 "${go_test_args[@]}" + report_go_test "${go_test_args[@]}" } # Setup the test cluster for running the tests. @@ -69,8 +72,8 @@ function setup_test_cluster() { # Acquire cluster admin role for the current user. acquire_cluster_admin_role "${k8s_cluster}" - # Setup KO_DOCKER_REPO if it is a GKE cluster. Incorporate an element of - # randomness to ensure that each run properly publishes images. Don't + # Setup KO_DOCKER_REPO if it is a GKE cluster. Incorporate an element of + # randomness to ensure that each run properly publishes images. Don't # owerwrite KO_DOCKER_REPO if already set. [ -z "${KO_DOCKER_REPO}" ] && \ [[ "${k8s_cluster}" =~ ^gke_.* ]] && \ diff --git a/vendor/knative.dev/hack/library.sh b/vendor/knative.dev/hack/library.sh index f8f8b629c..de744c1d9 100644 --- a/vendor/knative.dev/hack/library.sh +++ b/vendor/knative.dev/hack/library.sh @@ -156,6 +156,9 @@ function wait_until_object_does_not_exist() { } # Waits until all pods are running in the given namespace. +# This function handles some edge cases that `kubectl wait` does not support, +# and it provides nice debug info on the state of the pod if it failed, +# that’s why we have this long bash function instead of using `kubectl wait`. # Parameters: $1 - namespace. function wait_until_pods_running() { echo -n "Waiting until all pods in namespace $1 are up" @@ -163,7 +166,7 @@ function wait_until_pods_running() { for i in {1..150}; do # timeout after 5 minutes # List all pods. Ignore Terminating pods as those have either been replaced through # a deployment or terminated on purpose (through chaosduck for example). - local pods="$(kubectl get pods --no-headers -n $1 2>/dev/null | grep -v Terminating)" + local pods="$(kubectl get pods --no-headers -n $1 | grep -v Terminating)" # All pods must be running (ignore ImagePull error to allow the pod to retry) local not_running_pods=$(echo "${pods}" | grep -v Running | grep -v Completed | grep -v ErrImagePull | grep -v ImagePullBackOff) if [[ -n "${pods}" ]] && [[ -z "${not_running_pods}" ]]; then diff --git a/vendor/knative.dev/hack/presubmit-tests.sh b/vendor/knative.dev/hack/presubmit-tests.sh index e873736be..fb50ac819 100644 --- a/vendor/knative.dev/hack/presubmit-tests.sh +++ b/vendor/knative.dev/hack/presubmit-tests.sh @@ -209,7 +209,7 @@ function run_unit_tests() { # Default unit test runner that runs all go tests in the repo. function default_unit_test_runner() { - report_go_test -race ./... + report_go_test -race -count 1 ./... } # Run integration tests. If there's no `integration_tests` function, run the diff --git a/vendor/knative.dev/networking/pkg/network.go b/vendor/knative.dev/networking/pkg/network.go index 40914e064..0342b0fec 100644 --- a/vendor/knative.dev/networking/pkg/network.go +++ b/vendor/knative.dev/networking/pkg/network.go @@ -180,6 +180,9 @@ const ( // load balancers to not load balance the respective request but to // send it to the request's target directly. PassthroughLoadbalancingHeaderName = "K-Passthrough-Lb" + + // EnableMeshPodAddressabilityKey is the config for enabling pod addressability in mesh. + EnableMeshPodAddressabilityKey = "enable-mesh-pod-addressability" ) // DomainTemplateValues are the available properties people can choose from @@ -251,6 +254,14 @@ type Config struct { // cluster administrator is responsible for pre-creating ClusterDomainClaims // and delegating them to namespaces via their spec.Namespace field. AutocreateClusterDomainClaims bool + + // EnableMeshPodAddressability specifies whether networking plugins will add + // additional information to deployed applications to make their pods directl + // accessible via their IPs even if mesh is enabled and thus direct-addressability + // is usually not possible. + // Consumers like Knative Serving can use this setting to adjust their behavior + // accordingly, i.e. to drop fallback solutions for non-pod-addressable systems. + EnableMeshPodAddressability bool } // HTTPProtocol indicates a type of HTTP endpoint behavior @@ -298,6 +309,7 @@ func NewConfigFromMap(data map[string]string) (*Config, error) { cm.AsString(TagTemplateKey, &nc.TagTemplate), cm.AsInt(RolloutDurationKey, &nc.RolloutDurationSecs), cm.AsBool(AutocreateClusterDomainClaimsKey, &nc.AutocreateClusterDomainClaims), + cm.AsBool(EnableMeshPodAddressabilityKey, &nc.EnableMeshPodAddressability), ); err != nil { return nil, err } diff --git a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_controller.go b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_controller.go index 78ff96730..9471b5db8 100644 --- a/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_controller.go +++ b/vendor/knative.dev/pkg/codegen/cmd/injection-gen/generators/reconciler_controller.go @@ -204,7 +204,7 @@ const ( // NewImpl returns a {{.controllerImpl|raw}} that handles queuing and feeding work from // the queue through an implementation of {{.controllerReconciler|raw}}, delegating to // the provided Interface and optional Finalizer methods. OptionsFn is used to return -// {{.controllerOptions|raw}} to be used but the internal reconciler. +// {{.controllerOptions|raw}} to be used by the internal reconciler. func NewImpl(ctx {{.contextContext|raw}}, r Interface{{if .hasClass}}, classValue string{{end}}, optionsFns ...{{.controllerOptionsFn|raw}}) *{{.controllerImpl|raw}} { logger := {{.loggingFromContext|raw}}(ctx) diff --git a/vendor/knative.dev/pkg/leaderelection/config.go b/vendor/knative.dev/pkg/leaderelection/config.go index 96164bd00..3d9df1dc7 100644 --- a/vendor/knative.dev/pkg/leaderelection/config.go +++ b/vendor/knative.dev/pkg/leaderelection/config.go @@ -134,8 +134,8 @@ type statefulSetID struct { func (ssID *statefulSetID) Decode(v string) error { if i := strings.LastIndex(v, "-"); i != -1 { - ui, err := strconv.ParseUint(v[i+1:], 10, 64) - ssID.ordinal = int(ui) + ui, err := strconv.Atoi(v[i+1:]) + ssID.ordinal = ui ssID.ssName = v[:i] return err } diff --git a/vendor/knative.dev/pkg/reconciler/testing/context.go b/vendor/knative.dev/pkg/reconciler/testing/context.go index aa7f385be..e14aa2ade 100644 --- a/vendor/knative.dev/pkg/reconciler/testing/context.go +++ b/vendor/knative.dev/pkg/reconciler/testing/context.go @@ -18,10 +18,10 @@ package testing import ( "context" + "testing" "time" "go.uber.org/atomic" - "go.uber.org/zap/zaptest" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" @@ -39,14 +39,14 @@ import ( ) // SetupFakeContext sets up the the Context and the fake informers for the tests. -func SetupFakeContext(t zaptest.TestingT) (context.Context, []controller.Informer) { +func SetupFakeContext(t testing.TB) (context.Context, []controller.Informer) { c, _, is := SetupFakeContextWithCancel(t) return c, is } // SetupFakeContextWithCancel sets up the the Context and the fake informers for the tests // The provided context can be canceled using provided callback. -func SetupFakeContextWithCancel(t zaptest.TestingT) (context.Context, context.CancelFunc, []controller.Informer) { +func SetupFakeContextWithCancel(t testing.TB) (context.Context, context.CancelFunc, []controller.Informer) { ctx, c := context.WithCancel(logtesting.TestContextWithLogger(t)) ctx = controller.WithEventRecorder(ctx, record.NewFakeRecorder(1000)) ctx, is := injection.Fake.SetupInformers(ctx, &rest.Config{}) diff --git a/vendor/knative.dev/pkg/tracing/zipkin.go b/vendor/knative.dev/pkg/tracing/zipkin.go index 75a97ae3b..4faa7a12c 100644 --- a/vendor/knative.dev/pkg/tracing/zipkin.go +++ b/vendor/knative.dev/pkg/tracing/zipkin.go @@ -56,7 +56,6 @@ func WithZipkinExporter(reporterFact ZipkinReporterFactory, endpoint *zipkinmode } if oct.closer != nil { - // TODO(greghaynes) log this error _ = oct.closer.Close() } diff --git a/vendor/knative.dev/pkg/version/version.go b/vendor/knative.dev/pkg/version/version.go index b2a4e2b47..e14cbb1b3 100644 --- a/vendor/knative.dev/pkg/version/version.go +++ b/vendor/knative.dev/pkg/version/version.go @@ -33,7 +33,8 @@ const ( // NOTE: If you are changing this line, please also update the minimum kubernetes // version listed here: // https://github.com/knative/docs/blob/main/docs/install/any-kubernetes-cluster.md#before-you-begin - defaultMinimumVersion = "v1.17.0" + // https://github.com/knative/docs/blob/main/docs/install/knative-with-operators.md#prerequisites + defaultMinimumVersion = "v1.18.0" ) func getMinimumVersion() string { diff --git a/vendor/knative.dev/pkg/webhook/README.md b/vendor/knative.dev/pkg/webhook/README.md index 18ca37ce1..cac4fb664 100644 --- a/vendor/knative.dev/pkg/webhook/README.md +++ b/vendor/knative.dev/pkg/webhook/README.md @@ -25,7 +25,7 @@ The code to stand up such a webhook looks roughly like this: ```go // Create a function matching this signature to pass into sharedmain. func NewResourceAdmissionController(ctx context.Context, cmw configmap.Watcher) *controller.Impl { - return resourcesemantics.NewAdmissionController(ctx, + return validation.NewAdmissionController(ctx, // Name of the resource webhook (created via yaml) fmt.Sprintf("resources.webhook.%s.knative.dev", system.Namespace()), diff --git a/vendor/knative.dev/pkg/webhook/webhook.go b/vendor/knative.dev/pkg/webhook/webhook.go index ef578c4ee..ab54e36b5 100644 --- a/vendor/knative.dev/pkg/webhook/webhook.go +++ b/vendor/knative.dev/pkg/webhook/webhook.go @@ -21,6 +21,7 @@ import ( "crypto/tls" "errors" "fmt" + "html" "net/http" "time" @@ -140,7 +141,7 @@ func New( } webhook.mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { - http.Error(w, fmt.Sprint("no controller registered for: ", r.URL.Path), http.StatusBadRequest) + http.Error(w, fmt.Sprint("no controller registered for: ", html.EscapeString(r.URL.Path)), http.StatusBadRequest) }) for _, controller := range controllers { diff --git a/vendor/knative.dev/serving/pkg/apis/autoscaling/annotation_validation.go b/vendor/knative.dev/serving/pkg/apis/autoscaling/annotation_validation.go index 805047e24..3fdf2bb6a 100644 --- a/vendor/knative.dev/serving/pkg/apis/autoscaling/annotation_validation.go +++ b/vendor/knative.dev/serving/pkg/apis/autoscaling/annotation_validation.go @@ -52,7 +52,7 @@ func getIntGE0(m map[string]string, k string) (int32, *apis.FieldError) { // ValidateAnnotations verifies the autoscaling annotations. func ValidateAnnotations(ctx context.Context, config *autoscalerconfig.Config, anns map[string]string) *apis.FieldError { return validateClass(anns). - Also(validateMinMaxScale(ctx, config, anns)). + Also(validateMinMaxScale(config, anns)). Also(validateFloats(anns)). Also(validateWindow(anns)). Also(validateLastPodRetention(anns)). @@ -173,7 +173,7 @@ func validateWindow(annotations map[string]string) *apis.FieldError { return nil } -func validateMinMaxScale(ctx context.Context, config *autoscalerconfig.Config, annotations map[string]string) *apis.FieldError { +func validateMinMaxScale(config *autoscalerconfig.Config, annotations map[string]string) *apis.FieldError { min, errs := getIntGE0(annotations, MinScaleAnnotationKey) max, err := getIntGE0(annotations, MaxScaleAnnotationKey) errs = errs.Also(err) @@ -184,21 +184,30 @@ func validateMinMaxScale(ctx context.Context, config *autoscalerconfig.Config, a Paths: []string{MaxScaleAnnotationKey, MinScaleAnnotationKey}, }) } - _, exists := annotations[MaxScaleAnnotationKey] - // If max scale annotation is not set but default MaxScale is set, then max scale will not be unlimited. - if !apis.IsInCreate(ctx) || config.MaxScaleLimit == 0 || (!exists && config.MaxScale > 0) { - return errs + + if _, hasMaxScaleAnnotation := annotations[MaxScaleAnnotationKey]; hasMaxScaleAnnotation { + errs = errs.Also(validateMaxScaleWithinLimit(max, config.MaxScaleLimit)) + } + + return errs +} + +func validateMaxScaleWithinLimit(maxScale, maxScaleLimit int32) (errs *apis.FieldError) { + if maxScaleLimit == 0 { + return nil } - if max > config.MaxScaleLimit { - errs = errs.Also(apis.ErrOutOfBoundsValue( - max, 1, config.MaxScaleLimit, MaxScaleAnnotationKey)) + + if maxScale > maxScaleLimit { + errs = errs.Also(apis.ErrOutOfBoundsValue(maxScale, 1, maxScaleLimit, MaxScaleAnnotationKey)) } - if max == 0 { + + if maxScale == 0 { errs = errs.Also(&apis.FieldError{ - Message: fmt.Sprint("maxScale=0 (unlimited), must be less than ", config.MaxScaleLimit), + Message: fmt.Sprint("maxScale=0 (unlimited), must be less than ", maxScaleLimit), Paths: []string{MaxScaleAnnotationKey}, }) } + return errs } diff --git a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_lifecycle.go b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_lifecycle.go index 8335d5f5e..bc71421e4 100644 --- a/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_lifecycle.go +++ b/vendor/knative.dev/serving/pkg/apis/serving/v1/revision_lifecycle.go @@ -24,7 +24,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "knative.dev/pkg/apis" - av1alpha1 "knative.dev/serving/pkg/apis/autoscaling/v1alpha1" + autoscalingv1alpha1 "knative.dev/serving/pkg/apis/autoscaling/v1alpha1" "knative.dev/serving/pkg/apis/config" "knative.dev/serving/pkg/apis/serving" ) @@ -168,9 +168,9 @@ func (rs *RevisionStatus) PropagateDeploymentStatus(original *appsv1.DeploymentS } // PropagateAutoscalerStatus propagates autoscaler's status to the revision's status. -func (rs *RevisionStatus) PropagateAutoscalerStatus(ps *av1alpha1.PodAutoscalerStatus) { +func (rs *RevisionStatus) PropagateAutoscalerStatus(ps *autoscalingv1alpha1.PodAutoscalerStatus) { // Reflect the PA status in our own. - cond := ps.GetCondition(av1alpha1.PodAutoscalerConditionReady) + cond := ps.GetCondition(autoscalingv1alpha1.PodAutoscalerConditionReady) if cond == nil { rs.MarkActiveUnknown("Deploying", "") return diff --git a/vendor/modules.txt b/vendor/modules.txt index 0ad8211bd..6b8dfef86 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -918,7 +918,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# knative.dev/eventing v0.21.1-0.20210315222641-248cd1b3cc69 +# knative.dev/eventing v0.21.1-0.20210330142021-dca8b0acf039 ## explicit knative.dev/eventing/pkg/adapter/v2 knative.dev/eventing/pkg/adapter/v2/test @@ -998,14 +998,14 @@ knative.dev/eventing/test/test_images/heartbeats knative.dev/eventing/test/test_images/performance knative.dev/eventing/test/test_images/print knative.dev/eventing/test/test_images/recordevents -# knative.dev/hack v0.0.0-20210309141825-9b73a256fd9a +# knative.dev/hack v0.0.0-20210325223819-b6ab329907d3 ## explicit knative.dev/hack -# knative.dev/networking v0.0.0-20210311182125-f51c10d6fcf0 +# knative.dev/networking v0.0.0-20210329132124-45fe1f5dd35e knative.dev/networking/pkg knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking/v1alpha1 -# knative.dev/pkg v0.0.0-20210315160101-6a33a1ab29ac +# knative.dev/pkg v0.0.0-20210331065221-952fdd90dbb0 ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck @@ -1084,7 +1084,7 @@ knative.dev/pkg/webhook/psbinding knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/serving v0.21.1-0.20210315221641-057c20302c88 +# knative.dev/serving v0.21.1-0.20210331064021-1fef74827920 ## explicit knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling/v1alpha1