Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/napi-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,9 @@ concurrency:

permissions:
contents: read
# Required for the OIDC token exchange that the
# `.github/actions/setup-jfrog` composite uses to authenticate
# against the JFrog cargo proxy. The protected runner group blocks
# direct crates.io access, so cargo must route through the proxy.
# See go/hardened-gha.
id-token: write
# `id-token: write` is NOT granted workflow-wide: the `precondition`
# job only checks out and inspects the tree, so least-privilege keeps
# it on the single job that needs it (`check-and-test`, below).

defaults:
run:
Expand Down Expand Up @@ -91,6 +88,12 @@ jobs:
name: "napi fmt + clippy + test"
needs: precondition
if: needs.precondition.outputs.ready == 'true'
# Scoped here (not workflow-wide): `id-token: write` is only needed
# for the OIDC token exchange in `.github/actions/setup-jfrog` that
# authenticates against the JFrog cargo proxy. See go/hardened-gha.
permissions:
contents: read
id-token: write
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions napi/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ napi-derive = "2"
# kernel's default feature.
databricks-sql-kernel = { path = "..", default-features = false, features = ["tls-rustls"] }

# Tracing — transitive via the kernel; declared explicitly so the napi layer
# can emit its own `tracing::debug!` breadcrumbs (metadata blocking-pool
# entry/exit, metadata-cancel no-op) through the same subscriber the kernel uses.
tracing = "0.1"

# Tokio is a transitive dep via the kernel and via napi's `async` feature;
# declared explicitly so we can name `tokio::runtime::Handle` and
# `tokio::sync::Mutex` directly.
Expand Down Expand Up @@ -97,6 +102,13 @@ arrow-ipc = "57"
# `src/error.rs` without bouncing through a hand-rolled escaper.
serde_json = "1"

# Date/time parsing for the params codec. Already a kernel transitive
# dep (the kernel's `TypedValue::Date`/`Timestamp{,Ntz,Ltz}` variants
# wrap `chrono` types directly); declared here so `params.rs` can name
# `NaiveDate` / `NaiveDateTime` / `DateTime<Utc>` for literal parsing.
# Version kept in lock-step with the kernel's `chrono` dep.
chrono = { version = "0.4", default-features = false, features = ["clock"] }

[build-dependencies]
napi-build = "2"

Expand Down
6 changes: 3 additions & 3 deletions napi/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@databricks/sql-kernel-linux-x64-gnu",
"name": "@databricks/sql-kernel",
"version": "0.1.0",
"description": "Databricks SQL Kernel — Node.js native binding (linux-x64-gnu).",
"description": "Databricks SQL Kernel — Node.js native binding.",
"main": "index.js",
"types": "index.d.ts",
"files": [
Expand All @@ -14,7 +14,7 @@
"node": ">=18.0.0"
},
"napi": {
"binaryName": "sql-kernel",
"binaryName": "index",
"targets": [
"x86_64-unknown-linux-gnu"
]
Expand Down
Loading
Loading