upgrade to latest dependencies (#1486)

bumping knative.dev/serving 2dc26f1...2446281:
  > 2446281 upgrade to latest dependencies (# 12148)
bumping knative.dev/networking 7e3965b...c8d6474:
  > c8d6474 upgrade to latest dependencies (# 534)
bumping knative.dev/eventing a34aaa0...7af98bb:
  > 7af98bb Format go code (# 5815)
  > e05267a Update actions (# 5816)
  > 50b2f32 upgrade to latest dependencies (# 5825)
bumping knative.dev/hack 47ac3b0...ced8ce7:
  > ced8ce7 Fix bash version check to allow v4 or later (# 84)
bumping knative.dev/pkg a34efd6...ba2b2b1:
  > ba2b2b1 upgrade to latest dependencies (# 2319)
  > caa95fe Bump assorted dependencies (# 2318)

Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
knative-automation 2021-10-19 11:05:34 -04:00 committed by GitHub
parent c142e27104
commit 534d91319f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 805 additions and 710 deletions

10
go.mod
View File

@ -18,10 +18,10 @@ require (
k8s.io/cli-runtime v0.21.4 k8s.io/cli-runtime v0.21.4
k8s.io/client-go v0.21.4 k8s.io/client-go v0.21.4
k8s.io/code-generator v0.21.4 k8s.io/code-generator v0.21.4
knative.dev/eventing v0.26.1-0.20211018174236-a34aaa09f7d2 knative.dev/eventing v0.26.1-0.20211019092333-7af98bbb4491
knative.dev/hack v0.0.0-20211018110626-47ac3b032e60 knative.dev/hack v0.0.0-20211019034732-ced8ce706528
knative.dev/networking v0.0.0-20211018141626-7e3965bfab7b knative.dev/networking v0.0.0-20211019132235-c8d647402afa
knative.dev/pkg v0.0.0-20211018141937-a34efd6b409d knative.dev/pkg v0.0.0-20211019132235-ba2b2b1bf268
knative.dev/serving v0.26.1-0.20211018142437-2dc26f102ade knative.dev/serving v0.26.1-0.20211019063033-2446281d75da
sigs.k8s.io/yaml v1.3.0 sigs.k8s.io/yaml v1.3.0
) )

39
go.sum
View File

@ -26,8 +26,9 @@ cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWc
cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
cloud.google.com/go v0.96.0 h1:r9XIwQ9FrJspMjHulRm1kl1uanw5gSolzSK+dukeH0E=
cloud.google.com/go v0.96.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.96.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
cloud.google.com/go v0.97.0 h1:3DXvAyifywvq64LfkKaMOmkWPS1CikIQdMe2lY9vxU8=
cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE=
cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc=
@ -47,6 +48,7 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.16.1/go.mod h1:LaNorbty3ehnU3rEjXSNV/NRgQA0O8Y+uh6bPe5UOk4= cloud.google.com/go/storage v1.16.1/go.mod h1:LaNorbty3ehnU3rEjXSNV/NRgQA0O8Y+uh6bPe5UOk4=
cloud.google.com/go/storage v1.18.2/go.mod h1:AiIj7BWXyhO5gGVmYJ+S8tbkCx3yb0IMjua8Aw4naVM=
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d h1:LblfooH1lKOpp1hIhukktmSAxFkqMPFk9KR6iZ0MJNI=
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY= contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d/go.mod h1:IshRmMJBhDfFj5Y67nVhMYTTIze91RUeT73ipWKs/GY=
contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs= contrib.go.opencensus.io/exporter/prometheus v0.4.0 h1:0QfIkj9z/iVZgK31D9H9ohjjIDApI2GOPScCKwxedbs=
@ -1155,8 +1157,9 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b h1:eB48h3HiRycXNy8E0Gf5e0hv7YT6Kt14L/D73G1fuwo=
golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f h1:OfiFi4JbukWwe3lzw+xunroH1mnC1e2Gy5cxNJApiSY=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@ -1173,8 +1176,9 @@ golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 h1:B333XXssMuKQeBwiNODx4TupZy7bf4sxFZnN2ZOcvUE=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@ -1498,8 +1502,9 @@ google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEc
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 h1:5Tbluzus3QxoAJx4IefGt1W0HQZW4nuMrVk684jI74Q=
google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211016002631-37fc39342514 h1:Rp1vYDPD4TdkMH5S/bZbopsGCsWhPcrLBUwOVhAQCxM=
google.golang.org/genproto v0.0.0-20211016002631-37fc39342514/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
@ -1649,8 +1654,9 @@ k8s.io/csi-translation-lib v0.21.0/go.mod h1:edq+UMpgqEx3roTuGF/03uIuSOsI986jtu6
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
k8s.io/gengo v0.0.0-20201203183100-97869a43a9d9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20201203183100-97869a43a9d9/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/gengo v0.0.0-20210203185629-de9496dff47b h1:bAU8IlrMA6KbP0dIg/sVSJn95pDCUHDZx0DpTGrf2v4=
k8s.io/gengo v0.0.0-20210203185629-de9496dff47b/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/gengo v0.0.0-20210203185629-de9496dff47b/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/gengo v0.0.0-20210915205010-39e73c8a59cd h1:WEhFhsVrgII9WzLqf1VTUUtwPHm+vxbRq8Ib6y9Jt4g=
k8s.io/gengo v0.0.0-20210915205010-39e73c8a59cd/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E=
k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.2.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk=
k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8=
k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I=
@ -1668,26 +1674,27 @@ k8s.io/legacy-cloud-providers v0.21.0/go.mod h1:bNxo7gDg+PGkBmT/MFZswLTWdSWK9kAl
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/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 h1:0T5IaWHO3sJTEmCP6mUlBvMukxPKUQWqiI/YuiBNMiQ=
k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210111153108-fddb29f9d009/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/caching v0.0.0-20211015211723-5bfedd5e159d/go.mod h1:9oK2qXCxiLc4eLw+Stv7F152deaJjCuvPQK3PlDKqL4= knative.dev/caching v0.0.0-20211018141327-e93b91e2131e/go.mod h1:Q2Q1eAt2XyVIXRFFE2ENhBqWZLPvVpbz5nX+8Vrud74=
knative.dev/eventing v0.26.1-0.20211018174236-a34aaa09f7d2 h1:swssIAfHq5JFc3DE9H/q1DPWuNfQeItvpTRqgQ/SosA= knative.dev/eventing v0.26.1-0.20211019092333-7af98bbb4491 h1:qq5u2XYZofRSUMnyaK/ZcObC8VCUxuERK28I6jj3wfg=
knative.dev/eventing v0.26.1-0.20211018174236-a34aaa09f7d2/go.mod h1:1wNHd0x3B1xf9wRTsS8Rf2MKo+b2PJvRHIOY/Zro0y4= knative.dev/eventing v0.26.1-0.20211019092333-7af98bbb4491/go.mod h1:rCh4s+ySFU9wzOt3XLSFMnhDrszyiL6gtvIXD/SxMbI=
knative.dev/hack v0.0.0-20210806075220-815cd312d65c/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/hack v0.0.0-20210806075220-815cd312d65c/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211015200324-86876688e735/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/hack v0.0.0-20211015200324-86876688e735/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211018110626-47ac3b032e60 h1:wLv7s/AGWmv4Y6GhsDNP62BYFfz/xgiM+JylTD201eo=
knative.dev/hack v0.0.0-20211018110626-47ac3b032e60/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI= knative.dev/hack v0.0.0-20211018110626-47ac3b032e60/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack v0.0.0-20211019034732-ced8ce706528 h1:P3PuBxLnxESTnQL9Iv00wqFVL1a88MDj2zXDCQmvTvk=
knative.dev/hack v0.0.0-20211019034732-ced8ce706528/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/hack/schema v0.0.0-20211018110626-47ac3b032e60/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0= knative.dev/hack/schema v0.0.0-20211018110626-47ac3b032e60/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/networking v0.0.0-20211015221723-16ef52411606/go.mod h1:Jw3MjEG/651SEjwgEtG5hNJ5PfID6goeL9kkdDx5sMo=
knative.dev/networking v0.0.0-20211018141626-7e3965bfab7b h1:01jBa5cNrtGnsC+gXuQVQlHRazUcOfXxsusLzOv+iqc=
knative.dev/networking v0.0.0-20211018141626-7e3965bfab7b/go.mod h1:6Uw6IY1BhBx7Ukq6bWMdt7zzduPHErhPe1i1dkApjvU= knative.dev/networking v0.0.0-20211018141626-7e3965bfab7b/go.mod h1:6Uw6IY1BhBx7Ukq6bWMdt7zzduPHErhPe1i1dkApjvU=
knative.dev/networking v0.0.0-20211019132235-c8d647402afa h1:xhP89NuarmPTZuMvN953R7Pyn7SignP3IYNhDweeQxM=
knative.dev/networking v0.0.0-20211019132235-c8d647402afa/go.mod h1:hdwTmmjyGQv82PF/lI1kMFLNd6YDGtc3U+lz/5MKGQM=
knative.dev/pkg v0.0.0-20210914164111-4857ab6939e3/go.mod h1:jMSqkNMsrzuy+XR4Yr/BMy7SDVbUOl3KKB6+5MR+ZU8= knative.dev/pkg v0.0.0-20210914164111-4857ab6939e3/go.mod h1:jMSqkNMsrzuy+XR4Yr/BMy7SDVbUOl3KKB6+5MR+ZU8=
knative.dev/pkg v0.0.0-20211013152848-fa2f8f19557b/go.mod h1:r27D20afKNeK+9aNOg+0qMv8JgQcyeP+CAYQIR1jEQY=
knative.dev/pkg v0.0.0-20211015194524-a5bb75923981/go.mod h1:r27D20afKNeK+9aNOg+0qMv8JgQcyeP+CAYQIR1jEQY=
knative.dev/pkg v0.0.0-20211018071527-3463dd75659d/go.mod h1:KztVeIX2/Sp2PNRZmqjVe16bweUjLsCQKNKp36tAnSM= knative.dev/pkg v0.0.0-20211018071527-3463dd75659d/go.mod h1:KztVeIX2/Sp2PNRZmqjVe16bweUjLsCQKNKp36tAnSM=
knative.dev/pkg v0.0.0-20211018141937-a34efd6b409d h1:iF1JvghwOwpUbt+W1S5+hAnaXrU2jtkhMLmbpJ/lh6s=
knative.dev/pkg v0.0.0-20211018141937-a34efd6b409d/go.mod h1:/d1+Wklc8blR39M4oEBu+GeLav4vsiiJwq61tJay7mc= knative.dev/pkg v0.0.0-20211018141937-a34efd6b409d/go.mod h1:/d1+Wklc8blR39M4oEBu+GeLav4vsiiJwq61tJay7mc=
knative.dev/pkg v0.0.0-20211019101734-caa95feec115/go.mod h1:FXppOkebhp8SBDFI0vVqmcwC98KBxodLheaVansP5r4=
knative.dev/pkg v0.0.0-20211019132235-ba2b2b1bf268 h1:9bUCVFyYklBfXpdilw57eBN77SbMqKY0OEDKyirO1MM=
knative.dev/pkg v0.0.0-20211019132235-ba2b2b1bf268/go.mod h1:Q3PrYqZsnHU9rNJhyH/zhVdTojGfEqrkNnNG4arrJgE=
knative.dev/reconciler-test v0.0.0-20211018075026-816dbd1c57f7/go.mod h1:6yDmb26SINSmgw6wVy9qQwgRMewiW8ddkkwGLR0ZvOY= knative.dev/reconciler-test v0.0.0-20211018075026-816dbd1c57f7/go.mod h1:6yDmb26SINSmgw6wVy9qQwgRMewiW8ddkkwGLR0ZvOY=
knative.dev/serving v0.26.1-0.20211018142437-2dc26f102ade h1:Z2DybmcrPhMqccMsyliYNOdqAlruFRkmHO6numgN/2o= knative.dev/serving v0.26.1-0.20211019063033-2446281d75da h1:EzPUwc3wVZuxHRbPiF2M4XONnZNqt3ochRALrCSLSjQ=
knative.dev/serving v0.26.1-0.20211018142437-2dc26f102ade/go.mod h1:BAx9nDdxOevctU8XPpp6smO+xaHxok2vPcnduGMZJgs= knative.dev/serving v0.26.1-0.20211019063033-2446281d75da/go.mod h1:InI1gCF88FJH4Ql6CMAAhlaK4qKMgM+syTGjSacor1E=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU= 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/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=

View File

@ -48,7 +48,7 @@ type clientConnPool struct {
conns map[string][]*ClientConn // key is host:port conns map[string][]*ClientConn // key is host:port
dialing map[string]*dialCall // currently in-flight dials dialing map[string]*dialCall // currently in-flight dials
keys map[*ClientConn][]string keys map[*ClientConn][]string
addConnCalls map[string]*addConnCall // in-flight addConnIfNeede calls addConnCalls map[string]*addConnCall // in-flight addConnIfNeeded calls
} }
func (p *clientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) { func (p *clientConnPool) GetClientConn(req *http.Request, addr string) (*ClientConn, error) {
@ -60,30 +60,8 @@ const (
noDialOnMiss = false noDialOnMiss = false
) )
// shouldTraceGetConn reports whether getClientConn should call any
// ClientTrace.GetConn hook associated with the http.Request.
//
// This complexity is needed to avoid double calls of the GetConn hook
// during the back-and-forth between net/http and x/net/http2 (when the
// net/http.Transport is upgraded to also speak http2), as well as support
// the case where x/net/http2 is being used directly.
func (p *clientConnPool) shouldTraceGetConn(cc *ClientConn) bool {
// If our Transport wasn't made via ConfigureTransport, always
// trace the GetConn hook if provided, because that means the
// http2 package is being used directly and it's the one
// dialing, as opposed to net/http.
if _, ok := p.t.ConnPool.(noDialClientConnPool); !ok {
return true
}
// Otherwise, only use the GetConn hook if this connection has
// been used previously for other requests. For fresh
// connections, the net/http package does the dialing.
cc.mu.Lock()
defer cc.mu.Unlock()
return cc.nextStreamID == 1
}
func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) { func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMiss bool) (*ClientConn, error) {
// TODO(dneil): Dial a new connection when t.DisableKeepAlives is set?
if isConnectionCloseRequest(req) && dialOnMiss { if isConnectionCloseRequest(req) && dialOnMiss {
// It gets its own connection. // It gets its own connection.
traceGetConn(req, addr) traceGetConn(req, addr)
@ -98,9 +76,13 @@ func (p *clientConnPool) getClientConn(req *http.Request, addr string, dialOnMis
p.mu.Lock() p.mu.Lock()
for _, cc := range p.conns[addr] { for _, cc := range p.conns[addr] {
if cc.ReserveNewRequest() { if cc.ReserveNewRequest() {
if p.shouldTraceGetConn(cc) { // When a connection is presented to us by the net/http package,
// the GetConn hook has already been called.
// Don't call it a second time here.
if !cc.getConnCalled {
traceGetConn(req, addr) traceGetConn(req, addr)
} }
cc.getConnCalled = false
p.mu.Unlock() p.mu.Unlock()
return cc, nil return cc, nil
} }
@ -219,6 +201,7 @@ func (c *addConnCall) run(t *Transport, key string, tc *tls.Conn) {
if err != nil { if err != nil {
c.err = err c.err = err
} else { } else {
cc.getConnCalled = true // already called by the net/http package
p.addConnLocked(key, cc) p.addConnLocked(key, cc)
} }
delete(p.addConnCalls, key) delete(p.addConnCalls, key)

View File

@ -140,12 +140,12 @@ func buildRootHuffmanNode() {
panic("unexpected size") panic("unexpected size")
} }
lazyRootHuffmanNode = newInternalNode() lazyRootHuffmanNode = newInternalNode()
for i, code := range huffmanCodes { // allocate a leaf node for each of the 256 symbols
addDecoderNode(byte(i), code, huffmanCodeLen[i]) leaves := new([256]node)
}
} for sym, code := range huffmanCodes {
codeLen := huffmanCodeLen[sym]
func addDecoderNode(sym byte, code uint32, codeLen uint8) {
cur := lazyRootHuffmanNode cur := lazyRootHuffmanNode
for codeLen > 8 { for codeLen > 8 {
codeLen -= 8 codeLen -= 8
@ -157,8 +157,12 @@ func addDecoderNode(sym byte, code uint32, codeLen uint8) {
} }
shift := 8 - codeLen shift := 8 - codeLen
start, end := int(uint8(code<<shift)), int(1<<shift) start, end := int(uint8(code<<shift)), int(1<<shift)
leaves[sym].sym = byte(sym)
leaves[sym].codeLen = codeLen
for i := start; i < start+end; i++ { for i := start; i < start+end; i++ {
cur.children[i] = &node{sym: sym, codeLen: codeLen} cur.children[i] = &leaves[sym]
}
} }
} }

View File

@ -30,6 +30,17 @@ type pipeBuffer interface {
io.Reader io.Reader
} }
// setBuffer initializes the pipe buffer.
// It has no effect if the pipe is already closed.
func (p *pipe) setBuffer(b pipeBuffer) {
p.mu.Lock()
defer p.mu.Unlock()
if p.err != nil || p.breakErr != nil {
return
}
p.b = b
}
func (p *pipe) Len() int { func (p *pipe) Len() int {
p.mu.Lock() p.mu.Lock()
defer p.mu.Unlock() defer p.mu.Unlock()

View File

@ -2009,7 +2009,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
isConnect := rp.method == "CONNECT" isConnect := rp.method == "CONNECT"
if isConnect { if isConnect {
if rp.path != "" || rp.scheme != "" || rp.authority == "" { if rp.path != "" || rp.scheme != "" || rp.authority == "" {
return nil, nil, streamError(f.StreamID, ErrCodeProtocol) return nil, nil, sc.countError("bad_connect", streamError(f.StreamID, ErrCodeProtocol))
} }
} else if rp.method == "" || rp.path == "" || (rp.scheme != "https" && rp.scheme != "http") { } else if rp.method == "" || rp.path == "" || (rp.scheme != "https" && rp.scheme != "http") {
// See 8.1.2.6 Malformed Requests and Responses: // See 8.1.2.6 Malformed Requests and Responses:

File diff suppressed because it is too large Load Diff

View File

@ -123,6 +123,7 @@ type credentialsFile struct {
ServiceAccountImpersonationURL string `json:"service_account_impersonation_url"` ServiceAccountImpersonationURL string `json:"service_account_impersonation_url"`
CredentialSource externalaccount.CredentialSource `json:"credential_source"` CredentialSource externalaccount.CredentialSource `json:"credential_source"`
QuotaProjectID string `json:"quota_project_id"` QuotaProjectID string `json:"quota_project_id"`
WorkforcePoolUserProject string `json:"workforce_pool_user_project"`
} }
func (f *credentialsFile) jwtConfig(scopes []string, subject string) *jwt.Config { func (f *credentialsFile) jwtConfig(scopes []string, subject string) *jwt.Config {
@ -176,6 +177,7 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar
CredentialSource: f.CredentialSource, CredentialSource: f.CredentialSource,
QuotaProjectID: f.QuotaProjectID, QuotaProjectID: f.QuotaProjectID,
Scopes: params.Scopes, Scopes: params.Scopes,
WorkforcePoolUserProject: f.WorkforcePoolUserProject,
} }
return cfg.TokenSource(ctx) return cfg.TokenSource(ctx)
case "": case "":

View File

@ -53,6 +53,11 @@ type Config struct {
QuotaProjectID string QuotaProjectID string
// Scopes contains the desired scopes for the returned access token. // Scopes contains the desired scopes for the returned access token.
Scopes []string Scopes []string
// The optional workforce pool user project number when the credential
// corresponds to a workforce pool and not a workload identity pool.
// The underlying principal must still have serviceusage.services.use IAM
// permission to use the project for billing/quota.
WorkforcePoolUserProject string
} }
// Each element consists of a list of patterns. validateURLs checks for matches // Each element consists of a list of patterns. validateURLs checks for matches
@ -73,6 +78,7 @@ var (
regexp.MustCompile(`^iamcredentials\.[^\.\s\/\\]+\.googleapis\.com$`), regexp.MustCompile(`^iamcredentials\.[^\.\s\/\\]+\.googleapis\.com$`),
regexp.MustCompile(`^[^\.\s\/\\]+-iamcredentials\.googleapis\.com$`), regexp.MustCompile(`^[^\.\s\/\\]+-iamcredentials\.googleapis\.com$`),
} }
validWorkforceAudiencePattern *regexp.Regexp = regexp.MustCompile(`//iam\.googleapis\.com/locations/[^/]+/workforcePools/`)
) )
func validateURL(input string, patterns []*regexp.Regexp, scheme string) bool { func validateURL(input string, patterns []*regexp.Regexp, scheme string) bool {
@ -86,14 +92,17 @@ func validateURL(input string, patterns []*regexp.Regexp, scheme string) bool {
toTest := parsed.Host toTest := parsed.Host
for _, pattern := range patterns { for _, pattern := range patterns {
if pattern.MatchString(toTest) {
if valid := pattern.MatchString(toTest); valid {
return true return true
} }
} }
return false return false
} }
func validateWorkforceAudience(input string) bool {
return validWorkforceAudiencePattern.MatchString(input)
}
// TokenSource Returns an external account TokenSource struct. This is to be called by package google to construct a google.Credentials. // TokenSource Returns an external account TokenSource struct. This is to be called by package google to construct a google.Credentials.
func (c *Config) TokenSource(ctx context.Context) (oauth2.TokenSource, error) { func (c *Config) TokenSource(ctx context.Context) (oauth2.TokenSource, error) {
return c.tokenSource(ctx, validTokenURLPatterns, validImpersonateURLPatterns, "https") return c.tokenSource(ctx, validTokenURLPatterns, validImpersonateURLPatterns, "https")
@ -115,6 +124,13 @@ func (c *Config) tokenSource(ctx context.Context, tokenURLValidPats []*regexp.Re
} }
} }
if c.WorkforcePoolUserProject != "" {
valid := validateWorkforceAudience(c.Audience)
if !valid {
return nil, fmt.Errorf("oauth2/google: workforce_pool_user_project should not be set for non-workforce pool credentials")
}
}
ts := tokenSource{ ts := tokenSource{
ctx: ctx, ctx: ctx,
conf: c, conf: c,
@ -224,7 +240,15 @@ func (ts tokenSource) Token() (*oauth2.Token, error) {
ClientID: conf.ClientID, ClientID: conf.ClientID,
ClientSecret: conf.ClientSecret, ClientSecret: conf.ClientSecret,
} }
stsResp, err := exchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, nil) var options map[string]interface{}
// Do not pass workforce_pool_user_project when client authentication is used.
// The client ID is sufficient for determining the user project.
if conf.WorkforcePoolUserProject != "" && conf.ClientID == "" {
options = map[string]interface{}{
"userProject": conf.WorkforcePoolUserProject,
}
}
stsResp, err := exchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, options)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View File

@ -530,7 +530,10 @@ func (g *genDeepCopy) deepCopyableInterfacesInner(c *generator.Context, t *types
var ts []*types.Type var ts []*types.Type
for _, intf := range intfs { for _, intf := range intfs {
t := types.ParseFullyQualifiedName(intf) t := types.ParseFullyQualifiedName(intf)
c.AddDir(t.Package) err := c.AddDir(t.Package)
if err != nil {
return nil, err
}
intfT := c.Universe.Type(t) intfT := c.Universe.Type(t)
if intfT == nil { if intfT == nil {
return nil, fmt.Errorf("unknown type %q in %s tag of type %s", intf, interfacesTagName, intfT) return nil, fmt.Errorf("unknown type %q in %s tag of type %s", intf, interfacesTagName, intfT)
@ -864,6 +867,8 @@ func (g *genDeepCopy) doStruct(t *types.Type, sw *generator.SnippetWriter) {
sw.Do("in, out := &in.$.name$, &out.$.name$\n", args) sw.Do("in, out := &in.$.name$, &out.$.name$\n", args)
g.generateFor(ft, sw) g.generateFor(ft, sw)
sw.Do("}\n", nil) sw.Do("}\n", nil)
case uft.Kind == types.Array:
sw.Do("out.$.name$ = in.$.name$\n", args)
case uft.Kind == types.Struct: case uft.Kind == types.Struct:
if ft.IsAssignable() { if ft.IsAssignable() {
sw.Do("out.$.name$ = in.$.name$\n", args) sw.Do("out.$.name$ = in.$.name$\n", args)

View File

@ -318,9 +318,18 @@ func Packages(context *generator.Context, arguments *args.GeneratorArgs) generat
} }
if len(inputTags) == 1 { if len(inputTags) == 1 {
var err error var err error
typesPkg, err = context.AddDirectory(filepath.Join(pkg.Path, inputTags[0]))
inputPath := inputTags[0]
if strings.HasPrefix(inputPath, "./") || strings.HasPrefix(inputPath, "../") {
// this is a relative dir, which will not work under gomodules.
// join with the local package path, but warn
klog.Warningf("relative path %s=%s will not work under gomodule mode; use full package path (as used by 'import') instead", inputTagName, inputPath)
inputPath = filepath.Join(pkg.Path, inputTags[0])
}
typesPkg, err = context.AddDirectory(inputPath)
if err != nil { if err != nil {
klog.Fatalf("cannot import package %s", inputTags[0]) klog.Fatalf("cannot import package %s", inputPath)
} }
// update context.Order to the latest context.Universe // update context.Order to the latest context.Universe
orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)} orderer := namer.Orderer{Namer: namer.NewPublicNamer(1)}

View File

@ -246,6 +246,15 @@ func (s $.type|public$) HasAny(items ...$.type|raw$) bool {
return false return false
} }
// Clone returns a new set which is a copy of the current set.
func (s $.type|public$) Clone() $.type|public$ {
result := make($.type|public$, len(s))
for key := range s {
result.Insert(key)
}
return result
}
// Difference returns a set of objects that are not in s2 // Difference returns a set of objects that are not in s2
// For example: // For example:
// s1 = {a1, a2, a3} // s1 = {a1, a2, a3}
@ -269,10 +278,7 @@ func (s $.type|public$) Difference(s2 $.type|public$) $.type|public$ {
// s1.Union(s2) = {a1, a2, a3, a4} // s1.Union(s2) = {a1, a2, a3, a4}
// s2.Union(s1) = {a1, a2, a3, a4} // s2.Union(s1) = {a1, a2, a3, a4}
func (s1 $.type|public$) Union(s2 $.type|public$) $.type|public$ { func (s1 $.type|public$) Union(s2 $.type|public$) $.type|public$ {
result := New$.type|public$() result := s1.Clone()
for key := range s1 {
result.Insert(key)
}
for key := range s2 { for key := range s2 {
result.Insert(key) result.Insert(key)
} }

View File

@ -87,6 +87,15 @@ func (s Byte) HasAny(items ...byte) bool {
return false return false
} }
// Clone returns a new set which is a copy of the current set.
func (s Byte) Clone() Byte {
result := make(Byte, len(s))
for key := range s {
result.Insert(key)
}
return result
}
// Difference returns a set of objects that are not in s2 // Difference returns a set of objects that are not in s2
// For example: // For example:
// s1 = {a1, a2, a3} // s1 = {a1, a2, a3}
@ -110,10 +119,7 @@ func (s Byte) Difference(s2 Byte) Byte {
// s1.Union(s2) = {a1, a2, a3, a4} // s1.Union(s2) = {a1, a2, a3, a4}
// s2.Union(s1) = {a1, a2, a3, a4} // s2.Union(s1) = {a1, a2, a3, a4}
func (s1 Byte) Union(s2 Byte) Byte { func (s1 Byte) Union(s2 Byte) Byte {
result := NewByte() result := s1.Clone()
for key := range s1 {
result.Insert(key)
}
for key := range s2 { for key := range s2 {
result.Insert(key) result.Insert(key)
} }

View File

@ -87,6 +87,15 @@ func (s Int) HasAny(items ...int) bool {
return false return false
} }
// Clone returns a new set which is a copy of the current set.
func (s Int) Clone() Int {
result := make(Int, len(s))
for key := range s {
result.Insert(key)
}
return result
}
// Difference returns a set of objects that are not in s2 // Difference returns a set of objects that are not in s2
// For example: // For example:
// s1 = {a1, a2, a3} // s1 = {a1, a2, a3}
@ -110,10 +119,7 @@ func (s Int) Difference(s2 Int) Int {
// s1.Union(s2) = {a1, a2, a3, a4} // s1.Union(s2) = {a1, a2, a3, a4}
// s2.Union(s1) = {a1, a2, a3, a4} // s2.Union(s1) = {a1, a2, a3, a4}
func (s1 Int) Union(s2 Int) Int { func (s1 Int) Union(s2 Int) Int {
result := NewInt() result := s1.Clone()
for key := range s1 {
result.Insert(key)
}
for key := range s2 { for key := range s2 {
result.Insert(key) result.Insert(key)
} }

View File

@ -87,6 +87,15 @@ func (s Int64) HasAny(items ...int64) bool {
return false return false
} }
// Clone returns a new set which is a copy of the current set.
func (s Int64) Clone() Int64 {
result := make(Int64, len(s))
for key := range s {
result.Insert(key)
}
return result
}
// Difference returns a set of objects that are not in s2 // Difference returns a set of objects that are not in s2
// For example: // For example:
// s1 = {a1, a2, a3} // s1 = {a1, a2, a3}
@ -110,10 +119,7 @@ func (s Int64) Difference(s2 Int64) Int64 {
// s1.Union(s2) = {a1, a2, a3, a4} // s1.Union(s2) = {a1, a2, a3, a4}
// s2.Union(s1) = {a1, a2, a3, a4} // s2.Union(s1) = {a1, a2, a3, a4}
func (s1 Int64) Union(s2 Int64) Int64 { func (s1 Int64) Union(s2 Int64) Int64 {
result := NewInt64() result := s1.Clone()
for key := range s1 {
result.Insert(key)
}
for key := range s2 { for key := range s2 {
result.Insert(key) result.Insert(key)
} }

View File

@ -87,6 +87,15 @@ func (s String) HasAny(items ...string) bool {
return false return false
} }
// Clone returns a new set which is a copy of the current set.
func (s String) Clone() String {
result := make(String, len(s))
for key := range s {
result.Insert(key)
}
return result
}
// Difference returns a set of objects that are not in s2 // Difference returns a set of objects that are not in s2
// For example: // For example:
// s1 = {a1, a2, a3} // s1 = {a1, a2, a3}
@ -110,10 +119,7 @@ func (s String) Difference(s2 String) String {
// s1.Union(s2) = {a1, a2, a3, a4} // s1.Union(s2) = {a1, a2, a3, a4}
// s2.Union(s1) = {a1, a2, a3, a4} // s2.Union(s1) = {a1, a2, a3, a4}
func (s1 String) Union(s2 String) String { func (s1 String) Union(s2 String) String {
result := NewString() result := s1.Clone()
for key := range s1 {
result.Insert(key)
}
for key := range s2 { for key := range s2 {
result.Insert(key) result.Insert(key)
} }

11
vendor/k8s.io/gengo/namer/namer.go generated vendored
View File

@ -17,7 +17,9 @@ limitations under the License.
package namer package namer
import ( import (
"fmt"
"path/filepath" "path/filepath"
"strconv"
"strings" "strings"
"k8s.io/gengo/types" "k8s.io/gengo/types"
@ -246,6 +248,12 @@ func (ns *NameStrategy) Name(t *types.Type) string {
"Slice", "Slice",
ns.removePrefixAndSuffix(ns.Name(t.Elem)), ns.removePrefixAndSuffix(ns.Name(t.Elem)),
}, ns.Suffix) }, ns.Suffix)
case types.Array:
name = ns.Join(ns.Prefix, []string{
"Array",
ns.removePrefixAndSuffix(fmt.Sprintf("%d", t.Len)),
ns.removePrefixAndSuffix(ns.Name(t.Elem)),
}, ns.Suffix)
case types.Pointer: case types.Pointer:
name = ns.Join(ns.Prefix, []string{ name = ns.Join(ns.Prefix, []string{
"Pointer", "Pointer",
@ -340,6 +348,9 @@ func (r *rawNamer) Name(t *types.Type) string {
name = "map[" + r.Name(t.Key) + "]" + r.Name(t.Elem) name = "map[" + r.Name(t.Key) + "]" + r.Name(t.Elem)
case types.Slice: case types.Slice:
name = "[]" + r.Name(t.Elem) name = "[]" + r.Name(t.Elem)
case types.Array:
l := strconv.Itoa(int(t.Len))
name = "[" + l + "]" + r.Name(t.Elem)
case types.Pointer: case types.Pointer:
name = "*" + r.Name(t.Elem) name = "*" + r.Name(t.Elem)
case types.Struct: case types.Struct:

15
vendor/k8s.io/gengo/parser/parse.go generated vendored
View File

@ -269,7 +269,11 @@ func (b *Builder) AddDirTo(dir string, u *types.Universe) error {
if _, err := b.importPackage(dir, true); err != nil { if _, err := b.importPackage(dir, true); err != nil {
return err return err
} }
return b.findTypesIn(canonicalizeImportPath(b.buildPackages[dir].ImportPath), u) pkg, ok := b.buildPackages[dir]
if !ok {
return fmt.Errorf("no such package: %q", dir)
}
return b.findTypesIn(canonicalizeImportPath(pkg.ImportPath), u)
} }
// AddDirectoryTo adds an entire directory to a given Universe. Unlike AddDir, // AddDirectoryTo adds an entire directory to a given Universe. Unlike AddDir,
@ -283,7 +287,11 @@ func (b *Builder) AddDirectoryTo(dir string, u *types.Universe) (*types.Package,
if _, err := b.importPackage(dir, true); err != nil { if _, err := b.importPackage(dir, true); err != nil {
return nil, err return nil, err
} }
path := canonicalizeImportPath(b.buildPackages[dir].ImportPath) pkg, ok := b.buildPackages[dir]
if !ok {
return nil, fmt.Errorf("no such package: %q", dir)
}
path := canonicalizeImportPath(pkg.ImportPath)
if err := b.findTypesIn(path, u); err != nil { if err := b.findTypesIn(path, u); err != nil {
return nil, err return nil, err
} }
@ -723,8 +731,7 @@ func (b *Builder) walkType(u types.Universe, useName *types.Name, in tc.Type) *t
} }
out.Kind = types.Array out.Kind = types.Array
out.Elem = b.walkType(u, nil, t.Elem()) out.Elem = b.walkType(u, nil, t.Elem())
// TODO: need to store array length, otherwise raw type name out.Len = in.(*tc.Array).Len()
// cannot be properly written.
return out return out
case *tc.Chan: case *tc.Chan:
out := u.Type(name) out := u.Type(name)

8
vendor/k8s.io/gengo/types/types.go generated vendored
View File

@ -83,9 +83,11 @@ const (
// Interface is any type that could have differing types at run time. // Interface is any type that could have differing types at run time.
Interface Kind = "Interface" Interface Kind = "Interface"
// Array is just like slice, but has a fixed length.
Array Kind = "Array"
// The remaining types are included for completeness, but are not well // The remaining types are included for completeness, but are not well
// supported. // supported.
Array Kind = "Array" // Array is just like slice, but has a fixed length.
Chan Kind = "Chan" Chan Kind = "Chan"
Func Kind = "Func" Func Kind = "Func"
@ -350,7 +352,9 @@ type Type struct {
// TODO: Add: // TODO: Add:
// * channel direction // * channel direction
// * array length
// If Kind == Array
Len int64
} }
// String returns the name of the type. // String returns the name of the type.

View File

@ -19,7 +19,7 @@
# called from command line. # called from command line.
# Exit early with a message if Bash version is below 4 # Exit early with a message if Bash version is below 4
if [ "${BASH_VERSINFO:-0}" -le 4 ]; then if [ "${BASH_VERSINFO:-0}" -lt 4 ]; then
echo "library.sh script needs Bash version >=4 to run" echo "library.sh script needs Bash version >=4 to run"
exit 1 exit 1
fi fi

20
vendor/modules.txt vendored
View File

@ -1,4 +1,4 @@
# cloud.google.com/go v0.96.0 # cloud.google.com/go v0.97.0
cloud.google.com/go/compute/metadata cloud.google.com/go/compute/metadata
# contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d # contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d
contrib.go.opencensus.io/exporter/ocagent contrib.go.opencensus.io/exporter/ocagent
@ -259,7 +259,7 @@ go.uber.org/zap/zapcore
# golang.org/x/mod v0.4.2 # golang.org/x/mod v0.4.2
golang.org/x/mod/module golang.org/x/mod/module
golang.org/x/mod/semver golang.org/x/mod/semver
# golang.org/x/net v0.0.0-20210928044308-7d9f5e0b762b # golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f
golang.org/x/net/context golang.org/x/net/context
golang.org/x/net/context/ctxhttp golang.org/x/net/context/ctxhttp
golang.org/x/net/http/httpguts golang.org/x/net/http/httpguts
@ -269,7 +269,7 @@ golang.org/x/net/http2/hpack
golang.org/x/net/idna golang.org/x/net/idna
golang.org/x/net/internal/timeseries golang.org/x/net/internal/timeseries
golang.org/x/net/trace golang.org/x/net/trace
# golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f # golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1
golang.org/x/oauth2 golang.org/x/oauth2
golang.org/x/oauth2/authhandler golang.org/x/oauth2/authhandler
golang.org/x/oauth2/google golang.org/x/oauth2/google
@ -333,7 +333,7 @@ google.golang.org/appengine/internal/modules
google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/remote_api
google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/internal/urlfetch
google.golang.org/appengine/urlfetch google.golang.org/appengine/urlfetch
# google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0 # google.golang.org/genproto v0.0.0-20211016002631-37fc39342514
google.golang.org/genproto/googleapis/api/httpbody google.golang.org/genproto/googleapis/api/httpbody
google.golang.org/genproto/googleapis/rpc/status google.golang.org/genproto/googleapis/rpc/status
google.golang.org/genproto/protobuf/field_mask google.golang.org/genproto/protobuf/field_mask
@ -701,7 +701,7 @@ k8s.io/code-generator/cmd/set-gen
k8s.io/code-generator/pkg/namer k8s.io/code-generator/pkg/namer
k8s.io/code-generator/pkg/util k8s.io/code-generator/pkg/util
k8s.io/code-generator/third_party/forked/golang/reflect k8s.io/code-generator/third_party/forked/golang/reflect
# k8s.io/gengo v0.0.0-20210203185629-de9496dff47b # k8s.io/gengo v0.0.0-20210915205010-39e73c8a59cd
k8s.io/gengo/args k8s.io/gengo/args
k8s.io/gengo/examples/deepcopy-gen/generators k8s.io/gengo/examples/deepcopy-gen/generators
k8s.io/gengo/examples/defaulter-gen/generators k8s.io/gengo/examples/defaulter-gen/generators
@ -728,7 +728,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer k8s.io/utils/integer
k8s.io/utils/pointer k8s.io/utils/pointer
k8s.io/utils/trace k8s.io/utils/trace
# knative.dev/eventing v0.26.1-0.20211018174236-a34aaa09f7d2 # knative.dev/eventing v0.26.1-0.20211019092333-7af98bbb4491
## explicit ## explicit
knative.dev/eventing/pkg/apis/config knative.dev/eventing/pkg/apis/config
knative.dev/eventing/pkg/apis/duck knative.dev/eventing/pkg/apis/duck
@ -754,10 +754,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/v1/fake
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2 knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2
knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake knative.dev/eventing/pkg/client/clientset/versioned/typed/sources/v1beta2/fake
# knative.dev/hack v0.0.0-20211018110626-47ac3b032e60 # knative.dev/hack v0.0.0-20211019034732-ced8ce706528
## explicit ## explicit
knative.dev/hack knative.dev/hack
# knative.dev/networking v0.0.0-20211018141626-7e3965bfab7b # knative.dev/networking v0.0.0-20211019132235-c8d647402afa
## explicit ## explicit
knative.dev/networking/pkg knative.dev/networking/pkg
knative.dev/networking/pkg/apis/networking knative.dev/networking/pkg/apis/networking
@ -765,7 +765,7 @@ knative.dev/networking/pkg/apis/networking/v1alpha1
knative.dev/networking/pkg/client/clientset/versioned knative.dev/networking/pkg/client/clientset/versioned
knative.dev/networking/pkg/client/clientset/versioned/scheme knative.dev/networking/pkg/client/clientset/versioned/scheme
knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1 knative.dev/networking/pkg/client/clientset/versioned/typed/networking/v1alpha1
# knative.dev/pkg v0.0.0-20211018141937-a34efd6b409d # knative.dev/pkg v0.0.0-20211019132235-ba2b2b1bf268
## explicit ## explicit
knative.dev/pkg/apis knative.dev/pkg/apis
knative.dev/pkg/apis/duck knative.dev/pkg/apis/duck
@ -814,7 +814,7 @@ knative.dev/pkg/tracing/config
knative.dev/pkg/tracing/propagation knative.dev/pkg/tracing/propagation
knative.dev/pkg/tracing/propagation/tracecontextb3 knative.dev/pkg/tracing/propagation/tracecontextb3
knative.dev/pkg/tracker knative.dev/pkg/tracker
# knative.dev/serving v0.26.1-0.20211018142437-2dc26f102ade # knative.dev/serving v0.26.1-0.20211019063033-2446281d75da
## explicit ## explicit
knative.dev/serving/pkg/apis/autoscaling knative.dev/serving/pkg/apis/autoscaling
knative.dev/serving/pkg/apis/autoscaling/v1alpha1 knative.dev/serving/pkg/apis/autoscaling/v1alpha1