From 6345caf6fef637c4c44093cb6a68c3bc517cfe75 Mon Sep 17 00:00:00 2001 From: Matt Moore Date: Thu, 30 Apr 2020 09:03:43 -0700 Subject: [PATCH] [master] Auto-update dependencies (#262) Produced via: `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh` /assign n3wscott vagababov /cc n3wscott vagababov --- go.mod | 4 ++-- go.sum | 7 +++--- .../knative.dev/pkg/controller/controller.go | 18 +++++++++++++++ vendor/knative.dev/pkg/metrics/doc.go | 3 +++ vendor/knative.dev/pkg/metrics/exporter.go | 3 +++ .../pkg/metrics/opencensus_exporter.go | 3 +++ .../pkg/metrics/prometheus_exporter.go | 3 +++ .../knative.dev/test-infra/scripts/library.sh | 23 ++++++++++--------- .../test-infra/scripts/presubmit-tests.sh | 2 +- vendor/modules.txt | 4 ++-- 10 files changed, 51 insertions(+), 19 deletions(-) diff --git a/go.mod b/go.mod index a8fc0a94..a1137c72 100644 --- a/go.mod +++ b/go.mod @@ -18,8 +18,8 @@ require ( k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible k8s.io/code-generator v0.18.0 k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf - knative.dev/pkg v0.0.0-20200428194351-90fc61bae7f7 - knative.dev/test-infra v0.0.0-20200429132042-cb2fc4ae428f + knative.dev/pkg v0.0.0-20200429233442-1ebb4d56f726 + knative.dev/test-infra v0.0.0-20200429211942-f4c4853375cf ) replace ( diff --git a/go.sum b/go.sum index 7804c964..61382f65 100644 --- a/go.sum +++ b/go.sum @@ -914,11 +914,12 @@ k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl k8s.io/utils v0.0.0-20190907131718-3d4f5b7dea0b h1:eMM0sTvh3KBVGwJfuNcU86P38TJhlVMAICbFPDG3t0M= k8s.io/utils v0.0.0-20190907131718-3d4f5b7dea0b/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= knative.dev/pkg v0.0.0-20191101194912-56c2594e4f11/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q= -knative.dev/pkg v0.0.0-20200428194351-90fc61bae7f7 h1:rxALStc3xq30qGIU6rrTn+uvUOeQnvixDLR5Y1jjX7M= -knative.dev/pkg v0.0.0-20200428194351-90fc61bae7f7/go.mod h1:o+e8OVEJKIuvXPsGVPIautjXgs05xbos7G+QMRjuUps= -knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ= +knative.dev/pkg v0.0.0-20200429233442-1ebb4d56f726 h1:L2EgutIZ+seB9uv7BzNqJ/2T++JvJbv5d4NREa4dVJU= +knative.dev/pkg v0.0.0-20200429233442-1ebb4d56f726/go.mod h1:WRkhFA44sWhFk+p94IPkW5zaiX3DZUfftw7eqmY/74I= knative.dev/test-infra v0.0.0-20200429132042-cb2fc4ae428f h1:bo0XooULJpgNd8sV/kJ2KYypRFTHaLQZjShhTZGiJSA= knative.dev/test-infra v0.0.0-20200429132042-cb2fc4ae428f/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ= +knative.dev/test-infra v0.0.0-20200429211942-f4c4853375cf h1:rNWg3NiXNLjZC9C1EJf2qKA+mRnrWMLW1KONsEusLYg= +knative.dev/test-infra v0.0.0-20200429211942-f4c4853375cf/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ= 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/vendor/knative.dev/pkg/controller/controller.go b/vendor/knative.dev/pkg/controller/controller.go index fac7eee3..166d109c 100644 --- a/vendor/knative.dev/pkg/controller/controller.go +++ b/vendor/knative.dev/pkg/controller/controller.go @@ -95,7 +95,16 @@ func Filter(gvk schema.GroupVersionKind) func(obj interface{}) bool { // FilterGroupVersionKind makes it simple to create FilterFunc's for use with // cache.FilteringResourceEventHandler that filter based on the // schema.GroupVersionKind of the controlling resources. +// +// Deprecated: Use FilterControlledByGVK instead. func FilterGroupVersionKind(gvk schema.GroupVersionKind) func(obj interface{}) bool { + return FilterControllerGVK(gvk) +} + +// FilterControllerGVK makes it simple to create FilterFunc's for use with +// cache.FilteringResourceEventHandler that filter based on the +// schema.GroupVersionKind of the controlling resources. +func FilterControllerGVK(gvk schema.GroupVersionKind) func(obj interface{}) bool { return func(obj interface{}) bool { object, ok := obj.(metav1.Object) if !ok { @@ -112,7 +121,16 @@ func FilterGroupVersionKind(gvk schema.GroupVersionKind) func(obj interface{}) b // FilterGroupKind makes it simple to create FilterFunc's for use with // cache.FilteringResourceEventHandler that filter based on the // schema.GroupKind of the controlling resources. +// +// Deprecated: Use FilterControlledByGK instead func FilterGroupKind(gk schema.GroupKind) func(obj interface{}) bool { + return FilterControllerGK(gk) +} + +// FilterControllerGK makes it simple to create FilterFunc's for use with +// cache.FilteringResourceEventHandler that filter based on the +// schema.GroupKind of the controlling resources. +func FilterControllerGK(gk schema.GroupKind) func(obj interface{}) bool { return func(obj interface{}) bool { object, ok := obj.(metav1.Object) if !ok { diff --git a/vendor/knative.dev/pkg/metrics/doc.go b/vendor/knative.dev/pkg/metrics/doc.go index 631bb596..9869aa83 100644 --- a/vendor/knative.dev/pkg/metrics/doc.go +++ b/vendor/knative.dev/pkg/metrics/doc.go @@ -1,9 +1,12 @@ /* Copyright 2018 The Knative Authors + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/vendor/knative.dev/pkg/metrics/exporter.go b/vendor/knative.dev/pkg/metrics/exporter.go index a219221d..f3f0006e 100644 --- a/vendor/knative.dev/pkg/metrics/exporter.go +++ b/vendor/knative.dev/pkg/metrics/exporter.go @@ -1,9 +1,12 @@ /* Copyright 2018 The Knative Authors + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/vendor/knative.dev/pkg/metrics/opencensus_exporter.go b/vendor/knative.dev/pkg/metrics/opencensus_exporter.go index 2a54f6c6..5e392464 100644 --- a/vendor/knative.dev/pkg/metrics/opencensus_exporter.go +++ b/vendor/knative.dev/pkg/metrics/opencensus_exporter.go @@ -1,9 +1,12 @@ /* Copyright 2020 The Knative Authors + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/vendor/knative.dev/pkg/metrics/prometheus_exporter.go b/vendor/knative.dev/pkg/metrics/prometheus_exporter.go index b83b23a0..8c3f462a 100644 --- a/vendor/knative.dev/pkg/metrics/prometheus_exporter.go +++ b/vendor/knative.dev/pkg/metrics/prometheus_exporter.go @@ -1,9 +1,12 @@ /* Copyright 2019 The Knative Authors + Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at + http://www.apache.org/licenses/LICENSE-2.0 + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/vendor/knative.dev/test-infra/scripts/library.sh b/vendor/knative.dev/test-infra/scripts/library.sh index 2c099edd..a8aa72e7 100644 --- a/vendor/knative.dev/test-infra/scripts/library.sh +++ b/vendor/knative.dev/test-infra/scripts/library.sh @@ -498,24 +498,25 @@ function run_go_tool() { ${tool} "$@" } -# Run dep-collector to update licenses. +# Run go-licenses to update licenses. # Parameters: $1 - output file, relative to repo root dir. -# $2...$n - directories and files to inspect. +# $2 - directory to inspect. function update_licenses() { - cd ${REPO_ROOT_DIR} || return 1 + cd "${REPO_ROOT_DIR}" || return 1 local dst=$1 + local dir=$2 shift - run_go_tool knative.dev/test-infra/tools/dep-collector dep-collector $@ > ./${dst} + run_go_tool github.com/google/go-licenses go-licenses save "${dir}" --save_path="${dst}" --force || return 1 + # Hack to make sure directories retain write permissions after save. This + # can happen if the directory being copied is a Go module. + # See https://github.com/google/go-licenses/issues/11 + chmod -R +w "${dst}" } -# Run dep-collector to check for forbidden liceses. -# Parameters: $1...$n - directories and files to inspect. +# Run go-licenses to check for forbidden licenses. function check_licenses() { - # Fetch the google/licenseclassifier for its license db - rm -fr ${GOPATH}/src/github.com/google/licenseclassifier - GOFLAGS="" go get -u github.com/google/licenseclassifier - # Check that we don't have any forbidden licenses in our images. - run_go_tool knative.dev/test-infra/tools/dep-collector dep-collector -check $@ + # Check that we don't have any forbidden licenses. + run_go_tool github.com/google/go-licenses go-licenses check "${REPO_ROOT_DIR}/..." || return 1 } # Run the given linter on the given files, checking it exists first. diff --git a/vendor/knative.dev/test-infra/scripts/presubmit-tests.sh b/vendor/knative.dev/test-infra/scripts/presubmit-tests.sh index d075c693..ec26a086 100644 --- a/vendor/knative.dev/test-infra/scripts/presubmit-tests.sh +++ b/vendor/knative.dev/test-infra/scripts/presubmit-tests.sh @@ -201,7 +201,7 @@ function default_build_test_runner() { create_junit_xml _build_tests Build_Go "${errors_go}" # Check that we don't have any forbidden licenses in our images. subheader "Checking for forbidden licenses" - report_build_test Check_Licenses check_licenses ${go_pkg_dirs} || failed=1 + report_build_test Check_Licenses check_licenses || failed=1 return ${failed} } diff --git a/vendor/modules.txt b/vendor/modules.txt index 96bd4e51..de7bcfa2 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -651,7 +651,7 @@ k8s.io/kube-openapi/pkg/util/sets k8s.io/utils/buffer k8s.io/utils/integer k8s.io/utils/trace -# knative.dev/pkg v0.0.0-20200428194351-90fc61bae7f7 +# knative.dev/pkg v0.0.0-20200429233442-1ebb4d56f726 knative.dev/pkg/apis knative.dev/pkg/changeset knative.dev/pkg/codegen/cmd/injection-gen @@ -668,7 +668,7 @@ knative.dev/pkg/logging/logkey knative.dev/pkg/metrics knative.dev/pkg/metrics/metricskey knative.dev/pkg/reconciler -# knative.dev/test-infra v0.0.0-20200429132042-cb2fc4ae428f +# knative.dev/test-infra v0.0.0-20200429211942-f4c4853375cf knative.dev/test-infra/scripts knative.dev/test-infra/tools/dep-collector # sigs.k8s.io/yaml v1.1.0