Skip to content

Commit

Permalink
upgrade to latest dependencies (#224)
Browse files Browse the repository at this point in the history
bumping knative.dev/pkg 9d92ea1...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)
bumping knative.dev/eventing 3ebce0d...8f35d42:
  > 8f35d42 last control plane test for channel (# 5182)
  > 2d4951e redo smoketests, move one broker test (# 5187)
  > 5aacf4f Channel Data Plane Conformance Template (# 5183)
  > 6c632d1 add post 022 job to remove pingsource finalizer (# 5008)
  > ae36e5b upgrade to latest dependencies (# 5156)
  > ab0b9b0 Update common github actions (# 5186)
  > 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)

Signed-off-by: Knative Automation <automation@knative.team>
  • Loading branch information
knative-automation authored Apr 7, 2021
1 parent 8dc4445 commit 87aa71f
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 21 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ require (
k8s.io/client-go v0.19.7
k8s.io/code-generator v0.19.7
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6
knative.dev/eventing v0.21.1-0.20210325205419-3ebce0d42aa2
knative.dev/eventing v0.22.0
knative.dev/hack v0.0.0-20210325223819-b6ab329907d3
knative.dev/pkg v0.0.0-20210329065222-9d92ea16c0d3
knative.dev/pkg v0.0.0-20210331065221-952fdd90dbb0
)

replace (
Expand Down
17 changes: 7 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1237,20 +1237,17 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6 h1:+WnxoVtG8TMiudHBSEtrVL
k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o=
k8s.io/utils v0.0.0-20200729134348-d5654de09c73 h1:uJmqzgNWG7XyClnU/mLPBWwfKKF1K8Hf8whTseBgJcg=
k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
knative.dev/eventing v0.21.1-0.20210325205419-3ebce0d42aa2 h1:d6aFEshhPxgdE83dLAzv0Rgyx7lfRjIaj56Gg+OJJ4I=
knative.dev/eventing v0.21.1-0.20210325205419-3ebce0d42aa2/go.mod h1:YJpz0vSqatCU3XiaoIhfeQWpX00C6yN15XQJ6y4fCdE=
knative.dev/hack v0.0.0-20210317214554-58edbdc42966 h1:qSnMQkq4gnhD5Hb8Mpfn7IrpkiQFhXXFPOA7uIl2lAc=
knative.dev/hack v0.0.0-20210317214554-58edbdc42966/go.mod h1:PHt8x8yX5Z9pPquBEfIj0X66f8iWkWfR0S/sarACJrI=
knative.dev/eventing v0.22.0 h1:esDaddfSmiVhLKDnUCVVunSdNeHklVEz0fsqs3NupuQ=
knative.dev/eventing v0.22.0/go.mod h1:LOG7bh0eZQkbYANcnORwke6Yy6aUu62o8GeByaOFfRQ=
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-20210317214554-58edbdc42966/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/pkg v0.0.0-20210318052054-dfeeb1817679 h1:5yTTe0oW2/a13DU2b4U42h7lSHZLWy32a/8DEkkH7C4=
knative.dev/pkg v0.0.0-20210318052054-dfeeb1817679/go.mod h1:o1aTlbc+h60DP9P6nd/WmP99Ny9Ls3U/JIjL4xMgqpw=
knative.dev/pkg v0.0.0-20210323202917-b558677ab034 h1:Uj1gJL+G6cEInJ7dbCSrtxAhtxoLLjIjRCA7xeQyUrQ=
knative.dev/pkg v0.0.0-20210323202917-b558677ab034/go.mod h1:o1aTlbc+h60DP9P6nd/WmP99Ny9Ls3U/JIjL4xMgqpw=
knative.dev/hack/schema v0.0.0-20210325223819-b6ab329907d3/go.mod h1:ffjwmdcrH5vN3mPhO8RrF2KfNnbHeCE2C60A+2cv3U0=
knative.dev/pkg v0.0.0-20210329065222-9d92ea16c0d3 h1:JMuMvGa1ke9b8nBcDntQyy1fsJgBy/R7/La3kxiHSGg=
knative.dev/pkg v0.0.0-20210329065222-9d92ea16c0d3/go.mod h1:PD5g8hUCXq6iR3tILjmZeJBvQfXGnHMPKryq54qHJhg=
knative.dev/reconciler-test v0.0.0-20210323181117-2afde0d529e7/go.mod h1:QSd2hWDDwFh+9AHOkiECsj2ZY2DGJBKnj6aT6LITBuw=
knative.dev/pkg v0.0.0-20210331062321-6317ec6066f4/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-20210329214021-2a67496462a4/go.mod h1:qLfJMHc0i9ENTSet/SUp/FcQm4QVfNTX8ZC//aVQN0M=
pgregory.net/rapid v0.3.3/go.mod h1:UYpPVyjFHzYBGHIxLFoupi8vwk6rXNzRY9OMvVxFIOU=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
Expand Down
11 changes: 10 additions & 1 deletion vendor/knative.dev/eventing/pkg/adapter/v2/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"log"
"net/http"
"strconv"
"sync"
"time"

cloudevents "github.com/cloudevents/sdk-go/v2"
Expand Down Expand Up @@ -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)
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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)
}
Expand All @@ -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
Expand All @@ -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(),
Expand All @@ -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)
}()

Expand Down
4 changes: 2 additions & 2 deletions vendor/knative.dev/pkg/leaderelection/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
3 changes: 2 additions & 1 deletion vendor/knative.dev/pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion vendor/knative.dev/pkg/webhook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()),

Expand Down
3 changes: 2 additions & 1 deletion vendor/knative.dev/pkg/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"crypto/tls"
"errors"
"fmt"
"html"
"net/http"
"time"

Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ k8s.io/utils/buffer
k8s.io/utils/integer
k8s.io/utils/pointer
k8s.io/utils/trace
# knative.dev/eventing v0.21.1-0.20210325205419-3ebce0d42aa2
# knative.dev/eventing v0.22.0
## explicit
knative.dev/eventing/pkg/adapter/v2
knative.dev/eventing/pkg/adapter/v2/util/crstatusevent
Expand Down Expand Up @@ -1079,7 +1079,7 @@ knative.dev/eventing/pkg/kncloudevents
# knative.dev/hack v0.0.0-20210325223819-b6ab329907d3
## explicit
knative.dev/hack
# knative.dev/pkg v0.0.0-20210329065222-9d92ea16c0d3
# knative.dev/pkg v0.0.0-20210331065221-952fdd90dbb0
## explicit
knative.dev/pkg/apis
knative.dev/pkg/apis/duck
Expand Down

0 comments on commit 87aa71f

Please sign in to comment.