Skip to content

Commit

Permalink
main.star: rewrite regexp for files related to vendored code
Browse files Browse the repository at this point in the history
We have a recent data point showing the regexp added in CL 547596 isn't
working as intended: no longtest builder was started in CL 593684 even
though it modified vendored files.

I suspect the problem was that {path1,path2} is pseudo-syntax we use in
Go issue titles and such, but it's not a valid regexp pattern. Use one
with a capturing group like (path1|path2) instead.

Also generalize the pattern such that it works even if there is a new
module, something other than cmd or std. Such changes are rare enough
that we'd want a longtest builder to always run.

Do the same for ssacheck while here.

For golang/go#42661.

Change-Id: I6d52193bbbd46e4e4a990356a01261f63338e5f7
Reviewed-on: https://go-review.googlesource.com/c/build/+/594615
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
  • Loading branch information
dmitshur authored and gopherbot committed Jun 24, 2024
1 parent a1a679d commit e61ecf6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
28 changes: 14 additions & 14 deletions generated/commit-queue.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27053,7 +27053,7 @@ config_groups {
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/cmd/compile/internal/{ssa,ssagen}/.+"
path_regexp: "src/cmd/compile/internal/(ssa|ssagen)/.+"
}
}
builders {
Expand Down Expand Up @@ -27834,7 +27834,7 @@ config_groups {
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/cmd/compile/internal/{ssa,ssagen}/.+"
path_regexp: "src/cmd/compile/internal/(ssa|ssagen)/.+"
}
}
builders {
Expand Down Expand Up @@ -28615,7 +28615,7 @@ config_groups {
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/cmd/compile/internal/{ssa,ssagen}/.+"
path_regexp: "src/cmd/compile/internal/(ssa|ssagen)/.+"
}
}
builders {
Expand Down Expand Up @@ -29340,12 +29340,12 @@ config_groups {
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}go[.]{mod,sum}"
path_regexp: "src/.+/go[.](mod|sum)"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}vendor/.+"
path_regexp: "src/.+/vendor/.+"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
Expand Down Expand Up @@ -29387,12 +29387,12 @@ config_groups {
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}go[.]{mod,sum}"
path_regexp: "src/.+/go[.](mod|sum)"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}vendor/.+"
path_regexp: "src/.+/vendor/.+"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
Expand All @@ -29411,12 +29411,12 @@ config_groups {
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}go[.]{mod,sum}"
path_regexp: "src/.+/go[.](mod|sum)"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}vendor/.+"
path_regexp: "src/.+/vendor/.+"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
Expand Down Expand Up @@ -29462,7 +29462,7 @@ config_groups {
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/cmd/compile/internal/{ssa,ssagen}/.+"
path_regexp: "src/cmd/compile/internal/(ssa|ssagen)/.+"
}
}
builders {
Expand Down Expand Up @@ -29528,12 +29528,12 @@ config_groups {
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}go[.]{mod,sum}"
path_regexp: "src/.+/go[.](mod|sum)"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}vendor/.+"
path_regexp: "src/.+/vendor/.+"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
Expand Down Expand Up @@ -29703,12 +29703,12 @@ config_groups {
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}go[.]{mod,sum}"
path_regexp: "src/.+/go[.](mod|sum)"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
gerrit_project_regexp: "^go$"
path_regexp: "src/{,cmd/}vendor/.+"
path_regexp: "src/.+/vendor/.+"
}
location_filters {
gerrit_host_regexp: "go-review.googlesource.com"
Expand Down
6 changes: 3 additions & 3 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -804,8 +804,8 @@ RUN_MODS = dict(
"build": [],
"go": [
# Enable longtest builders on go against tip if files related to vendored code are modified.
"src/{,cmd/}go[.]{mod,sum}",
"src/{,cmd/}vendor/.+",
"src/.+/go[.](mod|sum)",
"src/.+/vendor/.+",
"src/.+_bundle.go",
# Enable longtest builders on go against tip if files in the crypto/tls tree are modified,
# so that the BoGo test suite is run.
Expand Down Expand Up @@ -912,7 +912,7 @@ RUN_MODS = dict(
ssacheck = make_run_mod(
add_props = {"compile_only": True},
add_env = {"GO_GCFLAGS": "-d=ssa/check/on"},
enabled = define_for_go_postsubmit_or_presubmit_with_filters(["src/cmd/compile/internal/{ssa,ssagen}/.+"]),
enabled = define_for_go_postsubmit_or_presubmit_with_filters(["src/cmd/compile/internal/(ssa|ssagen)/.+"]),
),

# Build and test with the staticlockranking GOEXPERIMENT, which validates the runtime's
Expand Down

0 comments on commit e61ecf6

Please sign in to comment.