pr.yml and pr-risk.yml (and the three advisory workflows that already list release/** beside it -- conformance.yml, cross-version-smoke.yml, regression.yml) trigger pull_request only on main and release/**. A PR based on hotfix/1.3.1 (or any sibling hotfix/** line) matched neither pattern, so it ran almost no CI: #7146, a backport to hotfix/1.3.1, showed 17 checks -- 15 cross-version historical smokes and triage/label jobs, 2 skipped -- no Lint, no unit shards, no embedded tier, no CI Gate / Required, no PR Risk Gate / Required. pr.yml's own comment states exactly why release/** is there: release-prep and release-fix PRs are based on the release branch, not main, and without it they run almost no CI before the tag build. A hotfix line is in the identical position. Added hotfix/** alongside release/** in all five files. New TestPullRequestWorkflowsTriggerOnHotfixBranches pins hotfix/** presence in each file's pull_request.branches list -- red before this change (observed [main release/**] in all five), green after. The existing TestPRRiskBazelCoverageJob equality check (pr.yml and pr-risk.yml's pull_request triggers must match) still passes, since both were updated identically. go vet/gofmt clean. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> Co-authored-by: Julian Knutsen <julianknutsen@users.noreply.github.com>
108 lines
4.8 KiB
YAML
108 lines
4.8 KiB
YAML
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
|