From 85baf667a551f2d6da72ad6e2ae38d1529def588 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Th=C3=B6mmes?= Date: Mon, 14 Sep 2020 13:45:02 +0200 Subject: [PATCH] Remove unnecessary occurrences of divisive language. (#9394) * Remove unnecessary occurrences of divisive language. * Review comments. --- pkg/activator/handler/concurrency_reporter_test.go | 2 +- pkg/reconciler/revision/resources/pa.go | 4 ++-- pkg/webhook/podspec_dryrun.go | 4 ++-- test/e2e/autoscale.go | 14 ++++---------- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/pkg/activator/handler/concurrency_reporter_test.go b/pkg/activator/handler/concurrency_reporter_test.go index c2699c9371a8..18b1e61844a0 100644 --- a/pkg/activator/handler/concurrency_reporter_test.go +++ b/pkg/activator/handler/concurrency_reporter_test.go @@ -622,7 +622,7 @@ func BenchmarkConcurrencyReporterReport(b *testing.B) { fake.ServingV1().Revisions(rev.Namespace).Create(ctx, rev, metav1.CreateOptions{}) revisions.Informer().GetIndexer().Add(rev) - // Send a dummy request for each revision to make sure it's reported. + // Send a sample request for each revision to make sure it's reported. cr.handleEvent(network.ReqEvent{ Time: time.Now(), Type: network.ReqIn, diff --git a/pkg/reconciler/revision/resources/pa.go b/pkg/reconciler/revision/resources/pa.go index 58fc98672719..dbf7efa95d51 100644 --- a/pkg/reconciler/revision/resources/pa.go +++ b/pkg/reconciler/revision/resources/pa.go @@ -47,8 +47,8 @@ func MakePA(rev *v1.Revision) *av1alpha1.PodAutoscaler { Reachability: func() av1alpha1.ReachabilityType { // If the Revision has failed to become Ready, then mark the PodAutoscaler as unreachable. if rev.Status.GetCondition(v1.RevisionConditionReady).IsFalse() { - // As a sanity check, also make sure that we don't do this when a - // newly failing revision is marked reachable by outside forces. + // Make sure that we don't do this when a newly failing revision is + // marked reachable by outside forces. if !rev.IsReachable() { return av1alpha1.ReachabilityUnreachable } diff --git a/pkg/webhook/podspec_dryrun.go b/pkg/webhook/podspec_dryrun.go index d749690a271f..57e9310b37d1 100644 --- a/pkg/webhook/podspec_dryrun.go +++ b/pkg/webhook/podspec_dryrun.go @@ -51,7 +51,7 @@ func validatePodSpec(ctx context.Context, ps v1.RevisionSpec, namespace string, Namespace: namespace, } - // Create a dummy Revision from the template + // Create a sample Revision from the template rev := &v1.Revision{ ObjectMeta: om, Spec: ps, @@ -59,7 +59,7 @@ func validatePodSpec(ctx context.Context, ps v1.RevisionSpec, namespace string, rev.SetDefaults(ctx) podSpec := resources.BuildPodSpec(rev, resources.BuildUserContainers(rev)) - // Make a dummy pod with the template Revisions & PodSpec and dryrun call to API-server + // Make a sample pod with the template Revisions & PodSpec and dryrun call to API-server pod := &corev1.Pod{ ObjectMeta: om, Spec: *podSpec, diff --git a/test/e2e/autoscale.go b/test/e2e/autoscale.go index 82f9b1eb2aa0..bb6c62894c4c 100644 --- a/test/e2e/autoscale.go +++ b/test/e2e/autoscale.go @@ -308,16 +308,10 @@ func checkPodScale(ctx *testContext, targetPods, minPods, maxPods float64, durat return errors.New("interim scale didn't fulfill constraints: " + mes) } // A quick test succeeds when the number of pods scales up to `targetPods` - // (and, for sanity check, no more than `maxPods`). - if got >= targetPods && got <= maxPods { - if quick { - // A quick test succeeds when the number of pods scales up to `targetPods` - // (and, for sanity check, no more than `maxPods`). - if got >= targetPods && got <= maxPods { - ctx.t.Logf("Quick Mode: got %v >= %v", got, targetPods) - return nil - } - } + // (and, as an extra check, no more than `maxPods`). + if quick && got >= targetPods && got <= maxPods { + ctx.t.Logf("Quick Mode: got %v >= %v", got, targetPods) + return nil } if minPods < targetPods-1 { // Increase `minPods`, but leave room to reduce flakiness.