Skip to content

Commit fdf334f

Browse files
ci(integration-tests): post per-mode Python Proxy Tests checks
The proxy-test suite in databricks-driver-test is now a `mode: [thrift, kernel]` matrix that posts two named check runs per dispatch: `Python Proxy Tests / thrift` and `Python Proxy Tests / kernel` (see databricks-driver-test#369). The single unsuffixed `Python Proxy Tests` check is no longer posted by the matrix legs, so the synthetic-success / auto-pass / dispatch-failure stanzas in this workflow must fan out to both names — otherwise the required-status-check entry `Python Proxy Tests` would still expect the unsuffixed name but no workflow would post it. The `MODES` constant at the top of each script is the single source of truth for the matrix axis; keep it in sync with the matrix in databricks-driver-test/.github/workflows/python-proxy-tests.yml. Rollout order: 1. Land databricks-driver-test#369. Matrix legs start posting the suffixed names. The legacy `Python Proxy Tests` required check is still satisfied by this workflow's existing single synthetic-success path (this PR is not merged yet), so PRs continue to pass. 2. Land this PR AND update branch protection on `main` to swap the required-status entry `Python Proxy Tests` for both `Python Proxy Tests / thrift` and `Python Proxy Tests / kernel`. Order between these two is fine either way — the broken window is just the time between them. Do them together to minimise it. Co-authored-by: Isaac
1 parent aeb655c commit fdf334f

1 file changed

Lines changed: 103 additions & 75 deletions

File tree

.github/workflows/trigger-integration-tests.yml

Lines changed: 103 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ name: Trigger Integration Tests
66
# Mirrors the canonical pattern in adbc-drivers/databricks. The model:
77
#
88
# - On a normal PR event (open / push / reopen / non-IT label) we
9-
# post a `success` Python Proxy Tests check immediately so the
10-
# required check doesn't block the PR. The real tests are gated
9+
# post `success` Python Proxy Tests checks immediately so the
10+
# required checks don't block the PR. The real tests are gated
1111
# in the merge queue.
1212
# - When a maintainer adds the `integration-test` label we dispatch
1313
# the suite as a preview — useful for catching regressions before
@@ -18,17 +18,29 @@ name: Trigger Integration Tests
1818
# gate. Only PRs whose tests dispatch (or auto-pass when no driver
1919
# files changed) can proceed to `main`.
2020
#
21+
# Check-run names: databricks-driver-test's python-proxy-tests.yml is
22+
# a `mode: [thrift, kernel]` matrix that posts two named checks per
23+
# run — `Python Proxy Tests / thrift` and `Python Proxy Tests / kernel`.
24+
# Every synthetic-success / auto-pass / dispatch-failure step below
25+
# posts both names so the matrix legs always have a matching baseline
26+
# check on the PR. The list of modes lives in the `MODES` constant
27+
# at the top of each script block; keep it in sync with the matrix
28+
# axis in databricks-driver-test/.github/workflows/python-proxy-tests.yml.
29+
#
2130
# Required external setup (outside this workflow):
2231
#
2332
# 1. `integration-test` label exists in this repo (one-off; created
2433
# separately).
2534
# 2. `INTEGRATION_TEST_APP_ID` / `INTEGRATION_TEST_PRIVATE_KEY` repo
2635
# secrets installed for the dispatcher GitHub App (write access
2736
# to databricks/databricks-driver-test).
28-
# 3. Merge queue enabled on `main` branch protection AND
29-
# `Python Proxy Tests` listed as a required status check. Without
30-
# this the merge-queue job is dead code and ITs run only on
31-
# explicit label.
37+
# 3. Merge queue enabled on `main` branch protection AND BOTH
38+
# `Python Proxy Tests / thrift` and `Python Proxy Tests / kernel`
39+
# listed as required status checks. Without this the merge-queue
40+
# job is dead code and ITs run only on explicit label. The legacy
41+
# `Python Proxy Tests` (no mode suffix) check is no longer posted
42+
# by any workflow and must be removed from the required-checks
43+
# list when this change lands.
3244

3345
on:
3446
pull_request:
@@ -106,10 +118,11 @@ jobs:
106118
});
107119
108120
# =============================================================================
109-
# For PRs: Always pass the Python Proxy Tests check on non-label events.
110-
# The real run happens in the merge queue (or via explicit label preview).
111-
# Without this, a required `Python Proxy Tests` check would block every
112-
# PR that doesn't bother labelling.
121+
# For PRs: Always pass the per-mode Python Proxy Tests checks on
122+
# non-label events. The real run happens in the merge queue (or via
123+
# explicit label preview). Without this, the required
124+
# `Python Proxy Tests / thrift` and `Python Proxy Tests / kernel`
125+
# checks would block every PR that doesn't bother labelling.
113126
# =============================================================================
114127
skip-integration-tests-pr:
115128
if: github.event_name == 'pull_request' && github.event.action != 'labeled'
@@ -124,19 +137,22 @@ jobs:
124137
with:
125138
github-token: ${{ github.token }}
126139
script: |
127-
await github.rest.checks.create({
128-
owner: context.repo.owner,
129-
repo: context.repo.repo,
130-
name: 'Python Proxy Tests',
131-
head_sha: context.payload.pull_request.head.sha,
132-
status: 'completed',
133-
conclusion: 'success',
134-
completed_at: new Date().toISOString(),
135-
output: {
136-
title: 'Skipped on PR — runs in merge queue',
137-
summary: 'Python Proxy Tests are skipped on PRs and run as a required gate in the merge queue. Add the `integration-test` label to preview them on this PR.'
138-
}
139-
});
140+
const MODES = ['thrift', 'kernel'];
141+
for (const mode of MODES) {
142+
await github.rest.checks.create({
143+
owner: context.repo.owner,
144+
repo: context.repo.repo,
145+
name: `Python Proxy Tests / ${mode}`,
146+
head_sha: context.payload.pull_request.head.sha,
147+
status: 'completed',
148+
conclusion: 'success',
149+
completed_at: new Date().toISOString(),
150+
output: {
151+
title: 'Skipped on PR — runs in merge queue',
152+
summary: `Python Proxy Tests (${mode}) are skipped on PRs and run as a required gate in the merge queue. Add the \`integration-test\` label to preview them on this PR.`
153+
}
154+
});
155+
}
140156
141157
# =============================================================================
142158
# For PRs: Dispatch real tests when integration-test label is added.
@@ -232,19 +248,22 @@ jobs:
232248
# no-op runs.
233249
github-token: ${{ github.token }}
234250
script: |
235-
await github.rest.checks.create({
236-
owner: context.repo.owner,
237-
repo: context.repo.repo,
238-
name: 'Python Proxy Tests',
239-
head_sha: context.payload.pull_request.head.sha,
240-
status: 'completed',
241-
conclusion: 'success',
242-
completed_at: new Date().toISOString(),
243-
output: {
244-
title: 'Skipped — no driver changes',
245-
summary: 'No Python driver source files changed; skipping integration tests.'
246-
}
247-
});
251+
const MODES = ['thrift', 'kernel'];
252+
for (const mode of MODES) {
253+
await github.rest.checks.create({
254+
owner: context.repo.owner,
255+
repo: context.repo.repo,
256+
name: `Python Proxy Tests / ${mode}`,
257+
head_sha: context.payload.pull_request.head.sha,
258+
status: 'completed',
259+
conclusion: 'success',
260+
completed_at: new Date().toISOString(),
261+
output: {
262+
title: 'Skipped — no driver changes',
263+
summary: `No Python driver source files changed; skipping ${mode} integration tests.`
264+
}
265+
});
266+
}
248267
249268
- name: Fail check on dispatch error
250269
if: failure() && steps.changed.outputs.python == 'true'
@@ -260,19 +279,22 @@ jobs:
260279
# which is all we need.
261280
github-token: ${{ github.token }}
262281
script: |
263-
await github.rest.checks.create({
264-
owner: context.repo.owner,
265-
repo: context.repo.repo,
266-
name: 'Python Proxy Tests',
267-
head_sha: context.payload.pull_request.head.sha,
268-
status: 'completed',
269-
conclusion: 'failure',
270-
completed_at: new Date().toISOString(),
271-
output: {
272-
title: 'Failed — error dispatching tests',
273-
summary: 'An error occurred while dispatching Python integration tests. Check the workflow run logs.'
274-
}
275-
});
282+
const MODES = ['thrift', 'kernel'];
283+
for (const mode of MODES) {
284+
await github.rest.checks.create({
285+
owner: context.repo.owner,
286+
repo: context.repo.repo,
287+
name: `Python Proxy Tests / ${mode}`,
288+
head_sha: context.payload.pull_request.head.sha,
289+
status: 'completed',
290+
conclusion: 'failure',
291+
completed_at: new Date().toISOString(),
292+
output: {
293+
title: 'Failed — error dispatching tests',
294+
summary: `An error occurred while dispatching Python integration tests (${mode}). Check the workflow run logs.`
295+
}
296+
});
297+
}
276298
277299
- name: Comment on PR
278300
if: steps.changed.outputs.python == 'true'
@@ -327,19 +349,22 @@ jobs:
327349
# equivalent step above for the rationale.
328350
github-token: ${{ github.token }}
329351
script: |
330-
await github.rest.checks.create({
331-
owner: context.repo.owner,
332-
repo: context.repo.repo,
333-
name: 'Python Proxy Tests',
334-
head_sha: '${{ github.event.merge_group.head_sha }}',
335-
status: 'completed',
336-
conclusion: 'success',
337-
completed_at: new Date().toISOString(),
338-
output: {
339-
title: 'Skipped — no driver changes',
340-
summary: 'No Python driver source files changed.'
341-
}
342-
});
352+
const MODES = ['thrift', 'kernel'];
353+
for (const mode of MODES) {
354+
await github.rest.checks.create({
355+
owner: context.repo.owner,
356+
repo: context.repo.repo,
357+
name: `Python Proxy Tests / ${mode}`,
358+
head_sha: '${{ github.event.merge_group.head_sha }}',
359+
status: 'completed',
360+
conclusion: 'success',
361+
completed_at: new Date().toISOString(),
362+
output: {
363+
title: 'Skipped — no driver changes',
364+
summary: `No Python driver source files changed (${mode}).`
365+
}
366+
});
367+
}
343368
344369
- name: Extract PR number from merge queue ref
345370
if: steps.changed.outputs.changed == 'true'
@@ -392,16 +417,19 @@ jobs:
392417
# the rationale in the trigger-tests-pr job above.
393418
github-token: ${{ github.token }}
394419
script: |
395-
await github.rest.checks.create({
396-
owner: context.repo.owner,
397-
repo: context.repo.repo,
398-
name: 'Python Proxy Tests',
399-
head_sha: '${{ github.event.merge_group.head_sha }}',
400-
status: 'completed',
401-
conclusion: 'failure',
402-
completed_at: new Date().toISOString(),
403-
output: {
404-
title: 'Failed — error dispatching tests',
405-
summary: 'An error occurred while dispatching Python integration tests. Check the workflow run logs.'
406-
}
407-
});
420+
const MODES = ['thrift', 'kernel'];
421+
for (const mode of MODES) {
422+
await github.rest.checks.create({
423+
owner: context.repo.owner,
424+
repo: context.repo.repo,
425+
name: `Python Proxy Tests / ${mode}`,
426+
head_sha: '${{ github.event.merge_group.head_sha }}',
427+
status: 'completed',
428+
conclusion: 'failure',
429+
completed_at: new Date().toISOString(),
430+
output: {
431+
title: 'Failed — error dispatching tests',
432+
summary: `An error occurred while dispatching Python integration tests (${mode}). Check the workflow run logs.`
433+
}
434+
});
435+
}

0 commit comments

Comments
 (0)