[go] cmd/dist: remove unused omitVariant field

2 views
Skip to first unread message

Илья (Gerrit)

unread,
Jul 18, 2026, 8:47:48 AM (4 days ago) Jul 18
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Илья has uploaded the change for review

Commit message

cmd/dist: remove unused omitVariant field

No test sets omitVariant to true anymore, so !opts.omitVariant is
always true and the field is dead. Remove it, as its TODO suggests:
having timing information in ResultDB that corresponds directly with
dist test names is too valuable to give up.
Co-Authored-By: Claude Fable 5 <nor...@anthropic.com>
Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c

Change diff

diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index 43ac003..2def563 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -332,17 +332,9 @@
runOnHost bool // When cross-compiling, run this test on the host instead of guest

// variant, if non-empty, is a name used to distinguish different
- // configurations of the same test package(s). If set and omitVariant is false,
- // the Package field in test2json output is rewritten to pkg:variant.
+ // configurations of the same test package(s). If set, the Package field
+ // in test2json output is rewritten to pkg:variant.
variant string
- // omitVariant indicates that variant is used solely for the dist test name and
- // that the set of test names run by each variant (including empty) of a package
- // is non-overlapping.
- //
- // TODO(mknyszek): Consider removing omitVariant as it is no longer set to true
- // by any test. It's too valuable to have timing information in ResultDB that
- // corresponds directly with dist names for tests.
- omitVariant bool

// We have both pkg and pkgs as a convenience. Both may be set, in which
// case they will be combined. At least one must be set.
@@ -378,10 +370,8 @@

cmd = exec.Command(gorootBinGo, args...)
setupCmd(cmd)
- if t.json && opts.variant != "" && !opts.omitVariant {
- // Rewrite Package in the JSON output to be pkg:variant. When omitVariant
- // is true, pkg.TestName is already unambiguous, so we don't need to
- // rewrite the Package field.
+ if t.json && opts.variant != "" {
+ // Rewrite Package in the JSON output to be pkg:variant.
//
// We only want to process JSON on the child's stdout. Ideally if
// stdout==stderr, we would also use the same testJSONFilter for
@@ -612,16 +602,15 @@
defer timelog("end", dt.name)
ranGoBench = true
return (&goTest{
- variant: "racebench",
// Include the variant even though there's no overlap in test names.
// This makes the test targets distinct, allowing our build system to record
// elapsed time for each one, which is useful for load-balancing test shards.
- omitVariant: false,
- timeout: 1200 * time.Second, // longer timeout for race with benchmarks
- race: true,
- bench: true,
- cpu: "4",
- pkgs: benchMatches,
+ variant: "racebench",
+ timeout: 1200 * time.Second, // longer timeout for race with benchmarks
+ race: true,
+ bench: true,
+ cpu: "4",
+ pkgs: benchMatches,
}).run(t)
})
}
@@ -1059,14 +1048,13 @@
id := fmt.Sprintf("%d_%d", shard, nShards)
t.registerTest("../test",
&goTest{
- variant: id,
// Include the variant even though there's no overlap in test names.
// This makes the test target more clearly distinct in our build
// results and is important for load-balancing test shards.
- omitVariant: false,
- pkg: "cmd/internal/testdir",
- testFlags: []string{fmt.Sprintf("-shard=%d", shard), fmt.Sprintf("-shards=%d", nShards)},
- runOnHost: true,
+ variant: id,
+ pkg: "cmd/internal/testdir",
+ testFlags: []string{fmt.Sprintf("-shard=%d", shard), fmt.Sprintf("-shards=%d", nShards)},
+ runOnHost: true,
},
)
}

Change information

Files:
  • M src/cmd/dist/test.go
Change size: S
Delta: 1 file changed, 14 insertions(+), 26 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c
Gerrit-Change-Number: 802540
Gerrit-PatchSet: 1
Gerrit-Owner: Илья <il.t...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Илья (Gerrit)

unread,
Jul 18, 2026, 8:54:49 AM (4 days ago) Jul 18
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com

Илья uploaded new patchset

Илья uploaded patch set #2 to this change.
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c
Gerrit-Change-Number: 802540
Gerrit-PatchSet: 2
Gerrit-Owner: Илья <il.t...@gmail.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Илья (Gerrit)

unread,
Jul 18, 2026, 8:57:52 AM (4 days ago) Jul 18
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Dmitri Shuralyov and Michael Knyszek

Илья uploaded new patchset

Илья uploaded patch set #3 to this change.
Open in Gerrit

Related details

Attention is currently required from:
  • Dmitri Shuralyov
  • Michael Knyszek
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c
Gerrit-Change-Number: 802540
Gerrit-PatchSet: 3
Gerrit-Owner: Илья <il.t...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
Gerrit-Attention: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Attention: Michael Knyszek <mkny...@google.com>
unsatisfied_requirement
satisfied_requirement
open
diffy

Dmitri Shuralyov (Gerrit)

unread,
Jul 18, 2026, 11:01:08 AM (3 days ago) Jul 18
to Илья, goph...@pubsubhelper.golang.org, Dmitri Shuralyov, Michael Knyszek, golang-co...@googlegroups.com
Attention needed from Michael Knyszek and Илья

