diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml deleted file mode 100644 index e78244381..000000000 --- a/.github/workflows/conformance.yml +++ /dev/null @@ -1,108 +0,0 @@ -name: Conformance - -# Runs the same two-tier storage conformance suite developers run locally: -# the in-process store corpus and the real-binary CLI harness. - -on: - pull_request: - branches: [ main, 'release/**', 'hotfix/**' ] - # "Upgrade-relevant code" allowlist (spec-f7.md §2.4): any non-test Go - # change, build input, or this workflow's own inputs. Kept byte-for-byte - # identical (modulo each workflow's own file/script entries) across - # conformance.yml, migration-test.yml and cross-version-smoke.yml, and - # pinned by TestAdvisoryWorkflowPathFilters. - paths: - - '**.go' - - '!**_test.go' - - 'go.mod' - - 'go.sum' - - 'Makefile' - - '.buildflags' - - '.github/workflows/conformance.yml' - - 'scripts/conformance.sh' - - 'test/conformance/**' - - 'internal/storage/embeddeddolt/conformance_test.go' - # F7c review fix S4: TestMain (the fixture that builds the - # pristine embedded-Dolt databases conformance_test.go and every - # other test in this package reuse) lives here, not in - # conformance_test.go itself; a PR editing only the fixture was - # previously excluded by '!**_test.go' with nothing to re-include it. - - 'internal/storage/embeddeddolt/test_fixture_test.go' - - 'backend/conformance/**' - push: - branches: [ main ] - paths: - - '**.go' - - '!**_test.go' - - 'go.mod' - - 'go.sum' - - 'Makefile' - - '.buildflags' - - '.github/workflows/conformance.yml' - - 'scripts/conformance.sh' - - 'test/conformance/**' - - 'internal/storage/embeddeddolt/conformance_test.go' - # F7c review fix S4: TestMain (the fixture that builds the - # pristine embedded-Dolt databases conformance_test.go and every - # other test in this package reuse) lives here, not in - # conformance_test.go itself; a PR editing only the fixture was - # previously excluded by '!**_test.go' with nothing to re-include it. - - 'internal/storage/embeddeddolt/test_fixture_test.go' - - 'backend/conformance/**' - merge_group: - -concurrency: - group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - BD_DISABLE_METRICS: "1" - BD_DISABLE_EVENT_FLUSH: "1" - -jobs: - conformance: - name: Storage backend conformance (embedded Dolt oracle) - timeout-minutes: 45 - runs-on: ${{ (github.event_name == 'merge_group' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) && 'blacksmith-4vcpu-ubuntu-2404' || 'ubuntu-latest' }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6 - - - name: Set up Go - id: setup-go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 - with: - go-version-file: 'go.mod' - # F7c review fix N1: fail-closed. setup-go's own implicit cache - # must stay off on Blacksmith (it would try to use a GitHub-hosted - # cache entry Blacksmith can't see, and only the self-keyed - # blacksmith-sg-v1- restore below should feed this job there); the - # prior `!= 'self-hosted'` form fails OPEN (caching turns on) if - # runner.environment is ever empty/unknown for some future runner - # class, instead of staying off until proven github-hosted. - cache: ${{ runner.environment == 'github-hosted' }} - - # F7c review fix S5: this job's own key copy must match main.yml's - # seeder key byte-for-byte (TestBlacksmithSetupGoCacheKeysMatchAcrossSeederAndConsumers), - # which now keys by UTC calendar day instead of github.sha so main - # pushes don't churn a multi-GB cache entry on every commit; this step - # computes that same day value locally so the key expression below - # resolves (steps.* references only resolve within the same job). - - name: Compute cache date - id: cache-date - if: runner.environment == 'self-hosted' - run: echo "today=$(date -u +%Y%m%d)" >> "$GITHUB_OUTPUT" - - - name: Restore Blacksmith setup-go cache - if: runner.environment == 'self-hosted' - uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: blacksmith-sg-v1-${{ runner.os }}-${{ runner.arch }}-go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('go.sum') }}-${{ steps.cache-date.outputs.today }} - restore-keys: | - blacksmith-sg-v1-${{ runner.os }}-${{ runner.arch }}-go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('go.sum') }}- - blacksmith-sg-v1-${{ runner.os }}-${{ runner.arch }}-go-${{ steps.setup-go.outputs.go-version }}- - - - name: Run conformance (embedded Dolt oracle) - run: ./scripts/conformance.sh diff --git a/.github/workflows/docs-mintlify.yml b/.github/workflows/docs-mintlify.yml index 6c4d7d953..171174ee0 100644 --- a/.github/workflows/docs-mintlify.yml +++ b/.github/workflows/docs-mintlify.yml @@ -3,26 +3,15 @@ name: Docs (Mintlify) checks on: pull_request: types: [opened, synchronize, reopened, ready_for_review] + # The Mintlify site and the check itself. The docsync guard (docs nav, + # links and agent-instruction routing over docs/, engdocs/ and the root + # markdown) is //test/docsync:docsync_test, which bazel.yml's --config=ci + # lane runs on every PR; this workflow keeps only Mintlify's own + # broken-link check, which needs the network (npx mint) and the base + # branch's history. paths: - # The docsync guard also validates engdocs/** and the curated root - # markdown files (rootDocFiles in test/docsync/docsync_test.go) — keep - # this filter in sync with that list, or a docs-breaking PR merges - # green and turns main red at the full test run. - 'docs/**' - - 'engdocs/**' - - 'test/docsync/**' - 'mint.sh' - - 'README.md' - - 'AGENTS.md' - - 'AGENT_INSTRUCTIONS.md' - - 'CONTRIBUTING.md' - - 'CLAUDE.md' - - 'RELEASING.md' - - 'PR_MAINTAINER_GUIDELINES.md' - - 'ROADMAP.md' - - '**/AGENTS.md' - - '**/CLAUDE.md' - - '.github/copilot-instructions.md' - '.github/scripts/docs-render-check.sh' - '.github/workflows/docs-mintlify.yml' @@ -34,47 +23,6 @@ concurrency: cancel-in-progress: true jobs: - docsync: - name: Docs nav/link sync (docsync guard) - runs-on: ${{ (github.event_name == 'merge_group' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }} - timeout-minutes: 10 - if: github.event.pull_request.draft == false - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6 - - - name: Set up Go - id: setup-go - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 - with: - go-version-file: 'go.mod' - cache: ${{ runner.environment == 'github-hosted' }} - - # F7c review fix S5: this job's own key copy must match main.yml's - # seeder key byte-for-byte (TestBlacksmithSetupGoCacheKeysMatchAcrossSeederAndConsumers), - # which now keys by UTC calendar day instead of github.sha so main - # pushes don't churn a multi-GB cache entry on every commit; this step - # computes that same day value locally so the key expression below - # resolves (steps.* references only resolve within the same job). - - name: Compute cache date - id: cache-date - if: runner.environment == 'self-hosted' - run: echo "today=$(date -u +%Y%m%d)" >> "$GITHUB_OUTPUT" - - - name: Restore Blacksmith setup-go cache - if: runner.environment == 'self-hosted' - uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 - with: - path: | - ~/go/pkg/mod - ~/.cache/go-build - key: blacksmith-sg-v1-${{ runner.os }}-${{ runner.arch }}-go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('go.sum') }}-${{ steps.cache-date.outputs.today }} - restore-keys: | - blacksmith-sg-v1-${{ runner.os }}-${{ runner.arch }}-go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('go.sum') }}- - blacksmith-sg-v1-${{ runner.os }}-${{ runner.arch }}-go-${{ steps.setup-go.outputs.go-version }}- - - - name: Run docsync guard - run: go test -tags=gms_pure_go ./test/docsync - broken-links: name: Mintlify broken-links (baseline-aware) runs-on: ${{ (github.event_name == 'merge_group' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) && 'blacksmith-2vcpu-ubuntu-2404' || 'ubuntu-latest' }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b9ff6ec52..c0b5cff73 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1081,9 +1081,9 @@ jobs: echo "Help text first line is correct" # F7c: Blacksmith cannot see GitHub-hosted cache entries, so the advisory - # workflows that moved onto a same-repo-PR Blacksmith runner (Conformance, - # Regression's PR run, Migration Test Harness, Cross-Version Smoke, Docs - # docsync, Proxied Local) need a Blacksmith-side writer for their Go build + # workflows that moved onto a same-repo-PR Blacksmith runner (Regression's + # PR run, Migration Test Harness, Cross-Version Smoke, Proxied Local) need a + # Blacksmith-side writer for their Go build # cache. This job is push-to-main only (always trusted), so it is the ONLY # writer: it always restores whatever is available, unconditionally re-runs # every warm-up command (not gated on a cache hit), and then always saves @@ -1166,12 +1166,6 @@ jobs: - name: Compile regression tests run: go test -c -tags regression,gms_pure_go ./tests/regression - - name: Compile embedded Dolt conformance tests - run: go test -c -tags gms_pure_go ./internal/storage/embeddeddolt - - - name: Compile e2e conformance tests - run: go test -c -tags 'gms_pure_go e2e' ./test/conformance - # Always save (even if a warm-up step above failed) under a fresh, # commit-specific key: the content is still a valid, newer GOCACHE/ # GOMODCACHE snapshot than whatever was restored, and `cache/save` is a diff --git a/engdocs/CI_REQUIRED_CHECK_TOPOLOGY.md b/engdocs/CI_REQUIRED_CHECK_TOPOLOGY.md index 72b3c0d01..c31517132 100644 --- a/engdocs/CI_REQUIRED_CHECK_TOPOLOGY.md +++ b/engdocs/CI_REQUIRED_CHECK_TOPOLOGY.md @@ -1152,10 +1152,19 @@ manifests. On those PRs they are the tiers' only pre-merge run, and - Verified on a real remote run before step 2 (2026-10-01): proxied 164 top-level tests over 15 shards, 0 skipped; server storage 1246 + 1 conformance, 10 skipped (none all-skipped); both checkers pass. -- Not changed: `conformance.yml`'s Tier 1 (`scripts/conformance.sh`) runs the - embedded-Dolt `TestConformance` again (non-race, unsharded), duplicating - `test-embedded-conformance` and the Bazel lane. It is not part of either - required gate; retiring it is a separate decision. +- `conformance.yml` is retired. Its Tier 1 (the embedded-Dolt + `TestConformance`) duplicated `test-embedded-conformance` and the + embedded lane's `embeddeddolt_conformance_{core,audit}_test`; its Tier 2 + (the real-binary CLI corpus, `go test -tags 'gms_pure_go e2e' + ./test/conformance`) is `//test/conformance:conformance_test` against the + injected non-race `bd_for_tests`. Its files build under `e2e || + integration`, so it is `integration-only` and `--config=integration` runs + it in `bazel-integration`, which `pr.yml`'s gate requires (PR Core's `go + test` builds neither tag). Neither tier was part of a required gate + before. `scripts/conformance.sh` stays as the local `go test` entrypoint. + `docs-mintlify.yml` likewise drops its docsync job (`go test + ./test/docsync`, which `bazel-test` runs as `//test/docsync:docsync_test`) + and keeps only Mintlify's network-bound broken-link check. ### F7a: Same-Repo Blacksmith Moves and Job Folds diff --git a/scripts/ci_f7c_advisory_test.go b/scripts/ci_f7c_advisory_test.go index 8f6c8cc95..52286f66d 100644 --- a/scripts/ci_f7c_advisory_test.go +++ b/scripts/ci_f7c_advisory_test.go @@ -27,11 +27,12 @@ import ( // because it now names a Blacksmith label, and the Blacksmith-side setup-go // seed in main.yml actually exists for the jobs that depend on it. -// advisoryPathFilteredWorkflows are the three workflows that share the +// advisoryPathFilteredWorkflows are the workflows that share the // "upgrade-relevant code" allowlist verbatim, save for each one's own -// workflow-file and script entries (spec-f7.md §2.4). +// workflow-file and script entries (spec-f7.md §2.4). conformance.yml was +// the third until its tiers moved to Bazel (embeddeddolt_conformance_*, +// //test/conformance:conformance_test). var advisoryPathFilteredWorkflows = []string{ - "conformance.yml", "migration-test.yml", "cross-version-smoke.yml", } @@ -51,24 +52,6 @@ var advisoryPathFilterBase = []string{ // advisoryPathFilterOwnEntries is each workflow's own file/script additions, // appended after advisoryPathFilterBase. var advisoryPathFilterOwnEntries = map[string][]string{ - "conformance.yml": { - ".github/workflows/conformance.yml", - "scripts/conformance.sh", - "test/conformance/**", - // F7c review fix (S3): conformance.sh's own comments name this file - // as the Tier-1 embedded-Dolt oracle test it runs under - // BEADS_TEST_EMBEDDED_DOLT=1; it was previously excluded from the - // filter by the shared base's `!**_test.go` negation. - "internal/storage/embeddeddolt/conformance_test.go", - // F7c review fix (S4): TestMain for the whole embeddeddolt package - // (the fixture conformance_test.go and every sibling test reuse) - // lives in test_fixture_test.go, not conformance_test.go; it was - // excluded by the same `!**_test.go` negation with nothing to - // re-include it until now. - "internal/storage/embeddeddolt/test_fixture_test.go", - // Future-proofing: mirrors the existing test/conformance/** re-include. - "backend/conformance/**", - }, "migration-test.yml": { ".github/workflows/migration-test.yml", "scripts/migration-test/**", @@ -119,19 +102,6 @@ func readPushPaths(t *testing.T, file string) []string { return parsed.On.Push.Paths } -// TestConformancePushPathsMatchPullRequestPaths pins that conformance.yml's -// push.paths and pull_request.paths stay byte-for-byte identical, in order -// (F7c review fix S1/S3): a change that updates one list but not the other -// would silently create a gap where main's push run and a PR's run disagree -// about what counts as "upgrade-relevant code". -func TestConformancePushPathsMatchPullRequestPaths(t *testing.T) { - pr := readPullRequestPaths(t, "conformance.yml") - push := readPushPaths(t, "conformance.yml") - if !equalStrings(pr, push) { - t.Errorf("conformance.yml pull_request.paths = %v, push.paths = %v; want identical", pr, push) - } -} - // TestAdvisoryWorkflowPathFiltersAreIdentical pins that the shared base of // the "upgrade-relevant code" allowlist is byte-for-byte identical, in the // same order, across all three workflows it applies to. GitHub Actions has no @@ -719,7 +689,6 @@ func TestCrossVersionSmokeChunksEveryResolvedVersion(t *testing.T) { // blacksmithAdvisoryWorkflows are every workflow file F7c moved a job onto a // same-repo-PR (or push-only, for main.yml's seed) Blacksmith runner. var blacksmithAdvisoryWorkflows = []string{ - "conformance.yml", "regression.yml", "migration-test.yml", "cross-version-smoke.yml", @@ -777,12 +746,10 @@ var advisoryBlacksmithRunnerJobs = []struct { blacksmithLabel string fallback string }{ - {"conformance.yml", "conformance", "blacksmith-4vcpu-ubuntu-2404", "ubuntu-latest"}, {"regression.yml", "regression", "blacksmith-4vcpu-ubuntu-2404", "ubuntu-latest"}, {"migration-test.yml", "historical-upgrades", "blacksmith-4vcpu-ubuntu-2404", "ubuntu-24.04"}, {"cross-version-smoke.yml", "smoke", "blacksmith-4vcpu-ubuntu-2404", "ubuntu-latest"}, {"cross-version-smoke.yml", "versions", "blacksmith-2vcpu-ubuntu-2404", "ubuntu-latest"}, - {"docs-mintlify.yml", "docsync", "blacksmith-2vcpu-ubuntu-2404", "ubuntu-latest"}, {"docs-mintlify.yml", "broken-links", "blacksmith-2vcpu-ubuntu-2404", "ubuntu-latest"}, {"proxied-local-smoke.yml", "managed-local-smoke", "blacksmith-4vcpu-ubuntu-2404", "ubuntu-latest"}, } @@ -850,11 +817,9 @@ func TestF7cAdvisorySameRepoBlacksmithExpressionSemantics(t *testing.T) { // self-defined `blacksmith-sg-v1-` setup-go cache main.yml's // blacksmith-setup-go-cache job seeds (B2, F7c implementation report). var blacksmithSetupGoCacheConsumers = map[string][]string{ - "conformance.yml": {"conformance"}, "regression.yml": {"regression"}, "migration-test.yml": {"historical-upgrades"}, "cross-version-smoke.yml": {"smoke"}, - "docs-mintlify.yml": {"docsync"}, "proxied-local-smoke.yml": {"managed-local-smoke"}, } @@ -920,8 +885,6 @@ func TestBlacksmithSetupGoSeedExistsForAdvisoryConsumers(t *testing.T) { wantWarmups := []string{ "make build", "go test -c -tags regression,gms_pure_go ./tests/regression", - "go test -c -tags gms_pure_go ./internal/storage/embeddeddolt", - "go test -c -tags 'gms_pure_go e2e' ./test/conformance", } for _, want := range wantWarmups { found := false diff --git a/scripts/ci_workflow_test.go b/scripts/ci_workflow_test.go index a812b12db..3e6fd4bd9 100644 --- a/scripts/ci_workflow_test.go +++ b/scripts/ci_workflow_test.go @@ -110,7 +110,7 @@ func TestPullRequestWorkflowsTriggerOnHotfixBranches(t *testing.T) { } root := sourceRepoRoot(t) for _, name := range []string{ - "pr.yml", prRiskWorkflowName, "conformance.yml", "cross-version-smoke.yml", "regression.yml", + "pr.yml", prRiskWorkflowName, "cross-version-smoke.yml", "regression.yml", } { t.Run(name, func(t *testing.T) { var doc triggers @@ -2715,7 +2715,7 @@ const mainWindowsTestBinariesCacheRunsOn = "${{ matrix.runner == 'blacksmith' && // F7c: used to define its own sameRepoBlacksmith4vcpu here (same expression // as sameRepoBlacksmith2vcpu with the 4 vCPU label, for advisory jobs that -// compile Go: conformance.yml, regression.yml, migration-test.yml, +// compile Go: regression.yml, migration-test.yml, // cross-version-smoke.yml, proxied-local-smoke.yml). F7a independently // defined the same const; both are now served by the single shared // sameRepoBlacksmith4vcpu in ci_blacksmith_runner_test.go. migration-test.yml's @@ -3055,15 +3055,14 @@ func TestSameRepoBlacksmithRunners(t *testing.T) { "test-nix": sameRepoBlacksmith4vcpu, }, bazelWorkflowName: {bazelRBEJobName: wantRBERunsOn}, - // F7c: advisory workflows. Each compiles Go (or, for docsync/ - // broken-links, is cheap enough to size at 2 vCPU per spec-f7.md - // §2.2) and moves to Blacksmith for same-repo PRs/merge_group only; - // forks, Dependabot and push stay on ubuntu-latest. - "conformance.yml": {"conformance": sameRepoBlacksmith4vcpu}, + // F7c: advisory workflows. Each compiles Go (or, for broken-links, + // is cheap enough to size at 2 vCPU per spec-f7.md §2.2) and moves + // to Blacksmith for same-repo PRs/merge_group only; forks, + // Dependabot and push stay on ubuntu-latest. "regression.yml": {"regression": sameRepoBlacksmith4vcpu}, "migration-test.yml": {"historical-upgrades": sameRepoBlacksmith4vcpuNoble}, "cross-version-smoke.yml": {"smoke": sameRepoBlacksmith4vcpu, "versions": sameRepoBlacksmith2vcpu}, - "docs-mintlify.yml": {"docsync": sameRepoBlacksmith2vcpu, "broken-links": sameRepoBlacksmith2vcpu}, + "docs-mintlify.yml": {"broken-links": sameRepoBlacksmith2vcpu}, "proxied-local-smoke.yml": {"managed-local-smoke": sameRepoBlacksmith4vcpu}, // main.yml's seeder job (B2, F7c implementation report) is the one // Blacksmith job that is NOT gated by the same-repo-PR expression: it @@ -3128,7 +3127,7 @@ func TestSameRepoBlacksmithRunners(t *testing.T) { // Blacksmith label beyond the jobs listed in `want` above. for _, file := range []string{ "pr.yml", "pr-risk.yml", "main.yml", - "conformance.yml", "regression.yml", "migration-test.yml", + "regression.yml", "migration-test.yml", "cross-version-smoke.yml", "docs-mintlify.yml", "proxied-local-smoke.yml", } { workflow := readCIWorkflow(t, file) diff --git a/scripts/conformance.sh b/scripts/conformance.sh index d3e937b04..cbe5b8470 100755 --- a/scripts/conformance.sh +++ b/scripts/conformance.sh @@ -1,11 +1,16 @@ #!/usr/bin/env bash # -# Single conformance entrypoint. CI runs this verbatim; run it locally the same way: +# Local conformance entrypoint, under plain go test: # # ./scripts/conformance.sh # # Two tiers exercise the storage conformance contract: the in-process storage # corpus against the embedded-Dolt oracle, then the real-binary CLI corpus. +# CI runs the same two tiers as Bazel targets, remotely: +# +# bazel test --config=embedded //internal/storage/embeddeddolt:embeddeddolt_conformance_core_test \ +# //internal/storage/embeddeddolt:embeddeddolt_conformance_audit_test +# bazel test --config=integration //test/conformance:conformance_test # set -euo pipefail cd "$(dirname "$0")/.." diff --git a/scripts/conformance_script_test.go b/scripts/conformance_script_test.go index 78a567a64..19dbf6ea7 100644 --- a/scripts/conformance_script_test.go +++ b/scripts/conformance_script_test.go @@ -62,19 +62,38 @@ func conformanceExitCode(err error) int { return -1 } -func TestConformanceWorkflowHasOuterTimeoutBudget(t *testing.T) { - path := filepath.Join(sourceRepoRoot(t), ".github", "workflows", "conformance.yml") - data, err := os.ReadFile(path) - if err != nil { - t.Fatal(err) +// The conformance tiers CI runs are Bazel targets, not this script: Tier 1 +// is the embedded lane's embeddeddolt_conformance_{core,audit}_test +// (TestBazelEmbeddedJobMirrorsEmbeddedTier pins their flags), Tier 2 the +// integration lane's //test/conformance:conformance_test, pinned here to the +// script's tier: both harness files, built under the e2e or integration tag, +// against the injected non-race bd. conformance.yml, which ran the script on +// a GitHub runner, is gone. +func TestConformanceE2ETierRunsUnderBazel(t *testing.T) { + root := sourceRepoRoot(t) + rule := bazelRuleBlock(readPolicyFile(t, root, "test/conformance/BUILD.bazel"), "conformance_test") + if rule == "" { + t.Fatal("test/conformance/BUILD.bazel has no conformance_test") } - text := strings.ReplaceAll(string(data), "\r\n", "\n") - want := " conformance:\n" + - " name: Storage backend conformance (embedded Dolt oracle)\n" + - " timeout-minutes: 45\n" + - " runs-on: " + sameRepoBlacksmith4vcpu + "\n" - if !strings.Contains(text, want) { - t.Fatalf("conformance job does not declare the maintained 45-minute outer budget:\n%s", text) + for _, want := range []string{ + `"e2e_test.go",`, + `"roundtrip_test.go",`, + `data = ["//cmd/bd:bd_for_tests"],`, + `env = {"BEADS_TEST_BD_BINARY": "$(rlocationpath //cmd/bd:bd_for_tests)"},`, + `tags = ["integration-only"],`, + } { + if !strings.Contains(rule, want) { + t.Errorf("//test/conformance:conformance_test lacks %q:\n%s", want, rule) + } + } + for _, file := range []string{"e2e_test.go", "roundtrip_test.go"} { + src := readPolicyFile(t, root, "test/conformance/"+file) + if !strings.HasPrefix(src, "//go:build e2e || integration\n") { + t.Errorf("test/conformance/%s must build under e2e (scripts/conformance.sh) and integration (the Bazel lane)", file) + } + } + if _, err := os.Stat(filepath.Join(root, ".github", "workflows", "conformance.yml")); err == nil { + t.Error(".github/workflows/conformance.yml is back; its tiers run under Bazel") } } diff --git a/test/conformance/BUILD.bazel b/test/conformance/BUILD.bazel index eebe95038..4758a9c00 100644 --- a/test/conformance/BUILD.bazel +++ b/test/conformance/BUILD.bazel @@ -1,4 +1,4 @@ -load("@rules_go//go:def.bzl", "go_library") +load("@rules_go//go:def.bzl", "go_library", "go_test") go_library( name = "conformance", @@ -7,6 +7,28 @@ go_library( visibility = ["//visibility:public"], ) +# The real-binary CLI tier of the storage conformance suite (formerly +# conformance.yml's Tier 2, `go test -tags 'gms_pure_go e2e' ./test/conformance`): +# bd init and the CLI corpus against the injected non-race bd_for_tests, as +# that tier's freshly built gms_pure_go bd. Its files build under the e2e or +# the integration tag, so --config=integration's lane runs it. +# +# Tags: +# integration-only: outside --config=integration rules_go drops both test +# files and the target would run zero tests. +go_test( + name = "conformance_test", + srcs = [ + "e2e_test.go", + "roundtrip_test.go", + ], + data = ["//cmd/bd:bd_for_tests"], + embed = [":conformance"], + env = {"BEADS_TEST_BD_BINARY": "$(rlocationpath //cmd/bd:bd_for_tests)"}, + tags = ["integration-only"], + deps = ["//internal/testutil/bazeltest"], +) + # --- begin repo_files (managed by tools/bazel/go_srcs.py; run `make bazel-sync`) --- filegroup( diff --git a/test/conformance/e2e_test.go b/test/conformance/e2e_test.go index 42a0db008..dac3549d9 100644 --- a/test/conformance/e2e_test.go +++ b/test/conformance/e2e_test.go @@ -1,4 +1,7 @@ -//go:build e2e +//go:build e2e || integration + +// Built under e2e (scripts/conformance.sh) or integration (Bazel's +// --config=integration lane, //test/conformance:conformance_test). package conformance diff --git a/test/conformance/profiles.go b/test/conformance/profiles.go index 0ca3b320d..da1d671cf 100644 --- a/test/conformance/profiles.go +++ b/test/conformance/profiles.go @@ -7,7 +7,8 @@ // One declarative registry (Profiles) describes how to create and tear down an // isolated workspace for each backend. Adding a backend is one Profiles entry; the // runner and scripts/conformance.sh pick it up automatically. The suite is behind -// the `e2e` build tag because it shells out to a freshly built bd. +// the `e2e` (or `integration`) build tag because it shells out to a +// freshly built bd. // // # Stability // diff --git a/test/conformance/roundtrip_test.go b/test/conformance/roundtrip_test.go index 665c94a01..881f9493e 100644 --- a/test/conformance/roundtrip_test.go +++ b/test/conformance/roundtrip_test.go @@ -1,4 +1,7 @@ -//go:build e2e +//go:build e2e || integration + +// Built under e2e (scripts/conformance.sh) or integration (Bazel's +// --config=integration lane, //test/conformance:conformance_test). package conformance