Skip to content

Commit cf0b1d3

Browse files
authored
Merge branch 'v3.0' into genai_5534
2 parents 2c2cfa5 + 9399628 commit cf0b1d3

1 file changed

Lines changed: 58 additions & 8 deletions

File tree

.github/workflows/CI-mysqlx.yml

Lines changed: 58 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,54 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
jobs:
15+
# PROXYSQL40 build of proxysql + TAP tests. The cache write at the end of
16+
# this job is what the downstream jobs (unit-tests, e2e-tests, soak-tests)
17+
# restore. Before this job existed (see issue #5796), the downstream jobs
18+
# all aborted immediately at "Restore build cache" with
19+
# `fail-on-cache-miss: true` because no upstream workflow ever wrote the
20+
# `build-<SHA>` key — CI-trigger doesn't write any cache, and CI-builds
21+
# uses a completely different naming scheme (`<SHA>_<dist><type>_*`). The
22+
# net effect was that CI-mysqlx had not executed a single test in the
23+
# entire workflow run history (500+ runs, 100% red at the same step).
24+
#
25+
# This job builds with the matching chassis flags so the cached
26+
# `src/proxysql` has the same plugin-services struct layout the downstream
27+
# `plugins/mysqlx` build will see — keeping the ABI contract intact.
28+
build:
29+
if: ${{ github.event.workflow_run && github.event.workflow_run.conclusion == 'success' || ! github.event.workflow_run }}
30+
runs-on: ubuntu-22.04
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 1
36+
37+
- name: Cache build artifacts (restore + save)
38+
uses: actions/cache@v4
39+
id: build-cache
40+
with:
41+
path: |
42+
src/proxysql
43+
test/
44+
key: build-${{ github.event.workflow_run && github.event.workflow_run.head_sha || github.sha }}
45+
46+
- name: Build proxysql (PROXYSQL40 chassis) + TAP tests
47+
if: steps.build-cache.outputs.cache-hit != 'true'
48+
# The same tier flags the downstream `Build mysqlx plugin` step uses
49+
# — see the comment on that step. Mismatch here would let the link
50+
# succeed but corrupt memory on the first plugin virtual dispatch.
51+
run: |
52+
export PROXYSQL40=1
53+
export PROXYSQL31=1
54+
export PROXYSQLFFTO=1
55+
export PROXYSQLTSDB=1
56+
make -j$(nproc) debug
57+
make -j$(nproc) build_tap_test_debug
58+
1559
unit-tests:
1660
if: ${{ github.event.workflow_run && github.event.workflow_run.conclusion == 'success' || ! github.event.workflow_run }}
1761
runs-on: ubuntu-22.04
62+
needs: build
1863
steps:
1964
- name: Checkout (sparse — test/tap)
2065
uses: actions/checkout@v4
@@ -33,10 +78,12 @@ jobs:
3378
src/proxysql
3479
test/
3580
key: build-${{ github.event.workflow_run && github.event.workflow_run.head_sha || github.sha }}
36-
# Strict cache dependency when CI-trigger populated the cache
37-
# upstream; lenient on manual workflow_dispatch so a missing cache
38-
# doesn't block an ad-hoc run.
39-
fail-on-cache-miss: ${{ github.event_name == 'workflow_run' }}
81+
# Strict cache dependency: the `build` job above writes this key
82+
# before this job starts (via `needs: build`). A miss here means
83+
# the build job failed or the cache was evicted between save and
84+
# restore — either way we should fail loudly, not silently
85+
# proceed without a binary. See issue #5796.
86+
fail-on-cache-miss: true
4087

4188
- name: Build mysqlx plugin
4289
# PROXYSQL40=1 (and the implied tier flags) MUST match what the
@@ -82,10 +129,13 @@ jobs:
82129
src/proxysql
83130
test/
84131
key: build-${{ github.event.workflow_run && github.event.workflow_run.head_sha || github.sha }}
85-
# Strict cache dependency when CI-trigger populated the cache
86-
# upstream; lenient on manual workflow_dispatch so a missing cache
87-
# doesn't block an ad-hoc run.
88-
fail-on-cache-miss: ${{ github.event_name == 'workflow_run' }}
132+
# Strict cache dependency: the `build` job at the top of this
133+
# workflow writes this key before this job starts (via the
134+
# `needs:` chain). A miss means the build job failed or the
135+
# cache was evicted between save and restore — either way fail
136+
# loudly instead of silently proceeding without a binary. See
137+
# issue #5796.
138+
fail-on-cache-miss: true
89139

90140
- name: Build mysqlx plugin
91141
# PROXYSQL40=1 (and the implied tier flags) MUST match what the

0 commit comments

Comments
 (0)