Dmitri Shuralyov voted and added 1 comment

Votes added by Dmitri Shuralyov

Code-Review+2

1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Dmitri Shuralyov . resolved

Thanks.

Open in Gerrit

Related details

Attention is currently required from:
  • Michael Knyszek
  • Илья
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c
Gerrit-Change-Number: 802540
Gerrit-PatchSet: 3
Gerrit-Owner: Илья <il.t...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
Gerrit-Attention: Илья <il.t...@gmail.com>
Gerrit-Attention: Michael Knyszek <mkny...@google.com>
Gerrit-Comment-Date: Sat, 18 Jul 2026 15:01:02 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Dmitri Shuralyov (Gerrit)

unread,
Jul 18, 2026, 11:01:33 AM (3 days ago) Jul 18
to Илья, goph...@pubsubhelper.golang.org, Dmitri Shuralyov, Michael Knyszek, golang-co...@googlegroups.com
Attention needed from Michael Knyszek

Dmitri Shuralyov voted

Auto-Submit+1
Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Michael Knyszek
Submit Requirements:
  • requirement satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c
Gerrit-Change-Number: 802540
Gerrit-PatchSet: 3
Gerrit-Owner: Илья <il.t...@gmail.com>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
Gerrit-Attention: Michael Knyszek <mkny...@google.com>
Gerrit-Comment-Date: Sat, 18 Jul 2026 15:01:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Carlos Amedee (Gerrit)

unread,
Jul 20, 2026, 11:29:31 AM (yesterday) Jul 20
to Илья, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Dmitri Shuralyov, Michael Knyszek, golang-co...@googlegroups.com
Attention needed from Michael Knyszek and Илья

Carlos Amedee voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Michael Knyszek
  • Илья
Submit Requirements:
    • requirement satisfiedCode-Review
    • requirement satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c
    Gerrit-Change-Number: 802540
    Gerrit-PatchSet: 3
    Gerrit-Owner: Илья <il.t...@gmail.com>
    Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
    Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
    Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
    Gerrit-Attention: Илья <il.t...@gmail.com>
    Gerrit-Attention: Michael Knyszek <mkny...@google.com>
    Gerrit-Comment-Date: Mon, 20 Jul 2026 15:29:26 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Cherry Mui (Gerrit)

    unread,
    7:21 PM (3 hours ago) 7:21 PM
    to Илья, goph...@pubsubhelper.golang.org, Carlos Amedee, golang...@luci-project-accounts.iam.gserviceaccount.com, Dmitri Shuralyov, Michael Knyszek, golang-co...@googlegroups.com
    Attention needed from Michael Knyszek and Илья

    Cherry Mui voted Code-Review+1

    Code-Review+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Michael Knyszek
    • Илья
    Submit Requirements:
      • requirement satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      • requirement satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c
      Gerrit-Change-Number: 802540
      Gerrit-PatchSet: 3
      Gerrit-Owner: Илья <il.t...@gmail.com>
      Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
      Gerrit-Reviewer: Cherry Mui <cher...@google.com>
      Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
      Gerrit-Reviewer: Michael Knyszek <mkny...@google.com>
      Gerrit-Attention: Илья <il.t...@gmail.com>
      Gerrit-Attention: Michael Knyszek <mkny...@google.com>
      Gerrit-Comment-Date: Tue, 21 Jul 2026 23:20:57 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Gopher Robot (Gerrit)

      unread,
      7:22 PM (3 hours ago) 7:22 PM
      to Илья, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Cherry Mui, Carlos Amedee, golang...@luci-project-accounts.iam.gserviceaccount.com, Dmitri Shuralyov, Michael Knyszek, golang-co...@googlegroups.com

      Gopher Robot submitted the change

      Change information

      Commit message:
      cmd/dist: remove unused omitVariant field

      No test sets omitVariant to true anymore, so !opts.omitVariant is
      always true and the field is dead. Remove it, as its TODO suggests:
      having timing information in ResultDB that corresponds directly with
      dist test names is too valuable to give up.
      Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c
      Reviewed-by: Dmitri Shuralyov <dmit...@golang.org>
      Reviewed-by: Carlos Amedee <car...@golang.org>
      Auto-Submit: Dmitri Shuralyov <dmit...@golang.org>
      Reviewed-by: Cherry Mui <cher...@google.com>
      Files:
      • M src/cmd/dist/test.go
      Change size: S
      Delta: 1 file changed, 14 insertions(+), 26 deletions(-)
      Branch: refs/heads/master
      Submit Requirements:
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I4b8e2d054770f5224dbb8e4c5ea136f058f2d48c
      Gerrit-Change-Number: 802540
      Gerrit-PatchSet: 4
      Gerrit-Owner: Илья <il.t...@gmail.com>
      Gerrit-Reviewer: Carlos Amedee <car...@golang.org>
      Gerrit-Reviewer: Cherry Mui <cher...@google.com>
      Gerrit-Reviewer: Dmitri Shuralyov <dmit...@golang.org>
      Gerrit-Reviewer: Gopher Robot <go...@golang.org>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages