From 8cbb6e24615838668d73228d0a65082bf7a7669d Mon Sep 17 00:00:00 2001 From: Knative Automation Date: Thu, 22 Oct 2020 01:37:21 +0000 Subject: [PATCH] upgrade to latest dependencies Signed-off-by: Knative Automation --- go.mod | 4 +-- go.sum | 11 +++---- .../pkg/configmap/hash-gen/main.go | 2 +- .../knative.dev/pkg/controller/controller.go | 2 +- vendor/knative.dev/pkg/kmeta/names.go | 6 ++-- vendor/knative.dev/pkg/metrics/config.go | 4 +-- vendor/knative.dev/pkg/reconciler/events.go | 2 +- vendor/knative.dev/pkg/test/gcs/gcs.go | 2 +- .../knative.dev/pkg/test/logging/tlogger.go | 2 +- .../pkg/test/mako/config/benchmark.go | 2 +- .../perf-tests/pkg/benchmark.go | 2 +- .../knative.dev/pkg/tracing/config/tracing.go | 4 +-- .../knative.dev/test-infra/scripts/library.sh | 31 ++++++++----------- vendor/modules.txt | 4 +-- 14 files changed, 36 insertions(+), 42 deletions(-) diff --git a/go.mod b/go.mod index cf0df9da9da..af595ca0183 100644 --- a/go.mod +++ b/go.mod @@ -38,8 +38,8 @@ require ( k8s.io/apiserver v0.18.8 k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible k8s.io/utils v0.0.0-20200603063816-c1c6865ac451 - knative.dev/pkg v0.0.0-20201020152859-5c30f4882d0a - knative.dev/test-infra v0.0.0-20201020062259-cd8625126729 + knative.dev/pkg v0.0.0-20201021200832-f492d0877abf + knative.dev/test-infra v0.0.0-20201022003632-7d3ea6019158 sigs.k8s.io/yaml v1.2.0 ) diff --git a/go.sum b/go.sum index 411a581baef..a1bb105556d 100644 --- a/go.sum +++ b/go.sum @@ -1853,17 +1853,16 @@ knative.dev/pkg v0.0.0-20200505191044-3da93ebb24c2/go.mod h1:Q6sL35DdGs8hIQZKdaC knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV/bpoTEM1o89MwYFC4YJXl3GY= knative.dev/pkg v0.0.0-20200528142800-1c6815d7e4c9/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA= knative.dev/pkg v0.0.0-20200711004937-22502028e31a/go.mod h1:AqAJV6rYi8IGikDjJ/9ZQd9qKdkXVlesVnVjwx62YB8= -knative.dev/pkg v0.0.0-20201020152859-5c30f4882d0a h1:gTofu/rDZAfsVFE2ngyT1+2pQh/rab/SSdf1gVQWGoQ= -knative.dev/pkg v0.0.0-20201020152859-5c30f4882d0a/go.mod h1:Gd7eJYKYPveffVad0/wImHpQSYn+Pt9q09HGJyL/b54= +knative.dev/pkg v0.0.0-20201021200832-f492d0877abf h1:WmepjYVvRFzJthX/t5YU6fNgkEUOcAYTFWen7nJVofs= +knative.dev/pkg v0.0.0-20201021200832-f492d0877abf/go.mod h1:8Ryvgpx71FnHPVaB+DEXEKOJfA/sc9iO8mjoKxsrIiE= knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ= knative.dev/test-infra v0.0.0-20200505052144-5ea2f705bb55/go.mod h1:WqF1Azka+FxPZ20keR2zCNtiQA1MP9ZB4BH4HuI+SIU= knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE= knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT3hHhVQm3dmtbuWvIDP7qzgtqxA3/2pE= knative.dev/test-infra v0.0.0-20200707183444-aed09e56ddc7/go.mod h1:RjYAhXnZqeHw9+B0zsbqSPlae0lCvjekO/nw5ZMpLCs= -knative.dev/test-infra v0.0.0-20201015231956-d236fb0ea9ff h1:I8tkQx28wNs6v/ymlGv6oKQFASCFHTgJtgo7dvv5XII= -knative.dev/test-infra v0.0.0-20201015231956-d236fb0ea9ff/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0= -knative.dev/test-infra v0.0.0-20201020062259-cd8625126729 h1:4epaoAKCa9R7ckZwBRNDRwvkZDmLl1LwwwSRyhx8idI= -knative.dev/test-infra v0.0.0-20201020062259-cd8625126729/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0= +knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0= +knative.dev/test-infra v0.0.0-20201022003632-7d3ea6019158 h1:i6DIeWY1imJVNS6OH+VcBvYpVOkYWDe/AR2rUYTxcxE= +knative.dev/test-infra v0.0.0-20201022003632-7d3ea6019158/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0= 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= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= diff --git a/vendor/knative.dev/pkg/configmap/hash-gen/main.go b/vendor/knative.dev/pkg/configmap/hash-gen/main.go index bde4f787132..5846167f98f 100644 --- a/vendor/knative.dev/pkg/configmap/hash-gen/main.go +++ b/vendor/knative.dev/pkg/configmap/hash-gen/main.go @@ -49,7 +49,7 @@ func processFile(fileName string) error { return err } - // nolint:gosec // This is not security critical so open permissions are fine. + //nolint:gosec // This is not security critical so open permissions are fine. if err := ioutil.WriteFile(fileName, out, 0644); err != nil { return fmt.Errorf("failed to write file: %w", err) } diff --git a/vendor/knative.dev/pkg/controller/controller.go b/vendor/knative.dev/pkg/controller/controller.go index 333254440af..8ccee7a1481 100644 --- a/vendor/knative.dev/pkg/controller/controller.go +++ b/vendor/knative.dev/pkg/controller/controller.go @@ -207,7 +207,7 @@ type Impl struct { // ControllerOptions encapsulates options for creating a new controller, // including throttling and stats behavior. -type ControllerOptions struct { //nolint for backcompat. +type ControllerOptions struct { //nolint // for backcompat. WorkQueueName string Logger *zap.SugaredLogger Reporter StatsReporter diff --git a/vendor/knative.dev/pkg/kmeta/names.go b/vendor/knative.dev/pkg/kmeta/names.go index 43d12de803b..eeaa57aef43 100644 --- a/vendor/knative.dev/pkg/kmeta/names.go +++ b/vendor/knative.dev/pkg/kmeta/names.go @@ -17,7 +17,7 @@ limitations under the license. package kmeta import ( - "crypto/md5" // nolint:gosec // No strong cryptography needed. + "crypto/md5" //nolint:gosec // No strong cryptography needed. "fmt" "strings" ) @@ -42,7 +42,7 @@ func ChildName(parent, suffix string) string { // If the suffix is longer than the longest allowed suffix, then // we hash the whole combined string and use that as the suffix. if head-len(suffix) <= 0 { - // nolint:gosec // No strong cryptography needed. + //nolint:gosec // No strong cryptography needed. h := md5.Sum([]byte(parent + suffix)) // 1. trim parent, if needed if head < len(parent) { @@ -59,7 +59,7 @@ func ChildName(parent, suffix string) string { // remove it. return strings.TrimRight(ret, "-") } - // nolint:gosec // No strong cryptography needed. + //nolint:gosec // No strong cryptography needed. n = fmt.Sprintf("%s%x", parent[:head-len(suffix)], md5.Sum([]byte(parent))) } return n + suffix diff --git a/vendor/knative.dev/pkg/metrics/config.go b/vendor/knative.dev/pkg/metrics/config.go index 8eb829775bb..8214bde406f 100644 --- a/vendor/knative.dev/pkg/metrics/config.go +++ b/vendor/knative.dev/pkg/metrics/config.go @@ -346,7 +346,7 @@ func prometheusPort() (int, error) { // JsonToMetricsOptions converts a json string of a // ExporterOptions. Returns a non-nil ExporterOptions always. -func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { // nolint No rename due to backwards incompatibility. +func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { //nolint // No rename due to backwards incompatibility. var opts ExporterOptions if jsonOpts == "" { return nil, errors.New("json options string is empty") @@ -360,7 +360,7 @@ func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { // nolint } // MetricsOptionsToJson converts a ExporterOptions to a json string. -func MetricsOptionsToJson(opts *ExporterOptions) (string, error) { // nolint No rename due to backwards incompatibility. +func MetricsOptionsToJson(opts *ExporterOptions) (string, error) { //nolint // No rename due to backwards incompatibility. if opts == nil { return "", nil } diff --git a/vendor/knative.dev/pkg/reconciler/events.go b/vendor/knative.dev/pkg/reconciler/events.go index 262b2622294..54a6e52a2db 100644 --- a/vendor/knative.dev/pkg/reconciler/events.go +++ b/vendor/knative.dev/pkg/reconciler/events.go @@ -62,7 +62,7 @@ func NewEvent(eventtype, reason, messageFmt string, args ...interface{}) Event { // ReconcilerEvent wraps the fields required for recorders to create a // kubernetes recorder Event. -type ReconcilerEvent struct { //nolint for backcompat. +type ReconcilerEvent struct { //nolint:golint // for backcompat. EventType string Reason string Format string diff --git a/vendor/knative.dev/pkg/test/gcs/gcs.go b/vendor/knative.dev/pkg/test/gcs/gcs.go index 84571de2ea5..693fc110ab9 100644 --- a/vendor/knative.dev/pkg/test/gcs/gcs.go +++ b/vendor/knative.dev/pkg/test/gcs/gcs.go @@ -31,7 +31,7 @@ import ( "google.golang.org/api/option" ) -//nolint — there's also Client so they collide. +//nolint // there's also Client so they collide. type GCSClient struct { *storage.Client } diff --git a/vendor/knative.dev/pkg/test/logging/tlogger.go b/vendor/knative.dev/pkg/test/logging/tlogger.go index 42891bc2174..f6e05c5ce2d 100644 --- a/vendor/knative.dev/pkg/test/logging/tlogger.go +++ b/vendor/knative.dev/pkg/test/logging/tlogger.go @@ -160,7 +160,7 @@ func (o *TLogger) interfacesToFields(things ...interface{}) []interface{} { return fields } -func (o *TLogger) errorWithRuntimeCheck(stringThenKeysAndValues ...interface{}) (error, string, []interface{}) { //nolint Returning the error first is okay and expected here. +func (o *TLogger) errorWithRuntimeCheck(stringThenKeysAndValues ...interface{}) (error, string, []interface{}) { //nolint // Returning the error first is okay and expected here. if len(stringThenKeysAndValues) == 0 { return nil, "", nil } diff --git a/vendor/knative.dev/pkg/test/mako/config/benchmark.go b/vendor/knative.dev/pkg/test/mako/config/benchmark.go index 8f22a865ce7..74bcbe9286e 100644 --- a/vendor/knative.dev/pkg/test/mako/config/benchmark.go +++ b/vendor/knative.dev/pkg/test/mako/config/benchmark.go @@ -23,7 +23,7 @@ import ( "os" "path/filepath" - "github.com/golang/protobuf/proto" //nolint apis incompatible with the new version + "github.com/golang/protobuf/proto" //nolint // apis incompatible with the new version mpb "github.com/google/mako/spec/proto/mako_go_proto" ) diff --git a/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests/pkg/benchmark.go b/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests/pkg/benchmark.go index ea816235930..2a9dcbac9e6 100644 --- a/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests/pkg/benchmark.go +++ b/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests/pkg/benchmark.go @@ -40,7 +40,7 @@ const ( ) // backupLocations are used in retrying cluster creation, if stockout happens in one location. -// nolint // TODO(chizhg): it's currently not used, use it in the cluster creation retry logic. +//nolint // TODO(chizhg): it's currently not used, use it in the cluster creation retry logic. var backupLocations = []string{"us-west1", "us-west2", "us-east1"} // GKECluster saves the config information for the GKE cluster diff --git a/vendor/knative.dev/pkg/tracing/config/tracing.go b/vendor/knative.dev/pkg/tracing/config/tracing.go index 2a9305faf9a..14f7aa43597 100644 --- a/vendor/knative.dev/pkg/tracing/config/tracing.go +++ b/vendor/knative.dev/pkg/tracing/config/tracing.go @@ -136,7 +136,7 @@ func NewTracingConfigFromConfigMap(config *corev1.ConfigMap) (*Config, error) { // JsonToTracingConfig converts a json string of a Config. // Returns a non-nil Config always and an eventual error. -func JsonToTracingConfig(jsonCfg string) (*Config, error) { //nolint:stylecheck for backcompat. +func JsonToTracingConfig(jsonCfg string) (*Config, error) { //nolint // for backcompat. if jsonCfg == "" { return NoopConfig(), errors.New("empty json tracing config") @@ -155,7 +155,7 @@ func JsonToTracingConfig(jsonCfg string) (*Config, error) { //nolint:stylecheck } // TracingConfigToJson converts a Config to a json string. -func TracingConfigToJson(cfg *Config) (string, error) { //nolint:stylecheck for backcompat. +func TracingConfigToJson(cfg *Config) (string, error) { //nolint // for backcompat. if cfg == nil { return "", nil } diff --git a/vendor/knative.dev/test-infra/scripts/library.sh b/vendor/knative.dev/test-infra/scripts/library.sh index 7e191d97183..ebb488ae965 100644 --- a/vendor/knative.dev/test-infra/scripts/library.sh +++ b/vendor/knative.dev/test-infra/scripts/library.sh @@ -399,21 +399,6 @@ function start_knative_serving() { wait_until_pods_running knative-serving || return 1 } -# Install Knative Monitoring in the current cluster. -# Parameters: $1 - Knative Monitoring manifest. -function start_knative_monitoring() { - header "Starting Knative Monitoring" - subheader "Installing Knative Monitoring" - # namespace istio-system needs to be created first, due to the comment - # mentioned in - # https://github.com/knative/serving/blob/4202efc0dc12052edc0630515b101cbf8068a609/config/monitoring/tracing/zipkin/100-zipkin.yaml#L21 - kubectl create namespace istio-system 2>/dev/null - echo "Installing Monitoring from $1" - kubectl apply -f "$1" || return 1 - wait_until_pods_running knative-monitoring || return 1 - wait_until_pods_running istio-system || return 1 -} - # Install the stable release Knative/serving in the current cluster. # Parameters: $1 - Knative Serving version number, e.g. 0.6.0. function start_release_knative_serving() { @@ -521,6 +506,7 @@ function add_trap { # "master". # Additional dependencies can be included in the upgrade by providing them in a # global env var: FLOATING_DEPS +# --upgrade will set GOPROXY to direct unless it is already set. function go_update_deps() { cd "${REPO_ROOT_DIR}" || return 1 @@ -541,10 +527,20 @@ function go_update_deps() { shift done - if (( UPGRADE )); then + if [[ $UPGRADE == 1 ]]; then echo "--- Upgrading to ${VERSION}" + # From shell parameter expansion: + # ${parameter:+word} + # If parameter is null or unset, nothing is substituted, otherwise the expansion of word is substituted. + # -z is if the length of the string, so skip setting GOPROXY if GOPROXY is already set. + if [[ -z ${GOPROXY:+skip} ]]; then + export GOPROXY=direct + echo "Using 'GOPROXY=direct'." + else + echo "Respecting 'GOPROXY=${GOPROXY}'." + fi FLOATING_DEPS+=( $(run_go_tool knative.dev/test-infra/buoy buoy float ${REPO_ROOT_DIR}/go.mod --release ${VERSION} --domain knative.dev) ) - if (( ${#FLOATING_DEPS[@]} )); then + if [[ ${#FLOATING_DEPS[@]} > 0 ]]; then echo "Floating deps to ${FLOATING_DEPS[@]}" go get -d ${FLOATING_DEPS[@]} else @@ -758,5 +754,4 @@ readonly KNATIVE_SERVING_RELEASE_CRDS="$(get_latest_knative_yaml_source "serving readonly KNATIVE_SERVING_RELEASE_CORE="$(get_latest_knative_yaml_source "serving" "serving-core")" readonly KNATIVE_NET_ISTIO_RELEASE="$(get_latest_knative_yaml_source "net-istio" "net-istio")" readonly KNATIVE_EVENTING_RELEASE="$(get_latest_knative_yaml_source "eventing" "eventing")" -readonly KNATIVE_MONITORING_RELEASE="$(get_latest_knative_yaml_source "serving" "monitoring")" readonly KNATIVE_EVENTING_SUGAR_CONTROLLER_RELEASE="$(get_latest_knative_yaml_source "eventing" "eventing-sugar-controller")" diff --git a/vendor/modules.txt b/vendor/modules.txt index 273508d763b..1dff838b151 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -954,7 +954,7 @@ k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/pointer k8s.io/utils/trace -# knative.dev/pkg v0.0.0-20201020152859-5c30f4882d0a +# knative.dev/pkg v0.0.0-20201021200832-f492d0877abf ## explicit knative.dev/pkg/apiextensions/storageversion knative.dev/pkg/apiextensions/storageversion/cmd/migrate @@ -1080,7 +1080,7 @@ knative.dev/pkg/webhook/resourcesemantics knative.dev/pkg/webhook/resourcesemantics/conversion knative.dev/pkg/webhook/resourcesemantics/defaulting knative.dev/pkg/webhook/resourcesemantics/validation -# knative.dev/test-infra v0.0.0-20201020062259-cd8625126729 +# knative.dev/test-infra v0.0.0-20201022003632-7d3ea6019158 ## explicit knative.dev/test-infra/scripts # sigs.k8s.io/structured-merge-diff/v3 v3.0.1-0.20200706213357-43c19bbb7fba