ci: dispatch coverage-fanout on merged source PRs#459
Conversation
…ce PRs Wires databricks-sql-nodejs into the multi-language coverage fan-out. When a PR merges to main and touched driver source (a file under lib/), dispatch a `coverage-fanout` repository_dispatch to databricks/databricks-driver-test. Its coverage-fanout-tracker.yml then opens a tracking issue and runs the language-agnostic fan-out (a spec authored from this PR's diff, conformed across every driver). - Adds `closed` to the pull_request trigger types; the new trigger-coverage-fanout job gates on pull_request.merged == true. - Source-path filter (lib/): docs/CI/test-only merges don't warrant a full fan-out. - Reuses the existing INTEGRATION_TEST App token (scoped to driver-test) + the same peter-evans/repository-dispatch pin adbc-drivers/databricks uses. - Tightens skip-integration-tests-pr's guard to exclude `closed` so it doesn't re-stamp a check on merged PRs. Co-authored-by: Isaac Signed-off-by: Eric Wang <e.wang@databricks.com>
…ermissions peco-review-bot findings on the coverage-fanout sender (apply to all driver repos — the job is identical everywhere): - F1 (Medium): the merged-PR guard didn't constrain the base branch, so a PR merged into a release/feature branch that touched source would also dispatch a full fan-out authoring a spec from a diff that never reached main. Add `github.event.pull_request.base.ref == 'main'` to match the stated intent. - F2 (Low): the job declared no permissions block, relying on the default GITHUB_TOKEN read scope for github.rest.pulls.listFiles; if org defaults tighten to none it 403s silently. Scope it explicitly: contents: read + pull-requests: read. Co-authored-by: Isaac Signed-off-by: Eric Wang <e.wang@databricks.com>
Further peco-review-bot findings on the coverage-fanout sender: - Narrow the minted App installation token with `permission-contents: write` (all coverage_fanout needs is repository_dispatch → contents:write), matching the defense-in-depth the other dispatch jobs in these repos already use — so a leaked token can only fire dispatches, not exercise the App's full scope. - Restore the version tag in two action-pin comments (`# pinned` → the exact `# vX.Y.Z` the SHA corresponds to, per repo convention) for auditability. Co-authored-by: Isaac Signed-off-by: Eric Wang <e.wang@databricks.com>
Send proxy_mode=replay in both dispatch payloads (the label preview and the merge-queue required gate) so the databricks-sql-nodejs PR gate runs the Node.js suite in REPLAY against the PR's driver commit — deterministic, credential-free, no live warehouse — instead of the live passthrough run it does today. Paired with the driver-test receiver change (databricks-driver-test#909) that adds proxy_mode=replay to databricks-sql-nodejs-integration-tests.yml and skips the recording-less reyden leg in replay. Both must merge for the gate to run replay; until #909 lands the receiver ignores proxy_mode (stays passthrough). Co-authored-by: Isaac Signed-off-by: Eric Wang <e.wang@databricks.com>
|
Node.js integration tests triggered. View workflow run. |
|
Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase ( |
|
Node.js integration tests triggered. View workflow runs. The result posts back here as the "Node.js Integration Tests" check. |
The "Node.js integration tests triggered" PR comment linked to databricks-nodejs-integration-tests.yml, which does not exist (404) — the receiver file is databricks-sql-nodejs-integration-tests.yml. Point to the correct workflow and note that the authoritative result is the "Node.js Integration Tests" check posted back on the PR. Co-authored-by: Isaac Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
dabdb86 to
15ab3eb
Compare
|
Integration test approval reset. New commits were pushed to this PR. The A maintainer must re-review the changes and re-add the label to trigger tests again. Latest commit: 15ab3eb |
|
Node.js integration tests triggered. View workflow runs. The result posts back here as the "Node.js Integration Tests" check. |
|
🟡 [MAJOR] Source filter too narrow — misses driver source outside The Suggested fix — broaden the source predicate to include the other driver-source roots: (via Isaac Review) |
The isSource predicate only matched lib/, but driver source also lives at native/ (kernel bindings), thrift/ (Thrift defs), and the KERNEL_REV pin. A merged PR that only bumped KERNEL_REV or edited native/ or thrift/ would report srcChanged=false and never dispatch coverage-fanout, even though it affects the Thrift/kernel backends — the same gap the "run on every change" comments in this workflow already document. Include those roots. Co-authored-by: Isaac Signed-off-by: eric-wang-1990 <e.wang@databricks.com>
|
Integration test approval reset. New commits were pushed to this PR. The A maintainer must re-review the changes and re-add the label to trigger tests again. Latest commit: 6fdff86 |
|
Fixed in 6fdff86 — broadened |
Summary
Wires databricks-sql-nodejs into the multi-language coverage fan-out in
databricks/databricks-driver-test. When a PR merges tomainand touched driver source (a file underlib/), dispatch acoverage-fanoutrepository_dispatchto driver-test; itscoverage-fanout-tracker.ymlopens a tracking issue and runs the language-agnostic fan-out — a spec authored from this PR's diff, conformed as tests across every driver (csharp/python/go/nodejs/rust/kernel/jdbc).Same sender
adbc-drivers/databricksalready runs; this is one of a set of sibling PRs bringing the remaining driver repos onto the flow.What it does
closedto thepull_requesttrigger types; the newtrigger-coverage-fanoutjob gates ongithub.event.pull_request.merged == true.lib/): docs/CI/test-only merges don't kick off a full 7-leg fan-out.INTEGRATION_TEST_APP_ID/_PRIVATE_KEYApp token (scoped to driver-test) + the samepeter-evans/repository-dispatchpin adbc uses.skip-integration-tests-pr's guard to excludeclosedso it doesn't re-stamp a check on merged PRs.Test Plan
closedevent.coverage-fanoutdispatch + a new tracking issue indatabricks/databricks-driver-test.This pull request and its description were written by Isaac.