@@ -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 `success` Python Proxy Tests checks immediately so the
10- # required checks don 't block the PR. The real tests are gated
9+ # post a `success` Python Integration Tests check immediately so the
10+ # required check doesn '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,14 +18,14 @@ 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.
21+ # Check-run name : databricks-driver-test's databricks- python-integration -tests.yml
22+ # fans out the thrift + kernel backends INTERNALLY (matrix) and reports a
23+ # SINGLE aggregated `Python Integration Tests` check — matching the go/nodejs
24+ # receivers. This sender dispatches ONE `python-pr-test` (proxy_mode: replay)
25+ # and every synthetic-success / auto-pass / dispatch-failure step posts that
26+ # one check name so it always has a matching baseline on the PR. (The older
27+ # per-mode `Python Proxy Tests / <mode>` checks came from the shared reusable
28+ # workflow, which is retained only for the weekly slow cron — not this gate.)
2929#
3030# Required external setup (outside this workflow):
3131#
@@ -34,13 +34,12 @@ name: Trigger Integration Tests
3434# 2. `INTEGRATION_TEST_APP_ID` / `INTEGRATION_TEST_PRIVATE_KEY` repo
3535# secrets installed for the dispatcher GitHub App (write access
3636# to databricks/databricks-driver-test).
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.
37+ # 3. Merge queue enabled on `main` branch protection AND
38+ # `Python Integration Tests` listed as a required status check.
39+ # Without this the merge-queue job is dead code and ITs run only on
40+ # explicit label. When this change lands, swap the required-checks
41+ # list: remove `Python Proxy Tests / thrift` and `Python Proxy Tests
42+ # / kernel`, add `Python Integration Tests`.
4443
4544on :
4645 pull_request :
@@ -118,11 +117,11 @@ jobs:
118117 });
119118
120119 # =============================================================================
121- # For PRs: Always pass the per-mode Python Proxy Tests checks on
120+ # For PRs: Always pass the Python Integration Tests check on
122121 # non-label events. The real run happens in the merge queue (or via
123122 # 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.
123+ # `Python Integration Tests` check would block every PR that doesn't
124+ # bother labelling.
126125 # =============================================================================
127126 skip-integration-tests-pr :
128127 if : github.event_name == 'pull_request' && github.event.action != 'labeled'
@@ -132,7 +131,7 @@ jobs:
132131 permissions :
133132 checks : write
134133 steps :
135- - name : Skip Python Proxy Tests
134+ - name : Skip Python Integration Tests
136135 uses : actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
137136 with :
138137 github-token : ${{ github.token }}
@@ -141,32 +140,29 @@ jobs:
141140 // the declared `checks: write`, so checks.create 403s ("Resource
142141 // not accessible by integration"). Expected — a fork can't post
143142 // check-runs on the base repo. Swallow the 403 for forks so this
144- // poster doesn't show a spurious failure; the real Python Proxy
145- // Tests required checks are posted by the merge_group run (full
146- // perms) when a maintainer queues the PR. Other errors fail loudly.
143+ // poster doesn't show a spurious failure; the real Python
144+ // Integration Tests required check is posted by the merge_group run
145+ // (full perms) when a maintainer queues the PR. Other errors fail loudly.
147146 const isFork = context.payload.pull_request.head.repo.fork;
148- const MODES = ['thrift', 'kernel'];
149- for (const mode of MODES) {
150- try {
151- await github.rest.checks.create({
152- owner: context.repo.owner,
153- repo: context.repo.repo,
154- name: `Python Proxy Tests / ${mode}`,
155- head_sha: context.payload.pull_request.head.sha,
156- status: 'completed',
157- conclusion: 'success',
158- completed_at: new Date().toISOString(),
159- output: {
160- title: 'Skipped on PR — runs in merge queue',
161- 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.`
162- }
163- });
164- } catch (e) {
165- if (isFork && e.status === 403) {
166- core.notice(`Fork PR: cannot post the Python Proxy Tests / ${mode} check-run (read-only token). It will be posted by the merge queue at merge time.`);
167- } else {
168- throw e;
147+ try {
148+ await github.rest.checks.create({
149+ owner: context.repo.owner,
150+ repo: context.repo.repo,
151+ name: 'Python Integration Tests',
152+ head_sha: context.payload.pull_request.head.sha,
153+ status: 'completed',
154+ conclusion: 'success',
155+ completed_at: new Date().toISOString(),
156+ output: {
157+ title: 'Skipped on PR — runs in merge queue',
158+ summary: 'Python Integration 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.'
169159 }
160+ });
161+ } catch (e) {
162+ if (isFork && e.status === 403) {
163+ core.notice('Fork PR: cannot post the Python Integration Tests check-run (read-only token). It will be posted by the merge queue at merge time.');
164+ } else {
165+ throw e;
170166 }
171167 }
172168
@@ -251,10 +247,11 @@ jobs:
251247 "pr_repo": "${{ github.repository }}",
252248 "pr_url": "${{ github.event.pull_request.html_url }}",
253249 "pr_title": "${{ steps.sanitize.outputs.result }}",
254- "pr_author": "${{ github.event.pull_request.user.login }}"
250+ "pr_author": "${{ github.event.pull_request.user.login }}",
251+ "proxy_mode": "replay"
255252 }
256253
257- - name : Pass Python Proxy Tests check (no driver changes)
254+ - name : Pass Python Integration Tests check (no driver changes)
258255 if : steps.changed.outputs.python != 'true'
259256 uses : actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
260257 with :
@@ -264,22 +261,19 @@ jobs:
264261 # no-op runs.
265262 github-token : ${{ github.token }}
266263 script : |
267- const MODES = ['thrift', 'kernel'];
268- for (const mode of MODES) {
269- await github.rest.checks.create({
270- owner: context.repo.owner,
271- repo: context.repo.repo,
272- name: `Python Proxy Tests / ${mode}`,
273- head_sha: context.payload.pull_request.head.sha,
274- status: 'completed',
275- conclusion: 'success',
276- completed_at: new Date().toISOString(),
277- output: {
278- title: 'Skipped — no driver changes',
279- summary: `No Python driver source files changed; skipping ${mode} integration tests.`
280- }
281- });
282- }
264+ await github.rest.checks.create({
265+ owner: context.repo.owner,
266+ repo: context.repo.repo,
267+ name: 'Python Integration Tests',
268+ head_sha: context.payload.pull_request.head.sha,
269+ status: 'completed',
270+ conclusion: 'success',
271+ completed_at: new Date().toISOString(),
272+ output: {
273+ title: 'Skipped — no driver changes',
274+ summary: 'No Python driver source files changed; skipping integration tests.'
275+ }
276+ });
283277
284278 - name : Fail check on dispatch error
285279 if : failure() && steps.changed.outputs.python == 'true'
@@ -295,22 +289,19 @@ jobs:
295289 # which is all we need.
296290 github-token : ${{ github.token }}
297291 script : |
298- const MODES = ['thrift', 'kernel'];
299- for (const mode of MODES) {
300- await github.rest.checks.create({
301- owner: context.repo.owner,
302- repo: context.repo.repo,
303- name: `Python Proxy Tests / ${mode}`,
304- head_sha: context.payload.pull_request.head.sha,
305- status: 'completed',
306- conclusion: 'failure',
307- completed_at: new Date().toISOString(),
308- output: {
309- title: 'Failed — error dispatching tests',
310- summary: `An error occurred while dispatching Python integration tests (${mode}). Check the workflow run logs.`
311- }
312- });
313- }
292+ await github.rest.checks.create({
293+ owner: context.repo.owner,
294+ repo: context.repo.repo,
295+ name: 'Python Integration Tests',
296+ head_sha: context.payload.pull_request.head.sha,
297+ status: 'completed',
298+ conclusion: 'failure',
299+ completed_at: new Date().toISOString(),
300+ output: {
301+ title: 'Failed — error dispatching tests',
302+ summary: 'An error occurred while dispatching Python integration tests. Check the workflow run logs.'
303+ }
304+ });
314305
315306 - name : Comment on PR
316307 if : steps.changed.outputs.python == 'true'
@@ -321,7 +312,7 @@ jobs:
321312 owner: context.repo.owner,
322313 repo: context.repo.repo,
323314 issue_number: context.issue.number,
324- body: 'Integration tests triggered. [View workflow run ](https://github.com/databricks/databricks-driver-test/actions/workflows/python-proxy -tests.yml).'
315+ body: 'Integration tests triggered. [View workflow runs ](https://github.com/databricks/databricks-driver-test/actions/workflows/databricks- python-integration -tests.yml). Result posts back here as the "Python Integration Tests" check .'
325316 });
326317
327318 # =============================================================================
@@ -365,22 +356,19 @@ jobs:
365356 # equivalent step above for the rationale.
366357 github-token : ${{ github.token }}
367358 script : |
368- const MODES = ['thrift', 'kernel'];
369- for (const mode of MODES) {
370- await github.rest.checks.create({
371- owner: context.repo.owner,
372- repo: context.repo.repo,
373- name: `Python Proxy Tests / ${mode}`,
374- head_sha: '${{ github.event.merge_group.head_sha }}',
375- status: 'completed',
376- conclusion: 'success',
377- completed_at: new Date().toISOString(),
378- output: {
379- title: 'Skipped — no driver changes',
380- summary: `No Python driver source files changed (${mode}).`
381- }
382- });
383- }
359+ await github.rest.checks.create({
360+ owner: context.repo.owner,
361+ repo: context.repo.repo,
362+ name: 'Python Integration Tests',
363+ head_sha: '${{ github.event.merge_group.head_sha }}',
364+ status: 'completed',
365+ conclusion: 'success',
366+ completed_at: new Date().toISOString(),
367+ output: {
368+ title: 'Skipped — no driver changes',
369+ summary: 'No Python driver source files changed.'
370+ }
371+ });
384372
385373 - name : Extract PR number from merge queue ref
386374 if : steps.changed.outputs.changed == 'true'
@@ -422,7 +410,8 @@ jobs:
422410 "pr_repo": "${{ github.repository }}",
423411 "pr_url": "${{ github.server_url }}/${{ github.repository }}/pull/${{ steps.extract-pr.outputs.pr_number }}",
424412 "pr_title": "Merge queue validation",
425- "pr_author": "merge-queue"
413+ "pr_author": "merge-queue",
414+ "proxy_mode": "replay"
426415 }
427416
428417 - name : Fail check on dispatch error
@@ -433,19 +422,16 @@ jobs:
433422 # the rationale in the trigger-tests-pr job above.
434423 github-token : ${{ github.token }}
435424 script : |
436- const MODES = ['thrift', 'kernel'];
437- for (const mode of MODES) {
438- await github.rest.checks.create({
439- owner: context.repo.owner,
440- repo: context.repo.repo,
441- name: `Python Proxy Tests / ${mode}`,
442- head_sha: '${{ github.event.merge_group.head_sha }}',
443- status: 'completed',
444- conclusion: 'failure',
445- completed_at: new Date().toISOString(),
446- output: {
447- title: 'Failed — error dispatching tests',
448- summary: `An error occurred while dispatching Python integration tests (${mode}). Check the workflow run logs.`
449- }
450- });
451- }
425+ await github.rest.checks.create({
426+ owner: context.repo.owner,
427+ repo: context.repo.repo,
428+ name: 'Python Integration Tests',
429+ head_sha: '${{ github.event.merge_group.head_sha }}',
430+ status: 'completed',
431+ conclusion: 'failure',
432+ completed_at: new Date().toISOString(),
433+ output: {
434+ title: 'Failed — error dispatching tests',
435+ summary: 'An error occurred while dispatching Python integration tests. Check the workflow run logs.'
436+ }
437+ });
0 commit comments