ci(bazel): split embedded conformance core into two targets (#7446)
//internal/storage/embeddeddolt:embeddeddolt_conformance_core_test ran conformance.RunAll minus Audit as one unsharded action, 108-150s on rbe-west, the embedded lane's longest after #7443. Every RunAll group builds its own store from the factory, so the groups share no state and can run in separate processes; about half the time was two groups, ReadyCountsPageChunking (~33s) and Portable (~20s). The new embeddeddolt_conformance_core_slow_test runs exactly those two groups (-test.run=^TestConformance$/^(ReadyCountsPageChunking|Portable)$), and the core target skips them along with Audit. The core target skips only named groups, so any group added to or renamed in RunAll still runs there: between them the two targets run every core group exactly once (rbe-west: 57 + 2 groups, no overlap, the same 59 as before). No test changed. The frozen-partition check now derives both targets' selectors from the retired job's core selector plus conformanceCoreSlowGroups; the retired-lane arg pins, bazel.yml's --whole list and the BUILD rules carry the new target. rbe-west, `bazel test //... --config=embedded --nocache_test_results`: conformance core 148s -> 55s + 57s. Bead: ga-vnycm2.31 Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d15958a5eb
commit
c21880105f
4 changed files with 79 additions and 8 deletions
1
.github/workflows/bazel.yml
vendored
1
.github/workflows/bazel.yml
vendored
|
|
@ -1399,6 +1399,7 @@ jobs:
|
|||
--suite //cmd/bd:bd_embedded_part2_test .github/scripts/embedded-test-shard.sh 50@50/100
|
||||
--suite //internal/storage/embeddeddolt:embeddeddolt_embedded_test .github/scripts/embedded-storage-test-shard.sh 40
|
||||
--whole //internal/storage/embeddeddolt:embeddeddolt_conformance_core_test
|
||||
--whole //internal/storage/embeddeddolt:embeddeddolt_conformance_core_slow_test
|
||||
--whole //internal/storage/embeddeddolt:embeddeddolt_conformance_audit_test
|
||||
|
||||
- name: Upload test logs
|
||||
|
|
|
|||
|
|
@ -315,7 +315,13 @@ sh_test(
|
|||
)
|
||||
|
||||
# PR Risk's "Test (Embedded Dolt Conformance - core)" job: conformance.RunAll
|
||||
# except its Audit group, with the job's binary flags but -test.timeout.
|
||||
# except its Audit group, with the job's binary flags but -test.timeout. It
|
||||
# runs as two targets: this one skips Audit and the groups
|
||||
# embeddeddolt_conformance_core_slow_test (below) runs, so the two run every
|
||||
# core group exactly once between them (a group added to RunAll lands here).
|
||||
# As one action it took 108-150s on rbe-west, ~half of it those two groups.
|
||||
# Every RunAll group builds its own store from the factory, so the split
|
||||
# shares no state.
|
||||
#
|
||||
# Tags:
|
||||
# embedded: the embedded-Dolt tier; excluded from --config=prcore/ci,
|
||||
|
|
@ -335,7 +341,32 @@ sh_test(
|
|||
"-test.count=1",
|
||||
"-test.timeout=19m",
|
||||
"-test.run=^TestConformance$$",
|
||||
"-test.skip=^TestConformance$$/^Audit$$",
|
||||
"-test.skip=^TestConformance$$/^(Audit|ReadyCountsPageChunking|Portable)$$",
|
||||
],
|
||||
data = [":embeddeddolt_test"],
|
||||
env = {"BEADS_TEST_EMBEDDED_DOLT": "1"},
|
||||
tags = ["embedded"],
|
||||
)
|
||||
|
||||
# The slow groups of the core conformance partition (see
|
||||
# embeddeddolt_conformance_core_test, which skips exactly these):
|
||||
# ReadyCountsPageChunking (~33s) and Portable (~20s) under -race.
|
||||
#
|
||||
# Tags:
|
||||
# embedded: the embedded-Dolt tier; excluded from --config=prcore/ci,
|
||||
# selected by --config=embedded.
|
||||
sh_test(
|
||||
name = "embeddeddolt_conformance_core_slow_test",
|
||||
size = "large",
|
||||
# -test.timeout=19m: as embeddeddolt_conformance_core_test.
|
||||
timeout = "eternal",
|
||||
srcs = ["//tools/bazel:go_test_variant.sh"],
|
||||
args = [
|
||||
"$(rootpath :embeddeddolt_test)",
|
||||
"-test.v",
|
||||
"-test.count=1",
|
||||
"-test.timeout=19m",
|
||||
"-test.run=^TestConformance$$/^(ReadyCountsPageChunking|Portable)$$",
|
||||
],
|
||||
data = [":embeddeddolt_test"],
|
||||
env = {"BEADS_TEST_EMBEDDED_DOLT": "1"},
|
||||
|
|
|
|||
|
|
@ -4393,12 +4393,32 @@ func TestBazelEmbeddedJobRunsEmbeddedTier(t *testing.T) {
|
|||
}
|
||||
|
||||
// The retired test-embedded-conformance job's two partitions, frozen.
|
||||
// Core runs as two targets: embeddeddolt_conformance_core_test runs the
|
||||
// job's core selector but also skips conformanceCoreSlowGroups, which
|
||||
// embeddeddolt_conformance_core_slow_test runs instead, so between them
|
||||
// they run every core group exactly once.
|
||||
conformance := map[string]string{
|
||||
"core": `/tmp/embeddeddolt-test -test.v -test.count=1 -test.timeout=30m -test.run '^TestConformance$' -test.skip '^TestConformance$/^Audit$'`,
|
||||
"audit": `/tmp/embeddeddolt-test -test.v -test.count=1 -test.timeout=30m -test.run '^TestConformance$/^Audit$'`,
|
||||
}
|
||||
slow := strings.Join(conformanceCoreSlowGroups, "|")
|
||||
// What each target's rule must say instead of the job's own selector.
|
||||
retarget := map[string]map[string]string{
|
||||
"embeddeddolt_conformance_core_test": {
|
||||
`"-test.skip=^TestConformance$$/^Audit$$",`: `"-test.skip=^TestConformance$$/^(Audit|` + slow + `)$$",`,
|
||||
},
|
||||
"embeddeddolt_conformance_core_slow_test": {
|
||||
`"-test.run=^TestConformance$$",`: `"-test.run=^TestConformance$$/^(` + slow + `)$$",`,
|
||||
`"-test.skip=^TestConformance$$/^Audit$$",`: "",
|
||||
},
|
||||
}
|
||||
quoted := regexp.MustCompile(`(-test\.[a-z]+) '([^']*)'|(-test\.[a-z]+=\S+|-test\.v)`)
|
||||
for partition, target := range map[string]string{"core": "embeddeddolt_conformance_core_test", "audit": "embeddeddolt_conformance_audit_test"} {
|
||||
for _, c := range []struct{ partition, target string }{
|
||||
{"core", "embeddeddolt_conformance_core_test"},
|
||||
{"core", "embeddeddolt_conformance_core_slow_test"},
|
||||
{"audit", "embeddeddolt_conformance_audit_test"},
|
||||
} {
|
||||
partition, target := c.partition, c.target
|
||||
run := conformance[partition]
|
||||
fields := strings.Fields(run)
|
||||
if len(fields) == 0 || fields[0] != "/tmp/embeddeddolt-test" {
|
||||
|
|
@ -4406,15 +4426,22 @@ func TestBazelEmbeddedJobRunsEmbeddedTier(t *testing.T) {
|
|||
}
|
||||
var want []string
|
||||
for _, m := range quoted.FindAllStringSubmatch(run, -1) {
|
||||
var w string
|
||||
switch {
|
||||
case m[1] != "":
|
||||
want = append(want, `"`+m[1]+"="+strings.ReplaceAll(m[2], "$", "$$")+`",`)
|
||||
w = `"` + m[1] + "=" + strings.ReplaceAll(m[2], "$", "$$") + `",`
|
||||
case strings.HasPrefix(m[3], "-test.timeout="):
|
||||
// Documented deviation: Bazel kills at 1200s without a
|
||||
// goroutine dump, so the variant's Go timeout is 19m.
|
||||
want = append(want, `"-test.timeout=19m",`)
|
||||
w = `"-test.timeout=19m",`
|
||||
default:
|
||||
want = append(want, `"`+m[3]+`",`)
|
||||
w = `"` + m[3] + `",`
|
||||
}
|
||||
if r, ok := retarget[target][w]; ok {
|
||||
w = r
|
||||
}
|
||||
if w != "" {
|
||||
want = append(want, w)
|
||||
}
|
||||
}
|
||||
if len(want) < 4 {
|
||||
|
|
@ -4429,6 +4456,14 @@ func TestBazelEmbeddedJobRunsEmbeddedTier(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
// conformanceCoreSlowGroups are the conformance.RunAll groups
|
||||
// embeddeddolt_conformance_core_slow_test runs and
|
||||
// embeddeddolt_conformance_core_test skips. The core target skips only these
|
||||
// names, so a group renamed or added in RunAll still runs there: a name here
|
||||
// that RunAll no longer has matches nothing in either target and loses no
|
||||
// group, only the split (core gets slower again).
|
||||
var conformanceCoreSlowGroups = []string{"ReadyCountsPageChunking", "Portable"}
|
||||
|
||||
// bazel-pure replaces pr.yml's check-cmd-bd-puregeo-tests job: the same pure
|
||||
// cmd/bd test selector, the same pure build set, and the js/wasm hook test
|
||||
// under the same exact-count guard.
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ func TestBazelRetiredLanesCheckListedTestsRan(t *testing.T) {
|
|||
// The cmd/bd block is split over embeddedCmdTargets: one
|
||||
// --suite each, SHARDS@OFFSET/TOTAL (added below).
|
||||
{"test-embedded-storage", "Test", "//internal/storage/embeddeddolt:embeddeddolt_embedded_test", ".github/scripts/embedded-storage-test-shard.sh", -1},
|
||||
}, []string{"//internal/storage/embeddeddolt:embeddeddolt_conformance_core_test", "//internal/storage/embeddeddolt:embeddeddolt_conformance_audit_test"}},
|
||||
}, []string{"//internal/storage/embeddeddolt:embeddeddolt_conformance_core_test", "//internal/storage/embeddeddolt:embeddeddolt_conformance_core_slow_test", "//internal/storage/embeddeddolt:embeddeddolt_conformance_audit_test"}},
|
||||
{bazelProxiedJobName, "doltserver-proxied", []suite{
|
||||
// bazel-proxied runs its own duration-balanced manifest block
|
||||
// (scripts/ci/proxied_test_durations.json), not PR Risk's frozen
|
||||
|
|
@ -874,7 +874,11 @@ func TestBazelRetiredLanesCannotBeNarrowed(t *testing.T) {
|
|||
map[string]string{"BEADS_TEST_EMBEDDED_DOLT": "1"},
|
||||
},
|
||||
"//internal/storage/embeddeddolt:embeddeddolt_conformance_core_test": {
|
||||
[]string{"$(rootpath :embeddeddolt_test)", "-test.v", "-test.count=1", "-test.timeout=19m", "-test.run=^TestConformance$$", "-test.skip=^TestConformance$$/^Audit$$"},
|
||||
[]string{"$(rootpath :embeddeddolt_test)", "-test.v", "-test.count=1", "-test.timeout=19m", "-test.run=^TestConformance$$", "-test.skip=^TestConformance$$/^(Audit|ReadyCountsPageChunking|Portable)$$"},
|
||||
map[string]string{"BEADS_TEST_EMBEDDED_DOLT": "1"},
|
||||
},
|
||||
"//internal/storage/embeddeddolt:embeddeddolt_conformance_core_slow_test": {
|
||||
[]string{"$(rootpath :embeddeddolt_test)", "-test.v", "-test.count=1", "-test.timeout=19m", "-test.run=^TestConformance$$/^(ReadyCountsPageChunking|Portable)$$"},
|
||||
map[string]string{"BEADS_TEST_EMBEDDED_DOLT": "1"},
|
||||
},
|
||||
"//internal/storage/embeddeddolt:embeddeddolt_conformance_audit_test": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue