From bb5b5155f3b20c9c0294a71733be93e5a1d10e31 Mon Sep 17 00:00:00 2001 From: Matt Moore Date: Tue, 28 Jan 2020 07:28:27 -0800 Subject: [PATCH] Auto-update dependencies (#190) Produced via: `dep ensure -update knative.dev/test-infra knative.dev/pkg` /assign n3wscott /cc n3wscott --- Gopkg.lock | 4 +-- vendor/knative.dev/pkg/Gopkg.lock | 2 ++ vendor/knative.dev/pkg/reconciler/retry.go | 28 +++++++++++++++++++ vendor/knative.dev/pkg/test/gke/request.go | 9 ++++++ .../pkg/test/mako/alerter/alerter.go | 2 +- .../pkg/test/slackutil/message_read.go | 5 +++- .../clustermanager/perf-tests/pkg/cluster.go | 3 -- 7 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 vendor/knative.dev/pkg/reconciler/retry.go diff --git a/Gopkg.lock b/Gopkg.lock index 0350b66c..0cd01175 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -966,7 +966,7 @@ [[projects]] branch = "master" - digest = "1:92b7055a014502a4b66d16ddc846de570f2d42ebdf9e6dfdc1b6eb2efc573294" + digest = "1:3d714b9e9535b4c878a16fff8c2ba5195df8c94d554a1bcff2e9f804350f4a5a" name = "knative.dev/pkg" packages = [ "apis", @@ -985,7 +985,7 @@ "metrics/metricskey", ] pruneopts = "T" - revision = "5ff923b836abcbeb6ac3ff2784db0d5b5786ade2" + revision = "b51ee347cbd2c26c1af45177d427ffb62b008b39" [[projects]] branch = "master" diff --git a/vendor/knative.dev/pkg/Gopkg.lock b/vendor/knative.dev/pkg/Gopkg.lock index 258660c5..6e6c1293 100644 --- a/vendor/knative.dev/pkg/Gopkg.lock +++ b/vendor/knative.dev/pkg/Gopkg.lock @@ -1393,6 +1393,7 @@ "k8s.io/api/admissionregistration/v1beta1", "k8s.io/api/apps/v1", "k8s.io/api/authentication/v1", + "k8s.io/api/autoscaling/v1", "k8s.io/api/autoscaling/v2beta1", "k8s.io/api/batch/v1", "k8s.io/api/core/v1", @@ -1449,6 +1450,7 @@ "k8s.io/client-go/tools/clientcmd", "k8s.io/client-go/tools/metrics", "k8s.io/client-go/tools/record", + "k8s.io/client-go/util/retry", "k8s.io/client-go/util/workqueue", "k8s.io/code-generator/cmd/client-gen", "k8s.io/code-generator/cmd/client-gen/generators/util", diff --git a/vendor/knative.dev/pkg/reconciler/retry.go b/vendor/knative.dev/pkg/reconciler/retry.go new file mode 100644 index 00000000..63c2af24 --- /dev/null +++ b/vendor/knative.dev/pkg/reconciler/retry.go @@ -0,0 +1,28 @@ +/* +Copyright 2020 The Knative Authors +Licensed under the Apache License, Veroute.on 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. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package reconciler + +import ( + "k8s.io/client-go/util/retry" +) + +// RetryUpdateConflicts retries the inner function if it returns conflict errors. +// This can be used to retry status updates without constantly reenqueuing keys. +func RetryUpdateConflicts(updater func(int) error) error { + attempts := 0 + return retry.RetryOnConflict(retry.DefaultRetry, func() error { + err := updater(attempts) + attempts++ + return err + }) +} diff --git a/vendor/knative.dev/pkg/test/gke/request.go b/vendor/knative.dev/pkg/test/gke/request.go index 0cb89fc6..c1fe803b 100644 --- a/vendor/knative.dev/pkg/test/gke/request.go +++ b/vendor/knative.dev/pkg/test/gke/request.go @@ -114,6 +114,15 @@ func NewCreateClusterRequest(request *Request) (*container.CreateClusterRequest, }, Config: &container.NodeConfig{ MachineType: request.NodeType, + // The set of Google API scopes to be made available on all + // of the node VMs under the "default" service account. + // If unspecified, no scopes are added, unless Cloud Logging or + // Cloud Monitoring are enabled, in which case their required + // scopes will be added. + // `https://www.googleapis.com/auth/devstorage.read_only` is required + // for communicating with **gcr.io**, and it's included in cloud-platform scope. + // TODO(chizhg): give more fine granular scope based on the actual needs. + OauthScopes: []string{container.CloudPlatformScope}, }, }, }, diff --git a/vendor/knative.dev/pkg/test/mako/alerter/alerter.go b/vendor/knative.dev/pkg/test/mako/alerter/alerter.go index 1b15e69f..8bc1ee2e 100644 --- a/vendor/knative.dev/pkg/test/mako/alerter/alerter.go +++ b/vendor/knative.dev/pkg/test/mako/alerter/alerter.go @@ -61,7 +61,7 @@ func (alerter *Alerter) HandleBenchmarkResult( summary := fmt.Sprintf("%s\n\nSee run chart at: %s\n\nSee aggregate chart at: %s", output.GetSummaryOutput(), output.GetRunChartLink(), - fmt.Sprintf("mako.dev/benchmark?benchmark_key=%s&tseconds=604800", benchmarkKey), + "https://mako.dev/benchmark?tseconds=604800&benchmark_key="+benchmarkKey, ) if alerter.githubIssueHandler != nil { if err := alerter.githubIssueHandler.CreateIssueForTest(benchmarkName, summary); err != nil { diff --git a/vendor/knative.dev/pkg/test/slackutil/message_read.go b/vendor/knative.dev/pkg/test/slackutil/message_read.go index 3b6d3ee7..fe13126b 100644 --- a/vendor/knative.dev/pkg/test/slackutil/message_read.go +++ b/vendor/knative.dev/pkg/test/slackutil/message_read.go @@ -21,6 +21,7 @@ package slackutil import ( "encoding/json" "fmt" + "html" "io/ioutil" "net/url" "strconv" @@ -84,7 +85,9 @@ func (c *readClient) MessageHistory(channel string, startTime time.Time) ([]stri res := make([]string, 0) for _, message := range r.Messages { if message.UserName == c.userName { - res = append(res, message.Text) + // the message text queried from Slack will be escaped, + // so we unescape it to restore to the original text + res = append(res, html.UnescapeString(message.Text)) } } diff --git a/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests/pkg/cluster.go b/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests/pkg/cluster.go index 006efbc5..55c4e6f7 100644 --- a/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests/pkg/cluster.go +++ b/vendor/knative.dev/pkg/testutils/clustermanager/perf-tests/pkg/cluster.go @@ -243,9 +243,6 @@ func (gc *gkeClient) createClusterWithRetries(gcpProject, name string, config Cl MaxNodes: config.NodeCount, NodeType: config.NodeType, Addons: addons, - // Enable Workload Identity for performance tests because we need to use a Kubernetes service account to act - // as a Google cloud service account, which is then used for authentication to the metrics data storage system. - EnableWorkloadIdentity: true, } creq, err := gke.NewCreateClusterRequest(req) if err != nil {