diff --git a/go.mod b/go.mod index d7f07944..db9e7f44 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,8 @@ require ( k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible k8s.io/code-generator v0.18.8 k8s.io/kube-openapi v0.0.0-20200410145947-bcb3869e6f29 - knative.dev/pkg v0.0.0-20201019233058-fc447086b7b0 - knative.dev/test-infra v0.0.0-20201015231956-d236fb0ea9ff + knative.dev/pkg v0.0.0-20201020221017-1787376258ce + knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3 ) replace ( diff --git a/go.sum b/go.sum index d5367dd1..5b870c05 100644 --- a/go.sum +++ b/go.sum @@ -1921,8 +1921,8 @@ 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-20201019233058-fc447086b7b0 h1:lgXE/cUCgdUm5G8/eX/Bt6wvm6/XIkmyIaZU+vp1Ofw= -knative.dev/pkg v0.0.0-20201019233058-fc447086b7b0/go.mod h1:Gd7eJYKYPveffVad0/wImHpQSYn+Pt9q09HGJyL/b54= +knative.dev/pkg v0.0.0-20201020221017-1787376258ce h1:xIi8uNvYwamWAPW8BlnD++oIdhHq/o55ect8NAohD8k= +knative.dev/pkg v0.0.0-20201020221017-1787376258ce/go.mod h1:Gd7eJYKYPveffVad0/wImHpQSYn+Pt9q09HGJyL/b54= 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= @@ -1930,6 +1930,8 @@ knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT 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-20201020210659-8f5dc4814ac3 h1:FldGYq5wPrQqGuC8JI3a07nC0lGKqG7wtqvebxonnnE= +knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3/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/controller/controller.go b/vendor/knative.dev/pkg/controller/controller.go index 33325444..8ccee7a1 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/injection/config.go b/vendor/knative.dev/pkg/injection/config.go index d8228fe5..6bcd3855 100644 --- a/vendor/knative.dev/pkg/injection/config.go +++ b/vendor/knative.dev/pkg/injection/config.go @@ -55,7 +55,7 @@ func Flags() *Environment { flag.StringVar(&env.ServerURL, "server", "", "The address of the Kubernetes API server. Overrides any value in kubeconfig. Only required if out-of-cluster.") - flag.StringVar(&env.Kubeconfig, "kubeconfig", "", + flag.StringVar(&env.Kubeconfig, "kubeconfig", os.Getenv("KUBECONFIG"), "Path to a kubeconfig. Only required if out-of-cluster.") flag.IntVar(&env.Burst, "kube-api-burst", 0, "Maximum burst for throttle.") @@ -97,10 +97,6 @@ func ParseAndGetRESTConfigOrDie() *rest.Config { // 3. Fallback to in-cluster config. // 4. Fallback to the ~/.kube/config. func GetRESTConfig(serverURL, kubeconfig string) (*rest.Config, error) { - if kubeconfig == "" { - kubeconfig = os.Getenv("KUBECONFIG") - } - // If we have an explicit indication of where the kubernetes config lives, read that. if kubeconfig != "" { c, err := clientcmd.BuildConfigFromFlags(serverURL, kubeconfig) diff --git a/vendor/knative.dev/pkg/kmeta/names.go b/vendor/knative.dev/pkg/kmeta/names.go index 43d12de8..eeaa57ae 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 8eb82977..8214bde4 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 262b2622..54a6e52a 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/test-infra/scripts/library.sh b/vendor/knative.dev/test-infra/scripts/library.sh index 7e191d97..3d28f189 100644 --- a/vendor/knative.dev/test-infra/scripts/library.sh +++ b/vendor/knative.dev/test-infra/scripts/library.sh @@ -521,6 +521,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 +542,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 diff --git a/vendor/modules.txt b/vendor/modules.txt index b1f30996..e48c80f1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -734,7 +734,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-20201019233058-fc447086b7b0 +# knative.dev/pkg v0.0.0-20201020221017-1787376258ce ## explicit knative.dev/pkg/apis knative.dev/pkg/apis/duck @@ -762,7 +762,7 @@ knative.dev/pkg/reconciler knative.dev/pkg/signals knative.dev/pkg/system knative.dev/pkg/tracker -# knative.dev/test-infra v0.0.0-20201015231956-d236fb0ea9ff +# knative.dev/test-infra v0.0.0-20201020210659-8f5dc4814ac3 ## explicit knative.dev/test-infra/scripts knative.dev/test-infra/tools/dep-collector