Skip to content

Commit

Permalink
upgrade to latest dependencies (knative#13227)
Browse files Browse the repository at this point in the history
bumping knative.dev/networking 50ab590...e51df7c:
  > e51df7c upgrade to latest dependencies (# 703)
  > cb90216 upgrade to latest dependencies (# 702)
bumping knative.dev/pkg d02dcd0...4a03844:
  > 4a03844 fix double close of channel (# 2575)
  > f78a006 upgrade to latest dependencies (# 2573)
bumping knative.dev/caching 01b9a42...9df7bb7:
  > 9df7bb7 upgrade to latest dependencies (# 670)
  > 21a5534 upgrade to latest dependencies (# 669)
bumping knative.dev/control-protocol 75cf857...4dcc992:
  > 4dcc992 upgrade to latest dependencies (# 200)
  > b90407f Update actions (# 202)
  > 75e0629 Update community files (# 201)
  > 22f4855 bump go1.18 (# 203)

Signed-off-by: Knative Automation <[email protected]>

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation authored Aug 18, 2022
1 parent d89869e commit d60e5e7
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 42 deletions.
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ require (
k8s.io/client-go v0.23.9
k8s.io/code-generator v0.23.9
k8s.io/kube-openapi v0.0.0-20220124234850-424119656bbf
knative.dev/caching v0.0.0-20220815133931-01b9a42d9bc0
knative.dev/control-protocol v0.0.0-20220728062837-75cf857da76a
knative.dev/caching v0.0.0-20220818010648-9df7bb739739
knative.dev/control-protocol v0.0.0-20220816170248-4dcc992670c7
knative.dev/hack v0.0.0-20220815132133-e9a8475f4329
knative.dev/networking v0.0.0-20220815134434-50ab5901247f
knative.dev/pkg v0.0.0-20220815215248-d02dcd0b0391
knative.dev/networking v0.0.0-20220818010248-e51df7cdf571
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15
sigs.k8s.io/yaml v1.3.0
)

Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1716,16 +1716,16 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc=
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/caching v0.0.0-20220815133931-01b9a42d9bc0 h1:kyA3GjZskCFcPQ7i0IKgP6nYIrhW1MNiNf0FhTOC0uQ=
knative.dev/caching v0.0.0-20220815133931-01b9a42d9bc0/go.mod h1:4fEI+lUSAaVmMtI7oy5F+l9s1OkZTRJTzqa5O+IqIZc=
knative.dev/control-protocol v0.0.0-20220728062837-75cf857da76a h1:I4IlZJA6BBsw/eSrt4qJQ9GmjDNC+HCvmccq7vUO70E=
knative.dev/control-protocol v0.0.0-20220728062837-75cf857da76a/go.mod h1:+5+qcOXiZN0gs7a8a4NaTJd5sAMNipzD41MNzxRKrQs=
knative.dev/caching v0.0.0-20220818010648-9df7bb739739 h1:SS824wVH+IFmNDnTNFNOxfaNIpzWqKJELeDmDDDKNjQ=
knative.dev/caching v0.0.0-20220818010648-9df7bb739739/go.mod h1:q5//FJ59aFRK42YiLSaxgBzH18DBhrtSc7UWapwXT9Q=
knative.dev/control-protocol v0.0.0-20220816170248-4dcc992670c7 h1:sNKv7gpdpItJKV5a698ycPBnOWx8cMppRZ5UYv2bUp4=
knative.dev/control-protocol v0.0.0-20220816170248-4dcc992670c7/go.mod h1:y0VofurQfJXOuxjcwI4MRkQrPmA/1XbOhVMNGokChUY=
knative.dev/hack v0.0.0-20220815132133-e9a8475f4329 h1:/X969GuiLDMgb+tyx5qZDLxGhENkS3OLPj/VCSW+Ul0=
knative.dev/hack v0.0.0-20220815132133-e9a8475f4329/go.mod h1:t/azP8I/Cygaw+87O7rkAPrNRjCelmtfSzWzu/9TM7I=
knative.dev/networking v0.0.0-20220815134434-50ab5901247f h1:7Huzbeu2IV06ne1MJsRx1OSU6qFQXRgFsPbxoPaKfOA=
knative.dev/networking v0.0.0-20220815134434-50ab5901247f/go.mod h1:wwhZW0N+qYb81ZsgDI/yxS1dwN+hoi++m01ft+HxG08=
knative.dev/pkg v0.0.0-20220815215248-d02dcd0b0391 h1:ym5kE6447gIqw3yp1CIGc94IRN8w/K+EVJcUZCgyIv0=
knative.dev/pkg v0.0.0-20220815215248-d02dcd0b0391/go.mod h1:nBMKMJvyoaJdkpUrjwLVs/DwaP6d73R3UkXK6lblJyE=
knative.dev/networking v0.0.0-20220818010248-e51df7cdf571 h1:Lu/TsJjxg1p+2CMr2LNHEdEFBNHYjDoZv2f1QZoM8jg=
knative.dev/networking v0.0.0-20220818010248-e51df7cdf571/go.mod h1:m3ataWRwmbHjOY9sCFvcDWRNLVITxVl0fH0RxdCa4jE=
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15 h1:GNmzHVaUo3zoi/wtIN71LPQaWy6DdoYzmb+GIq2s4fw=
knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15/go.mod h1:YLjXbkQLlGHok+u0FLfMbBHFzY9WGu3GHhnrptoAy8I=
mvdan.cc/gofumpt v0.1.1/go.mod h1:yXG1r1WqZVKWbVRtBWKWX9+CxGYfA51nSomhM0woR48=
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc=
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4=
Expand Down
47 changes: 22 additions & 25 deletions vendor/knative.dev/pkg/network/handlers/drain.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ type Drainer struct {
// timer is used to orchestrate the drain.
timer timer

// used to synchronize callers of Drain and Reset
ch chan struct{}
// used to synchronize callers of Drain
drainCh chan struct{}

// used to synchronize Drain and Reset
resetCh chan struct{}

// HealthCheckUAPrefixes are the additional user agent prefixes that trigger the
// drainer's health check
Expand Down Expand Up @@ -118,41 +121,35 @@ func (d *Drainer) Drain() {
ch := func() chan struct{} {
d.Lock()
defer d.Unlock()
if d.ch != nil {
return d.ch
if d.drainCh != nil {
return d.drainCh
}

if d.QuietPeriod <= 0 {
d.QuietPeriod = network.DefaultDrainTimeout
}

timer := newTimer(d.QuietPeriod)
ch := make(chan struct{})
drainCh := make(chan struct{})
resetCh := make(chan struct{})

go func() {
select {
case <-ch:
// closed by reset
case <-resetCh:
case <-timer.tickChan():
close(ch)
}
close(drainCh)
}()

d.ch = ch
d.drainCh = drainCh
d.resetCh = resetCh
d.timer = timer
return ch
return drainCh
}()

<-ch
}

func drainTimer(tc <-chan time.Time) {
select {
case <-tc:
default:
}
}

// isHealthcheckRequest validates if the request has a user agent that is for healthcheck
func (d *Drainer) isHealthCheckRequest(r *http.Request) bool {
if network.IsKubeletProbe(r) {
Expand All @@ -175,16 +172,16 @@ func (d *Drainer) Reset() {
defer d.Unlock()

if d.timer != nil {
if d.timer.Stop() {
d.timer = nil
} else {
drainTimer(d.timer.tickChan())
}
d.timer.Stop()
d.timer = nil
}

if d.ch != nil {
close(d.ch)
d.ch = nil
if d.resetCh != nil {
close(d.resetCh)
d.resetCh = nil
}
if d.drainCh != nil {
d.drainCh = nil
}
}

Expand Down
10 changes: 5 additions & 5 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,7 @@ k8s.io/utils/lru
k8s.io/utils/net
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/caching v0.0.0-20220815133931-01b9a42d9bc0
# knative.dev/caching v0.0.0-20220818010648-9df7bb739739
## explicit; go 1.18
knative.dev/caching/config
knative.dev/caching/pkg/apis/caching
Expand All @@ -1200,15 +1200,15 @@ knative.dev/caching/pkg/client/injection/informers/caching/v1alpha1/image/fake
knative.dev/caching/pkg/client/injection/informers/factory
knative.dev/caching/pkg/client/injection/informers/factory/fake
knative.dev/caching/pkg/client/listers/caching/v1alpha1
# knative.dev/control-protocol v0.0.0-20220728062837-75cf857da76a
## explicit; go 1.17
# knative.dev/control-protocol v0.0.0-20220816170248-4dcc992670c7
## explicit; go 1.18
knative.dev/control-protocol/pkg/certificates
knative.dev/control-protocol/pkg/certificates/reconciler
# knative.dev/hack v0.0.0-20220815132133-e9a8475f4329
## explicit; go 1.17
knative.dev/hack
knative.dev/hack/shell
# knative.dev/networking v0.0.0-20220815134434-50ab5901247f
# knative.dev/networking v0.0.0-20220818010248-e51df7cdf571
## explicit; go 1.18
knative.dev/networking/config
knative.dev/networking/pkg
Expand Down Expand Up @@ -1245,7 +1245,7 @@ knative.dev/networking/pkg/http/stats
knative.dev/networking/pkg/ingress
knative.dev/networking/pkg/k8s
knative.dev/networking/pkg/prober
# knative.dev/pkg v0.0.0-20220815215248-d02dcd0b0391
# knative.dev/pkg v0.0.0-20220818004048-4a03844c0b15
## explicit; go 1.18
knative.dev/pkg/apiextensions/storageversion
knative.dev/pkg/apiextensions/storageversion/cmd/migrate
Expand Down

0 comments on commit d60e5e7

Please sign in to comment.