Skip to content

Commit 7f2b92e

Browse files
ci: widen pyo3 matrix, scan napi deps, fix maturin develop
Follow-ups from a GitHub workflow audit, plus the one merge-queue trigger the trimmed required-checks list still needs. Merge-queue gating is being trimmed (ruleset change, applied separately) so that only "Unit + doc tests" and "Kernel Integration Tests" formally gate merges; DCO / fmt / clippy / tls-build become advisory PR checks. Because "Unit + doc tests" stays required, its workflow must run on the merge-group ref too, so pr-checks gets a `merge_group` trigger (its sibling advisory jobs run there as well, which is harmless). Changes: - pr-checks: add `merge_group` trigger so the required "Unit + doc tests" job reports on the merge group (otherwise the queue hangs). - pyo3-checks: widen the Python matrix from {3.9, 3.12} to {3.10, 3.11, 3.12, 3.13, 3.14}; drop the unsupported `--interpreter` flag from `maturin develop` (maturin 1.13.x removed it — `develop` always targets the active venv, which `uv run` selects). Bump `requires-python` to `>=3.10` to match the tested matrix. - license-check: extend the path filter to `napi/Cargo.{toml,lock}` and run `cargo deny` over the standalone napi workspace, whose own lockfile is invisible to the root run. Allow CC0-1.0 in deny.toml — `tiny-keccak` pulls it in transitively via napi and it is a public-domain dedication. - napi-checks: align the checkout (v4 -> v6.0.2) and setup-rust-toolchain (v1.15.2 -> v1.16.1) pins with the other workflows. - coverage: path-filter the expensive instrumented rebuild so docs/workflow-only PRs skip it. - dependabot: add a cargo entry for the `/napi` standalone workspace. Co-authored-by: Isaac Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
1 parent bb69606 commit 7f2b92e

8 files changed

Lines changed: 92 additions & 9 deletions

File tree

‎.github/dependabot.yml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
version: 2
3030
updates:
31+
# Root workspace (kernel + the pyo3 member, which share the root
32+
# Cargo.lock).
3133
- package-ecosystem: "cargo"
3234
directory: "/"
3335
schedule:
@@ -41,6 +43,21 @@ updates:
4143
- "minor"
4244
- "patch"
4345

46+
# napi/ is a standalone Cargo workspace with its own committed
47+
# Cargo.lock (napi CI builds with `--locked`). The root entry above
48+
# does not see it, so without this entry napi's transitive deps
49+
# never get security / version bumps.
50+
- package-ecosystem: "cargo"
51+
directory: "/napi"
52+
schedule:
53+
interval: "weekly"
54+
open-pull-requests-limit: 10
55+
groups:
56+
napi-cargo-minor-and-patch:
57+
update-types:
58+
- "minor"
59+
- "patch"
60+
4461
- package-ecosystem: "github-actions"
4562
directory: "/"
4663
schedule:

‎.github/workflows/coverage.yml‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,25 @@ name: Coverage
2121
on:
2222
push:
2323
branches: [main]
24+
# Path-filtered: a full instrumented rebuild (`cargo llvm-cov`) is
25+
# expensive, so only run it when something that can move the
26+
# coverage number changes. Docs / workflow-only PRs skip it.
27+
paths:
28+
- "src/**"
29+
- "tests/**"
30+
- "pyo3/**"
31+
- "Cargo.toml"
32+
- "Cargo.lock"
33+
- ".github/workflows/coverage.yml"
2434
pull_request:
2535
branches: [main]
36+
paths:
37+
- "src/**"
38+
- "tests/**"
39+
- "pyo3/**"
40+
- "Cargo.toml"
41+
- "Cargo.lock"
42+
- ".github/workflows/coverage.yml"
2643
workflow_dispatch:
2744

2845
concurrency:

‎.github/workflows/license-check.yml‎

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,20 @@ on:
3131
- "Cargo.toml"
3232
- "Cargo.lock"
3333
- "deny.toml"
34+
# napi/ is a standalone workspace with its own lockfile; its
35+
# dependency graph is invisible to a root `cargo deny` run, so
36+
# changes there must re-trigger this workflow to scan it.
37+
- "napi/Cargo.toml"
38+
- "napi/Cargo.lock"
3439
- ".github/workflows/license-check.yml"
3540
pull_request:
3641
branches: [main]
3742
paths:
3843
- "Cargo.toml"
3944
- "Cargo.lock"
4045
- "deny.toml"
46+
- "napi/Cargo.toml"
47+
- "napi/Cargo.lock"
4148
- ".github/workflows/license-check.yml"
4249

4350
permissions:
@@ -70,9 +77,22 @@ jobs:
7077
with:
7178
tool: cargo-deny
7279

