Skip to content

Commit

Permalink
Remove unnecessary occurrences of divisive language. (#9394)
Browse files Browse the repository at this point in the history
* Remove unnecessary occurrences of divisive language.

* Review comments.
  • Loading branch information
markusthoemmes authored Sep 14, 2020
1 parent f469d49 commit 85baf66
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion pkg/activator/handler/concurrency_reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions pkg/reconciler/revision/resources/pa.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/webhook/podspec_dryrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ 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,
}
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,
Expand Down
14 changes: 4 additions & 10 deletions test/e2e/autoscale.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 85baf66

Please sign in to comment.