Skip to content

Commit 9235fc4

Browse files
authored
ci: always run Node.js integration tests on PR/merge (covers GA Thrift) (#443)
The dispatched databricks-driver-test suite runs a backend matrix — thrift (blocking), sea/normal (blocking), sea/reyden (non-blocking) — so it gates the GA Thrift path as well as SEA/kernel. Gating the dispatch on a kernel/source path allow-list meant changes outside that list (incl. KERNEL_REV bumps and native/ binding edits) skipped the suite even though they can affect the Thrift leg, and the merge-queue gate auto-passed green without running anything. Drop the path-based gating in both the merge-queue gate (merge-queue-nodejs) and the labeled-PR preview (trigger-tests-pr) so the suite runs on every merge-queue commit and every labeled PR. driver-test builds the napi binding from the driver's KERNEL_REV at the dispatched commit, so the merge-queue run exercises the pinned kernel version. Co-authored-by: Isaac Signed-off-by: Madhavendra Rathore <madhavendra.rathore@databricks.com>
1 parent 1e892cf commit 9235fc4

1 file changed

Lines changed: 14 additions & 83 deletions

File tree

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

Lines changed: 14 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -132,37 +132,14 @@ jobs:
132132
pull-requests: write
133133
checks: write
134134
steps:
135-
- name: Detect changed driver paths
135+
# The integration suite gates the GA Thrift backend (plus SEA/kernel), so
136+
# virtually any change in this repo can affect it. Run it for every labeled
137+
# PR rather than path-gating — path filters previously skipped changes like
138+
# KERNEL_REV bumps and native/ binding edits (and any Thrift-affecting file
139+
# not on the list).
140+
- name: Mark for dispatch (run on every change)
136141
id: changed
137-
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
138-
with:
139-
script: |
140-
const { data: files } = await github.rest.pulls.listFiles({
141-
owner: context.repo.owner,
142-
repo: context.repo.repo,
143-
pull_number: context.payload.pull_request.number,
144-
per_page: 100
145-
});
146-
147-
const names = files.map((file) => file.filename);
148-
const sourceChanged = names.some((file) =>
149-
file.startsWith('bin/') ||
150-
file.startsWith('lib/') ||
151-
file.startsWith('spec/') ||
152-
file.startsWith('thrift/') ||
153-
file.startsWith('tests/e2e/') ||
154-
file.startsWith('tests/integration/') ||
155-
file === 'package.json' ||
156-
file === 'package-lock.json' ||
157-
file === 'tsconfig.json' ||
158-
file === 'tsconfig.build.json'
159-
);
160-
const workflowChanged = names.some((file) => file.startsWith('.github/workflows/'));
161-
const runNode = sourceChanged || workflowChanged;
162-
163-
if (workflowChanged) console.log('Workflow files changed - triggering Node.js integration tests');
164-
if (sourceChanged) console.log('Driver source files changed - triggering Node.js integration tests');
165-
core.setOutput('nodejs', runNode.toString());
142+
run: echo "nodejs=true" >> "$GITHUB_OUTPUT"
166143

167144
- name: Generate GitHub App Token (driver-test repo)
168145
id: app-token
@@ -201,26 +178,6 @@ jobs:
201178
"pr_author": "${{ github.event.pull_request.user.login }}"
202179
}
203180
204-
- name: Pass Node.js Integration Tests check (no driver changes)
205-
if: steps.changed.outputs.nodejs != 'true'
206-
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
207-
with:
208-
github-token: ${{ github.token }}
209-
script: |
210-
await github.rest.checks.create({
211-
owner: context.repo.owner,
212-
repo: context.repo.repo,
213-
name: 'Node.js Integration Tests',
214-
head_sha: context.payload.pull_request.head.sha,
215-
status: 'completed',
216-
conclusion: 'success',
217-
completed_at: new Date().toISOString(),
218-
output: {
219-
title: 'Skipped - no driver changes',
220-
summary: 'No Node.js driver source files changed; skipping integration tests.'
221-
}
222-
});
223-
224181
- name: Fail check on dispatch error
225182
if: failure() && steps.changed.outputs.nodejs == 'true'
226183
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
@@ -267,40 +224,14 @@ jobs:
267224
with:
268225
fetch-depth: 0
269226

270-
- name: Check if driver files changed
227+
# The integration suite gates the GA Thrift backend (plus SEA/kernel), so
228+
# virtually any change can affect it. Run it on every merge-queue commit
229+
# rather than path-gating — path filters previously skipped changes like
230+
# KERNEL_REV bumps and native/ binding edits (and any Thrift-affecting file
231+
# not on the list).
232+
- name: Mark for dispatch (run on every change)
271233
id: changed
272-
env:
273-
BASE_SHA: ${{ github.event.merge_group.base_sha }}
274-
HEAD_SHA: ${{ github.event.merge_group.head_sha }}
275-
run: |
276-
CHANGED=$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")
277-
if echo "$CHANGED" | grep -qE "^(bin/|lib/|spec/|thrift/|tests/e2e/|tests/integration/|package\.json|package-lock\.json|tsconfig(\.build)?\.json|\.github/workflows/)"; then
278-
echo "changed=true" >> "$GITHUB_OUTPUT"
279-
echo "Driver files changed - will dispatch Node.js integration tests"
280-
else
281-
echo "changed=false" >> "$GITHUB_OUTPUT"
282-
echo "No driver files changed - will auto-pass"
283-
fi
284-
285-
- name: Auto-pass (no driver changes)
286-
if: steps.changed.outputs.changed != 'true'
287-
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
288-
with:
289-
github-token: ${{ github.token }}
290-
script: |
291-
await github.rest.checks.create({
292-
owner: context.repo.owner,
293-
repo: context.repo.repo,
294-
name: 'Node.js Integration Tests',
295-
head_sha: '${{ github.event.merge_group.head_sha }}',
296-
status: 'completed',
297-
conclusion: 'success',
298-
completed_at: new Date().toISOString(),
299-
output: {
300-
title: 'Skipped - no driver changes',
301-
summary: 'No Node.js driver source files changed.'
302-
}
303-
});
234+
run: echo "changed=true" >> "$GITHUB_OUTPUT"
304235

305236
- name: Extract PR number from merge queue ref
306237
if: steps.changed.outputs.changed == 'true'

0 commit comments

Comments
 (0)