[master] Auto-update dependencies (#260)

Produced via:
  `./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh`
/assign n3wscott vagababov
/cc n3wscott vagababov
This commit is contained in:
Matt Moore 2020-04-28 09:29:51 -07:00 committed by GitHub
parent 64d6830ca6
commit 987a2b12a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 26 deletions

4
go.mod
View File

@ -36,8 +36,8 @@ require (
k8s.io/code-generator v0.16.5-beta.1
k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf
k8s.io/utils v0.0.0-20190907131718-3d4f5b7dea0b // indirect
knative.dev/pkg v0.0.0-20200427190051-6b9ee63b4aad
knative.dev/test-infra v0.0.0-20200424202250-e6e89d29e93a
knative.dev/pkg v0.0.0-20200428133551-22b961371934
knative.dev/test-infra v0.0.0-20200427211351-bf3e6802597a
)
replace (

8
go.sum
View File

@ -446,10 +446,10 @@ k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf/go.mod h1:1TqjTSzOxsLGIKf
k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew=
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-20200427190051-6b9ee63b4aad h1:NpDDOgClFe9Y7XAOiEP+84ByR8NPfEEj0P/zCh+ZbsA=
knative.dev/pkg v0.0.0-20200427190051-6b9ee63b4aad/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/test-infra v0.0.0-20200424202250-e6e89d29e93a h1:O+N0J0RiB3tbYws4Bt0RHE+74N2L01eX2BruW/8pNtU=
knative.dev/test-infra v0.0.0-20200424202250-e6e89d29e93a/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
knative.dev/pkg v0.0.0-20200428133551-22b961371934 h1:Bf6KxWNHHTqZYT7e3EeML4lRGviYEAwmMnQEHIR/5CE=
knative.dev/pkg v0.0.0-20200428133551-22b961371934/go.mod h1:pgODObA1dTyhNoFxPZTTjNWfx6F0aKsKzn+vaT9XO/Q=
knative.dev/test-infra v0.0.0-20200427211351-bf3e6802597a h1:ZgCkn1yvDHHU9LBc4E+Hfeg4LeHu46PhnHzAD7uSAHY=
knative.dev/test-infra v0.0.0-20200427211351-bf3e6802597a/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=

View File

@ -18,6 +18,8 @@ package injection
import (
"context"
"k8s.io/client-go/rest"
)
// nsKey is the key that namespaces are associated with on
@ -47,3 +49,20 @@ func GetNamespaceScope(ctx context.Context) string {
}
return value.(string)
}
// cfgKey is the key that the config is associated with.
type cfgKey struct{}
// WithConfig associates a given config with the context.
func WithConfig(ctx context.Context, cfg *rest.Config) context.Context {
return context.WithValue(ctx, cfgKey{}, cfg)
}
// GetConfig gets the current config from the context.
func GetConfig(ctx context.Context) *rest.Config {
value := ctx.Value(cfgKey{})
if value == nil {
return nil
}
return value.(*rest.Config)
}

View File

@ -227,7 +227,7 @@ func getStackdriverSecret(sdconfig *StackdriverClientConfig) (*corev1.Secret, er
sec, secErr := kubeclient.CoreV1().Secrets(secretNamespace).Get(secretName, metav1.GetOptions{})
if secErr != nil {
return nil, fmt.Errorf("Error getting Secret [%v] in namespace [%v]: %v", secretName, secretNamespace, secErr)
return nil, fmt.Errorf("Error getting Secret [%s] in namespace [%s]: %w", secretName, secretNamespace, secErr)
}
return sec, nil
@ -238,7 +238,7 @@ func convertSecretToExporterOption(secret *corev1.Secret) (option.ClientOption,
if data, ok := secret.Data[secretDataFieldKey]; ok {
return option.WithCredentialsJSON(data), nil
}
return nil, fmt.Errorf("Expected Secret to store key in data field named [%v]", secretDataFieldKey)
return nil, fmt.Errorf("Expected Secret to store key in data field named [%s]", secretDataFieldKey)
}
// ensureKubeclient is the lazy initializer for kubeclient.

View File

@ -479,22 +479,20 @@ function start_latest_knative_eventing() {
# $3..$n - parameters passed to the tool.
function run_go_tool() {
local tool=$2
if [[ -z "$(which ${tool})" ]]; then
local action=get
[[ $1 =~ ^[\./].* ]] && action=install
# Avoid running `go get` from root dir of the repository, as it can change go.sum and go.mod files.
# See discussions in https://github.com/golang/go/issues/27643.
if [[ ${action} == "get" && $(pwd) == "${REPO_ROOT_DIR}" ]]; then
local temp_dir="$(mktemp -d)"
local install_failed=0
# Swallow the output as we are returning the stdout in the end.
pushd "${temp_dir}" > /dev/null 2>&1
GOFLAGS="" go ${action} $1 || install_failed=1
popd > /dev/null 2>&1
(( install_failed )) && return ${install_failed}
else
GOFLAGS="" go ${action} $1
fi
local action=get
[[ $1 =~ ^[\./].* ]] && action=install
# Avoid running `go get` from root dir of the repository, as it can change go.sum and go.mod files.
# See discussions in https://github.com/golang/go/issues/27643.
if [[ ${action} == "get" && $(pwd) == "${REPO_ROOT_DIR}" ]]; then
local temp_dir="$(mktemp -d)"
local install_failed=0
# Swallow the output as we are returning the stdout in the end.
pushd "${temp_dir}" > /dev/null 2>&1
GOFLAGS="" go ${action} $1 || install_failed=1
popd > /dev/null 2>&1
(( install_failed )) && return ${install_failed}
else
GOFLAGS="" go ${action} $1
fi
shift 2
${tool} "$@"

4
vendor/modules.txt vendored
View File

@ -645,7 +645,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-20200427190051-6b9ee63b4aad
# knative.dev/pkg v0.0.0-20200428133551-22b961371934
knative.dev/pkg/apis
knative.dev/pkg/changeset
knative.dev/pkg/codegen/cmd/injection-gen
@ -662,7 +662,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-20200424202250-e6e89d29e93a
# knative.dev/test-infra v0.0.0-20200427211351-bf3e6802597a
knative.dev/test-infra/scripts
knative.dev/test-infra/tools/dep-collector
# sigs.k8s.io/yaml v1.1.0