73-
- name: Check licenses, advisories, bans, sources
80+
- name: Check licenses, advisories, bans, sources (root workspace)
7481
# `licenses` is the load-bearing check; `advisories` flags
7582
# RustSec security advisories; `bans` and `sources` are
7683
# empty-permissive in our deny.toml today but the slots are
77-
# there for future hardening.
84+
# there for future hardening. The root workspace covers the
85+
# kernel + pyo3 (pyo3 is a root workspace member).
7886
run: cargo deny check
87+
88+
- name: Check licenses, advisories, bans, sources (napi workspace)
89+
# napi/ is a separate Cargo workspace (its own Cargo.lock) so
90+
# its transitive graph is NOT seen by the root run above. Scan
91+
# it explicitly against the same deny.toml policy. `--config`
92+
# points back at the root deny.toml so both workspaces share
93+
# one allowlist rather than drifting. `--manifest-path` is a
94+
# global cargo-deny flag (before the subcommand); `--config`
95+
# is a `check` flag (after it). A relative `--config` resolves
96+
# against the manifest's directory (it would look for
97+
# napi/deny.toml), so point at the root copy by absolute path.
98+
run: cargo deny --manifest-path napi/Cargo.toml check --config "$GITHUB_WORKSPACE/deny.toml"

‎.github/workflows/napi-checks.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
outputs:
7070
ready: ${{ steps.check.outputs.ready }}
7171
steps:
72-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
72+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7373

7474
- name: "Check for napi/Cargo.toml"
7575
id: check
@@ -93,9 +93,9 @@ jobs:
9393
# All cargo commands run from the napi/ standalone workspace.
9494
working-directory: napi
9595
steps:
96-
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
96+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9797

98-
- uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1.15.2
98+
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
9999
with:
100100
components: rustfmt, clippy
101101

‎.github/workflows/pr-checks.yml‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,21 @@ on:
2525
pull_request:
2626
types: [opened, synchronize, reopened]
2727
branches: [main]
28+
# The `protect-main` ruleset enables a merge queue and lists this
29+
# workflow's "Unit + doc tests" job as a required status check.
30+
# GitHub re-evaluates required checks against the merge-group ref,
31+
# so without this trigger the queue entry hangs until
32+
# `check_response_timeout_minutes` expires. The sibling jobs
33+
# (Formatting / Clippy / Build (tls-rustls feature)) also run on the
34+
# merge group — they are advisory, not required, so the extra runs
35+
# are harmless and keep the workflow trigger simple.
36+
merge_group:
2837

2938
concurrency:
30-
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
39+
# `github.head_ref` is set on pull_request but empty on merge_group;
40+
# fall back to the ref so distinct merge-group entries don't collapse
41+
# into one another.
42+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
3143
cancel-in-progress: true
3244

3345
permissions:

‎.github/workflows/pyo3-checks.yml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ jobs:
9999
strategy:
100100
fail-fast: false
101101
matrix:
102-
python-version: ["3.9", "3.12"]
102+
# Cover the supported floor through the newest release. 3.13
103+
# and 3.14 exercise the GIL / free-threading changes where
104+
# PyO3 extensions most often break. Floor is 3.10 — matches
105+
# `requires-python` in pyo3/pyproject.toml.
106+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
103107
steps:
104108
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
105109

@@ -145,7 +149,12 @@ jobs:
145149
# `develop` builds the extension and installs it into the
146150
# uv-managed venv from the previous step. Debug build is
147151
# fine for tests and ~2x faster than --release.
148-
run: uv run maturin develop --interpreter python${{ matrix.python-version }}
152+
#
153+
# maturin's `develop` always targets the active virtualenv's
154+
# interpreter and (unlike `build`) has no --interpreter flag;
155+
# `uv run` already activates the venv `uv sync` created for the
156+
# matrix Python version, so the interpreter is selected for us.
157+
run: uv run maturin develop
149158

150159
- name: pytest (no-network + live tiers)
151160
working-directory: pyo3

‎deny.toml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ allow = [
2929
"Apache-2.0",
3030
"BSD-2-Clause",
3131
"BSD-3-Clause",
32+
# CC0-1.0 is a public-domain dedication (no attribution or
33+
# copyleft obligation). Pulled in transitively by `tiny-keccak`
34+
# via the napi dependency graph, which the license check now
35+
# scans alongside the root workspace.
36+
"CC0-1.0",
3237
"CDLA-Permissive-2.0",
3338
"ISC",
3439
"MIT",

‎pyo3/pyproject.toml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ build-backend = "maturin"
66
name = "databricks-sql-kernel"
77
version = "0.1.0"
88
description = "Python bindings for the Databricks SQL Kernel (PyO3)"
9-
requires-python = ">=3.9"
9+
# Floor matches the tested CI matrix in
10+
# .github/workflows/pyo3-checks.yml (3.10 .. 3.14). 3.9 is no longer
11+
# exercised in CI, so it is not claimed as supported here.
12+
requires-python = ">=3.10"
1013
license = { text = "Apache-2.0" }
1114
authors = [{ name = "Databricks" }]
1215
# Runtime dependency for downstream consumers. Major-version bound

0 commit comments

Comments
 (0)