upgrade to latest dependencies (#371)

Signed-off-by: Knative Automation <automation@knative.team>
This commit is contained in:
knative-automation 2020-10-26 18:53:33 -07:00 committed by GitHub
parent db1beae7ad
commit 11e52bba54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 36 additions and 33 deletions

4
go.mod
View File

@ -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-20201023200637-5807b6f9eeb0
knative.dev/test-infra v0.0.0-20201023182438-7efa632471b9
knative.dev/pkg v0.0.0-20201026232541-37583c54bfc3
knative.dev/test-infra v0.0.0-20201026182042-46291de4ab66
)
replace (

8
go.sum
View File

@ -1935,8 +1935,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-20201023200637-5807b6f9eeb0 h1:cf0Oa8FroglqY1KypctDLAKLTcqlm5xrbgEfttQhBV4=
knative.dev/pkg v0.0.0-20201023200637-5807b6f9eeb0/go.mod h1:pc2VrtK69NrLtGMc6Gu0BL8IOfmph6KNvIDVrFqqW3Q=
knative.dev/pkg v0.0.0-20201026232541-37583c54bfc3 h1:YnoV/NKU0jt607ub1ra1RqCWMcoo9QLf8By9PAo8SSE=
knative.dev/pkg v0.0.0-20201026232541-37583c54bfc3/go.mod h1:pc2VrtK69NrLtGMc6Gu0BL8IOfmph6KNvIDVrFqqW3Q=
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=
@ -1944,8 +1944,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-20201022003632-7d3ea6019158 h1:i6DIeWY1imJVNS6OH+VcBvYpVOkYWDe/AR2rUYTxcxE=
knative.dev/test-infra v0.0.0-20201022003632-7d3ea6019158/go.mod h1:lm0U0k6ARXr8Po0LcSTCfETg63LOF3ajUxcoqy5JSH0=
knative.dev/test-infra v0.0.0-20201023182438-7efa632471b9 h1:o6YXgT0otF0/uibFvexmTtGtu5A8LXIRO6LtnSUB54w=
knative.dev/test-infra v0.0.0-20201023182438-7efa632471b9/go.mod h1:84HgSlMIp+oCx//g2Js61OxSVgdvrRYQMfMMr9kSSn4=
knative.dev/test-infra v0.0.0-20201026182042-46291de4ab66 h1:4GjjfWLzfsxN7xm+vkdC4AWqgTlw5mSQmTdSqPVfjlM=
knative.dev/test-infra v0.0.0-20201026182042-46291de4ab66/go.mod h1:84HgSlMIp+oCx//g2Js61OxSVgdvrRYQMfMMr9kSSn4=
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=

View File

@ -603,15 +603,15 @@ func (r *reconcilerImpl) updateFinalizersFiltered(ctx {{.contextContext|raw}}, r
patcher := r.Client.{{.group}}{{.version}}().{{.type|apiGroup}}(resource.Namespace)
{{end}}
resourceName := resource.Name
resource, err = patcher.Patch(ctx, resourceName, {{.typesMergePatchType|raw}}, patch, {{.metav1PatchOptions|raw}}{})
updated, err := patcher.Patch(ctx, resourceName, {{.typesMergePatchType|raw}}, patch, {{.metav1PatchOptions|raw}}{})
if err != nil {
r.Recorder.Eventf(resource, {{.corev1EventTypeWarning|raw}}, "FinalizerUpdateFailed",
r.Recorder.Eventf(existing, {{.corev1EventTypeWarning|raw}}, "FinalizerUpdateFailed",
"Failed to update finalizers for %q: %v", resourceName, err)
} else {
r.Recorder.Eventf(resource, {{.corev1EventTypeNormal|raw}}, "FinalizerUpdate",
r.Recorder.Eventf(updated, {{.corev1EventTypeNormal|raw}}, "FinalizerUpdate",
"Updated %q finalizers", resource.GetName())
}
return resource, err
return updated, err
}
func (r *reconcilerImpl) setFinalizerIfFinalizer(ctx {{.contextContext|raw}}, resource *{{.type|raw}}) (*{{.type|raw}}, error) {

View File

@ -34,8 +34,8 @@ import (
const (
configMapNameEnv = "CONFIG_LEADERELECTION_NAME"
// KnativeResourceLock is the only supported lock mechanism for Knative.
KnativeResourceLock = resourcelock.LeasesResourceLock
// knativeResourceLock is the only supported lock mechanism for Knative.
knativeResourceLock = resourcelock.LeasesResourceLock
)
// MaxBuckets is the maximum number of buckets to allow users to define.

View File

@ -124,7 +124,7 @@ func (b *standardBuilder) buildElector(ctx context.Context, la reconciler.Leader
// Use a local var which won't change across the for loop since it is
// used in a callback asynchronously.
bkt := bkt
rl, err := resourcelock.New(KnativeResourceLock,
rl, err := resourcelock.New(knativeResourceLock,
system.Namespace(), // use namespace we are running in
bkt.Name(),
b.kc.CoreV1(),

View File

@ -238,9 +238,16 @@ func ConfigMapName() string {
return "config-logging"
}
// JsonToLoggingConfig converts a json string of a Config.
// Returns a non-nil Config always.
// JsonToLoggingConfig converts a JSON string of a Config.
// Always returns a non-nil Config.
// TODO(vagababov): remove after downstream conversion.
func JsonToLoggingConfig(jsonCfg string) (*Config, error) { //nolint No rename due to backwards incompatibility.
return JSONToConfig(jsonCfg)
}
// JSONToConfig converts a JSON string of a Config.
// Always returns a non-nil Config.
func JSONToConfig(jsonCfg string) (*Config, error) {
if jsonCfg == "" {
return nil, errEmptyJSONLogginString
}
@ -258,8 +265,14 @@ func JsonToLoggingConfig(jsonCfg string) (*Config, error) { //nolint No rename d
return cfg, nil
}
// LoggingConfigToJson converts a Config to a json string.
// LoggingConfigToJson converts a Config to a JSON string.
// TODO(vagababov): remove after downstream conversion.
func LoggingConfigToJson(cfg *Config) (string, error) { //nolint No rename due to backwards incompatibility.
return ConfigToJSON(cfg)
}
// ConfigToJSON converts a Config to a JSON string.
func ConfigToJSON(cfg *Config) (string, error) {
if cfg == nil || cfg.LoggingConfig == "" {
return "", nil
}

View File

@ -341,13 +341,6 @@ func prometheusPort() (int, error) {
return int(pp), nil
}
// JsonToMetricsOptions converts a JSON string to an ExporterOptions object.
// TODO(vagababov): remove after updating deps.
// Deprecated: Use JSONToOptions instead.
func JsonToMetricsOptions(jsonOpts string) (*ExporterOptions, error) { //nolint // No rename due to backwards incompatibility. {
return JSONToOptions(jsonOpts)
}
// JSONToOptions converts a json string to ExporterOptions.
func JSONToOptions(jsonOpts string) (*ExporterOptions, error) {
var opts ExporterOptions
@ -362,13 +355,6 @@ func JSONToOptions(jsonOpts string) (*ExporterOptions, error) {
return &opts, nil
}
// MetricsOptionsToJson converts an ExporterOptions object to a JSON string.
// TODO(vagababov): remove after updating deps.
// Deprecated: Use OptionsToJSON instead.
func MetricsOptionsToJson(opts *ExporterOptions) (string, error) { //nolint // No rename due to backwards incompatibility.
return OptionsToJSON(opts)
}
// OptionsToJSON converts an ExporterOptions object to a JSON string.
func OptionsToJSON(opts *ExporterOptions) (string, error) {
if opts == nil {

View File

@ -557,7 +557,11 @@ function go_update_deps() {
echo "--- Removing unwanted vendor files"
# Remove unwanted vendor files
find vendor/ \( -name "OWNERS" -o -name "OWNERS_ALIASES" -o -name "BUILD" -o -name "BUILD.bazel" -o -name "*_test.go" \) -print0 | xargs -0 rm -f
find vendor/ \( -name "OWNERS" \
-o -name "OWNERS_ALIASES" \
-o -name "BUILD" \
-o -name "BUILD.bazel" \
-o -name "*_test.go" \) -exec rm -f {} +
export GOFLAGS=-mod=vendor

4
vendor/modules.txt vendored
View File

@ -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-20201023200637-5807b6f9eeb0
# knative.dev/pkg v0.0.0-20201026232541-37583c54bfc3
## 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-20201023182438-7efa632471b9
# knative.dev/test-infra v0.0.0-20201026182042-46291de4ab66
## explicit
knative.dev/test-infra/scripts
knative.dev/test-infra/tools/dep-collector