databricks-sql-kernel 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. databricks_sql_kernel-0.1.2/.github/CODEOWNERS +29 -0
  2. databricks_sql_kernel-0.1.2/.github/actions/setup-jfrog/action.yml +142 -0
  3. databricks_sql_kernel-0.1.2/.github/dependabot.yml +70 -0
  4. databricks_sql_kernel-0.1.2/.github/workflows/cargo-publish.yml +125 -0
  5. databricks_sql_kernel-0.1.2/.github/workflows/close-stale.yml +46 -0
  6. databricks_sql_kernel-0.1.2/.github/workflows/coverage.yml +104 -0
  7. databricks_sql_kernel-0.1.2/.github/workflows/dco-check.yml +92 -0
  8. databricks_sql_kernel-0.1.2/.github/workflows/license-check.yml +100 -0
  9. databricks_sql_kernel-0.1.2/.github/workflows/napi-checks.yml +149 -0
  10. databricks_sql_kernel-0.1.2/.github/workflows/pr-checks.yml +149 -0
  11. databricks_sql_kernel-0.1.2/.github/workflows/pyo3-checks.yml +182 -0
  12. databricks_sql_kernel-0.1.2/.github/workflows/rust-e2e.yml +188 -0
  13. databricks_sql_kernel-0.1.2/.github/workflows/securityScan.yml +373 -0
  14. databricks_sql_kernel-0.1.2/.github/workflows/trigger-integration-tests.yml +590 -0
  15. databricks_sql_kernel-0.1.2/.gitignore +299 -0
  16. databricks_sql_kernel-0.1.2/CLAUDE.md +153 -0
  17. databricks_sql_kernel-0.1.2/Cargo.lock +3043 -0
  18. databricks_sql_kernel-0.1.2/Cargo.toml +160 -0
  19. databricks_sql_kernel-0.1.2/LICENSE +210 -0
  20. databricks_sql_kernel-0.1.2/Makefile +43 -0
  21. databricks_sql_kernel-0.1.2/NOTICE.txt +2 -0
  22. databricks_sql_kernel-0.1.2/PKG-INFO +8 -0
  23. databricks_sql_kernel-0.1.2/README.md +40 -0
  24. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/appkit/download-release.sh +69 -0
  25. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/appkit/poll-release.sh +84 -0
  26. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/configure-cargo.sh +29 -0
  27. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/configure-coursier.sh +19 -0
  28. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/configure-maven.sh +37 -0
  29. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/configure-npm.sh +11 -0
  30. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/configure-pip.sh +7 -0
  31. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/deco-dispatch-tagging-single.sh +45 -0
  32. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/deco-dispatch-tagging.sh +98 -0
  33. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/deco-load-maven-creds.sh +88 -0
  34. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/download-artifact.sh +50 -0
  35. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/extract-changelog.sh +69 -0
  36. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/jfrog-oidc-token.py +77 -0
  37. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/jfrog-oidc-token.sh +27 -0
  38. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/maven-central-publish.sh +288 -0
  39. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/mlflow/ts_publish.ts +170 -0
  40. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/mlflow/validate_ts_release.ts +183 -0
  41. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/npm-oidc-publish.sh +112 -0
  42. databricks_sql_kernel-0.1.2/_release-scripts/.github/scripts/pypi-oidc-publish.sh +121 -0
  43. databricks_sql_kernel-0.1.2/_release-scripts/CODEOWNERS +105 -0
  44. databricks_sql_kernel-0.1.2/about.toml +25 -0
  45. databricks_sql_kernel-0.1.2/ci/proxy/htpasswd +1 -0
  46. databricks_sql_kernel-0.1.2/ci/proxy/squid-auth.conf +26 -0
  47. databricks_sql_kernel-0.1.2/clippy.toml +24 -0
  48. databricks_sql_kernel-0.1.2/deny.toml +64 -0
  49. databricks_sql_kernel-0.1.2/docs/designs/PECOBLR-2091-retry-logic-design.md +735 -0
  50. databricks_sql_kernel-0.1.2/docs/designs/client-refactor-design.md +414 -0
  51. databricks_sql_kernel-0.1.2/docs/designs/cloudfetch-implementation-plan.md +451 -0
  52. databricks_sql_kernel-0.1.2/docs/designs/cloudfetch-pipeline-redesign.md +435 -0
  53. databricks_sql_kernel-0.1.2/docs/designs/complex-types-json-stringify.md +484 -0
  54. databricks_sql_kernel-0.1.2/docs/designs/connection-metadata-design.md +1248 -0
  55. databricks_sql_kernel-0.1.2/docs/designs/fix-duplicate-link-prefetch.md +102 -0
  56. databricks_sql_kernel-0.1.2/docs/designs/inline-arrow-results-design.md +479 -0
  57. databricks_sql_kernel-0.1.2/docs/designs/oauth-sprint-plan.md +134 -0
  58. databricks_sql_kernel-0.1.2/docs/designs/oauth-u2m-m2m-design.md +715 -0
  59. databricks_sql_kernel-0.1.2/docs/designs/odbc-batch-optimization.md +252 -0
  60. databricks_sql_kernel-0.1.2/docs/designs/odbc-metadata-ffi-design.md +197 -0
  61. databricks_sql_kernel-0.1.2/docs/designs/prepared-statement-design.md +781 -0
  62. databricks_sql_kernel-0.1.2/docs/designs/proxy-support-design.md +377 -0
  63. databricks_sql_kernel-0.1.2/docs/designs/result-metadata-propagation.md +462 -0
  64. databricks_sql_kernel-0.1.2/docs/designs/tls-config-design.md +269 -0
  65. databricks_sql_kernel-0.1.2/docs/migration-plan.md +980 -0
  66. databricks_sql_kernel-0.1.2/docs/pr-4-plan.md +430 -0
  67. databricks_sql_kernel-0.1.2/docs/pr-5-plan.md +379 -0
  68. databricks_sql_kernel-0.1.2/docs/spec-v0.md +953 -0
  69. databricks_sql_kernel-0.1.2/include/legacy/databricks_metadata_ffi.h +247 -0
  70. databricks_sql_kernel-0.1.2/license.tpl +214 -0
  71. databricks_sql_kernel-0.1.2/osv-scanner.toml +26 -0
  72. databricks_sql_kernel-0.1.2/pyo3/Cargo.lock +2657 -0
  73. databricks_sql_kernel-0.1.2/pyo3/Cargo.toml +91 -0
  74. databricks_sql_kernel-0.1.2/pyo3/pytest.ini +6 -0
  75. databricks_sql_kernel-0.1.2/pyo3/src/auth.rs +408 -0
  76. databricks_sql_kernel-0.1.2/pyo3/src/errors.rs +190 -0
  77. databricks_sql_kernel-0.1.2/pyo3/src/executed_async.rs +152 -0
  78. databricks_sql_kernel-0.1.2/pyo3/src/fetch.rs +124 -0
  79. databricks_sql_kernel-0.1.2/pyo3/src/lib.rs +100 -0
  80. databricks_sql_kernel-0.1.2/pyo3/src/logging.rs +221 -0
  81. databricks_sql_kernel-0.1.2/pyo3/src/macros.rs +166 -0
  82. databricks_sql_kernel-0.1.2/pyo3/src/metadata.rs +243 -0
  83. databricks_sql_kernel-0.1.2/pyo3/src/params.rs +26 -0
  84. databricks_sql_kernel-0.1.2/pyo3/src/result_stream.rs +119 -0
  85. databricks_sql_kernel-0.1.2/pyo3/src/session.rs +380 -0
  86. databricks_sql_kernel-0.1.2/pyo3/src/statement.rs +428 -0
  87. databricks_sql_kernel-0.1.2/pyo3/tests/conftest.py +76 -0
  88. databricks_sql_kernel-0.1.2/pyo3/tests/test_async.py +116 -0
  89. databricks_sql_kernel-0.1.2/pyo3/tests/test_auth.py +61 -0
  90. databricks_sql_kernel-0.1.2/pyo3/tests/test_execute.py +308 -0
  91. databricks_sql_kernel-0.1.2/pyo3/tests/test_metadata.py +140 -0
  92. databricks_sql_kernel-0.1.2/pyo3/tests/test_module.py +38 -0
  93. databricks_sql_kernel-0.1.2/pyo3/tests/test_session.py +94 -0
  94. databricks_sql_kernel-0.1.2/pyproject.toml +48 -0
  95. databricks_sql_kernel-0.1.2/src/auth/config.rs +229 -0
  96. databricks_sql_kernel-0.1.2/src/auth/mod.rs +32 -0
  97. databricks_sql_kernel-0.1.2/src/auth/oauth/cache.rs +466 -0
  98. databricks_sql_kernel-0.1.2/src/auth/oauth/callback.rs +639 -0
  99. databricks_sql_kernel-0.1.2/src/auth/oauth/m2m.rs +669 -0
  100. databricks_sql_kernel-0.1.2/src/auth/oauth/mod.rs +38 -0
  101. databricks_sql_kernel-0.1.2/src/auth/oauth/oidc.rs +362 -0
  102. databricks_sql_kernel-0.1.2/src/auth/oauth/token.rs +386 -0
  103. databricks_sql_kernel-0.1.2/src/auth/oauth/token_store.rs +522 -0
  104. databricks_sql_kernel-0.1.2/src/auth/oauth/u2m.rs +707 -0
  105. databricks_sql_kernel-0.1.2/src/auth/pat.rs +54 -0
  106. databricks_sql_kernel-0.1.2/src/client/http.rs +2131 -0
  107. databricks_sql_kernel-0.1.2/src/client/mod.rs +50 -0
  108. databricks_sql_kernel-0.1.2/src/client/retry.rs +714 -0
  109. databricks_sql_kernel-0.1.2/src/client/sea.rs +1664 -0
  110. databricks_sql_kernel-0.1.2/src/client/transport.rs +438 -0
  111. databricks_sql_kernel-0.1.2/src/config.rs +1291 -0
  112. databricks_sql_kernel-0.1.2/src/ffi/error.rs +80 -0
  113. databricks_sql_kernel-0.1.2/src/ffi/metadata.rs +78 -0
  114. databricks_sql_kernel-0.1.2/src/ffi/mod.rs +84 -0
  115. databricks_sql_kernel-0.1.2/src/ffi/result.rs +73 -0
  116. databricks_sql_kernel-0.1.2/src/ffi/session.rs +87 -0
  117. databricks_sql_kernel-0.1.2/src/ffi/statement.rs +302 -0
  118. databricks_sql_kernel-0.1.2/src/kernel_error.rs +874 -0
  119. databricks_sql_kernel-0.1.2/src/klog.rs +202 -0
  120. databricks_sql_kernel-0.1.2/src/lib.rs +214 -0
  121. databricks_sql_kernel-0.1.2/src/logging.rs +155 -0
  122. databricks_sql_kernel-0.1.2/src/metadata/mod.rs +27 -0
  123. databricks_sql_kernel-0.1.2/src/metadata/schemas.rs +86 -0
  124. databricks_sql_kernel-0.1.2/src/metadata/sql.rs +698 -0
  125. databricks_sql_kernel-0.1.2/src/metadata/static_data.rs +864 -0
  126. databricks_sql_kernel-0.1.2/src/metadata/thrift_shape.rs +1134 -0
  127. databricks_sql_kernel-0.1.2/src/metadata/type_mapping.rs +997 -0
  128. databricks_sql_kernel-0.1.2/src/metadata_v0.rs +806 -0
  129. databricks_sql_kernel-0.1.2/src/reader/cloudfetch/arrow_parser.rs +272 -0
  130. databricks_sql_kernel-0.1.2/src/reader/cloudfetch/chunk_downloader.rs +289 -0
  131. databricks_sql_kernel-0.1.2/src/reader/cloudfetch/link_fetcher.rs +2137 -0
  132. databricks_sql_kernel-0.1.2/src/reader/cloudfetch/mod.rs +31 -0
  133. databricks_sql_kernel-0.1.2/src/reader/cloudfetch/streaming_provider.rs +2542 -0
  134. databricks_sql_kernel-0.1.2/src/reader/inline/mod.rs +41 -0
  135. databricks_sql_kernel-0.1.2/src/reader/inline/provider.rs +342 -0
  136. databricks_sql_kernel-0.1.2/src/reader/inline/streaming.rs +1094 -0
  137. databricks_sql_kernel-0.1.2/src/reader/mod.rs +1722 -0
  138. databricks_sql_kernel-0.1.2/src/reader/post_processor/json.rs +862 -0
  139. databricks_sql_kernel-0.1.2/src/reader/post_processor/mod.rs +650 -0
  140. databricks_sql_kernel-0.1.2/src/reader/test_utils.rs +115 -0
  141. databricks_sql_kernel-0.1.2/src/result/mod.rs +110 -0
  142. databricks_sql_kernel-0.1.2/src/result_stream.rs +1129 -0
  143. databricks_sql_kernel-0.1.2/src/session.rs +821 -0
  144. databricks_sql_kernel-0.1.2/src/statement/executed.rs +320 -0
  145. databricks_sql_kernel-0.1.2/src/statement/executed_async.rs +724 -0
  146. databricks_sql_kernel-0.1.2/src/statement/handle.rs +50 -0
  147. databricks_sql_kernel-0.1.2/src/statement/mod.rs +44 -0
  148. databricks_sql_kernel-0.1.2/src/statement/mutable.rs +744 -0
  149. databricks_sql_kernel-0.1.2/src/statement/params.rs +1120 -0
  150. databricks_sql_kernel-0.1.2/src/statement/params_codec.rs +1202 -0
  151. databricks_sql_kernel-0.1.2/src/statement/spec.rs +598 -0
  152. databricks_sql_kernel-0.1.2/src/statement/validity.rs +109 -0
  153. databricks_sql_kernel-0.1.2/src/telemetry/mod.rs +112 -0
  154. databricks_sql_kernel-0.1.2/src/types/cloudfetch.rs +346 -0
  155. databricks_sql_kernel-0.1.2/src/types/mod.rs +30 -0
  156. databricks_sql_kernel-0.1.2/src/types/sea.rs +788 -0
  157. databricks_sql_kernel-0.1.2/src/util/mod.rs +17 -0
  158. databricks_sql_kernel-0.1.2/src/util/runtime.rs +114 -0
  159. databricks_sql_kernel-0.1.2/tests/oauth_u2m_integration.rs +362 -0
  160. databricks_sql_kernel-0.1.2/tests/v0_async_execute_e2e.rs +284 -0
  161. databricks_sql_kernel-0.1.2/tests/v0_async_execute_wiremock.rs +985 -0
  162. databricks_sql_kernel-0.1.2/tests/v0_execute_e2e.rs +978 -0
  163. databricks_sql_kernel-0.1.2/tests/v0_execute_wiremock.rs +1019 -0
  164. databricks_sql_kernel-0.1.2/tests/v0_metadata_e2e.rs +451 -0
  165. databricks_sql_kernel-0.1.2/tests/v0_metadata_wiremock.rs +638 -0
  166. databricks_sql_kernel-0.1.2/tests/v0_query_tags_headers_e2e.rs +192 -0
  167. databricks_sql_kernel-0.1.2/tests/v0_session_e2e.rs +155 -0
  168. databricks_sql_kernel-0.1.2/tests/v0_session_wiremock.rs +704 -0
  169. databricks_sql_kernel-0.1.2/tests/v0_tls_e2e.rs +200 -0
@@ -0,0 +1,29 @@
1
+ # CODEOWNERS for databricks-sql-kernel.
2
+ #
3
+ # Patterns are evaluated bottom-to-top per GitHub semantics: the LAST
4
+ # matching rule wins. Keep more-specific rules below more-general ones.
5
+ #
6
+ # All paths below require review from @databricks/eng-oss-sql-driver
7
+ # (enforced by the `protect-main` ruleset's `require_code_owner_review`
8
+ # rule). The team can sub-delegate review via informal channels; the
9
+ # CODEOWNERS file enforces the gate.
10
+
11
+ # CI workflows and CI configuration.
12
+ .github/workflows/ @databricks/eng-oss-sql-driver
13
+ .github/dependabot.yml @databricks/eng-oss-sql-driver
14
+ .github/actions/ @databricks/eng-oss-sql-driver
15
+
16
+ # Self-referential: CODEOWNERS edits require team approval (prevents
17
+ # silent weakening of the rule set).
18
+ .github/CODEOWNERS @databricks/eng-oss-sql-driver
19
+
20
+ # Cargo dependency graph + license-policy gate. Adding a new crate
21
+ # or relaxing license rules is a security-relevant change.
22
+ /Cargo.toml @databricks/eng-oss-sql-driver
23
+ /Cargo.lock @databricks/eng-oss-sql-driver
24
+ /deny.toml @databricks/eng-oss-sql-driver
25
+ /about.toml @databricks/eng-oss-sql-driver
26
+
27
+ # PyO3 sub-crate manifests — pip / Python dep changes flow through here.
28
+ /pyo3/Cargo.toml @databricks/eng-oss-sql-driver
29
+ /pyo3/pyproject.toml @databricks/eng-oss-sql-driver
@@ -0,0 +1,142 @@
1
+ # Copyright (c) 2026 Databricks, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Configure JFrog Artifactory as the registry proxy for cargo / uv /
16
+ # (future) npm. Required by go/hardened-gha: direct access to public
17
+ # package registries (crates.io, pypi.org, etc.) is blocked at the
18
+ # Databricks-protected runner; everything goes through
19
+ # `databricks.jfrog.io`.
20
+ #
21
+ # Steps:
22
+ #
23
+ # 1. Exchange the workflow's GitHub OIDC ID token for a JFrog access
24
+ # token via `https://databricks.jfrog.io/access/api/v1/oidc/token`.
25
+ # 2. Optionally write `~/.cargo/config.toml` pointing at the JFrog
26
+ # cargo proxy (`db-cargo-remote`). Replaces direct crates.io
27
+ # access for `cargo fetch` / `cargo install` / `cargo deny check`.
28
+ # 3. Optionally export `UV_INDEX_URL` (and `PIP_INDEX_URL` for
29
+ # fallback compat) pointing at the JFrog PyPI proxy (`db-pypi`).
30
+ # Picked up by `uv sync` / `uv pip install` / any plain `pip`
31
+ # calls in the job.
32
+ #
33
+ # Calling workflows MUST add `permissions: id-token: write` to grant
34
+ # the OIDC mint capability; without it the curl in step 1 fails 403.
35
+ #
36
+ # Reference: go/hardened-gha
37
+ # https://docs.google.com/document/d/1zoHgolfZO_IUBIU3w40NmYsoZ9eTRdAmjlfwYOxkj70
38
+
39
+ name: Set up JFrog Artifactory access
40
+ description: |
41
+ Exchange GitHub OIDC for a JFrog token and (optionally) configure
42
+ cargo / uv to route through the Databricks JFrog proxy.
43
+
44
+ inputs:
45
+ cargo:
46
+ description: "Set 'true' to configure cargo to use the JFrog crates proxy."
47
+ required: false
48
+ default: "false"
49
+ uv:
50
+ description: |
51
+ Set 'true' to export UV_INDEX_URL (and PIP_INDEX_URL for compat)
52
+ pointing at the JFrog PyPI proxy. uv reads UV_INDEX_URL natively;
53
+ PIP_INDEX_URL is set for any tool that falls back to pip.
54
+ required: false
55
+ default: "false"
56
+
57
+ runs:
58
+ using: composite
59
+ steps:
60
+ - name: Get JFrog OIDC token
61
+ shell: bash
62
+ run: |
63
+ set -euo pipefail
64
+
65
+ # Mint a GitHub OIDC ID token scoped to the `jfrog-github`
66
+ # audience. Requires `permissions: id-token: write` on the
67
+ # calling job.
68
+ ID_TOKEN=$(curl -sLS \
69
+ -H "User-Agent: actions/oidc-client" \
70
+ -H "Authorization: Bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
71
+ "${ACTIONS_ID_TOKEN_REQUEST_URL}&audience=jfrog-github" | jq .value | tr -d '"')
72
+ echo "::add-mask::${ID_TOKEN}"
73
+
74
+ # Exchange for a JFrog access token (RFC 8693 token-exchange).
75
+ ACCESS_TOKEN=$(curl -sLS -XPOST -H "Content-Type: application/json" \
76
+ "https://databricks.jfrog.io/access/api/v1/oidc/token" \
77
+ -d "{\"grant_type\": \"urn:ietf:params:oauth:grant-type:token-exchange\", \"subject_token_type\":\"urn:ietf:params:oauth:token-type:id_token\", \"subject_token\": \"${ID_TOKEN}\", \"provider_name\": \"github-actions\"}" | jq .access_token | tr -d '"')
78
+ echo "::add-mask::${ACCESS_TOKEN}"
79
+
80
+ if [ -z "$ACCESS_TOKEN" ] || [ "$ACCESS_TOKEN" = "null" ]; then
81
+ echo "FAIL: Could not extract JFrog access token"
82
+ exit 1
83
+ fi
84
+
85
+ echo "JFROG_ACCESS_TOKEN=${ACCESS_TOKEN}" >> "$GITHUB_ENV"
86
+ echo "JFrog OIDC token obtained successfully"
87
+
88
+ - name: Configure cargo to use JFrog
89
+ if: inputs.cargo == 'true'
90
+ shell: bash
91
+ run: |
92
+ set -euo pipefail
93
+
94
+ mkdir -p ~/.cargo
95
+ cat > ~/.cargo/config.toml << 'EOF'
96
+ [source.crates-io]
97
+ replace-with = "jfrog"
98
+
99
+ [source.jfrog]
100
+ registry = "sparse+https://databricks.jfrog.io/artifactory/api/cargo/db-cargo-remote/index/"
101
+
102
+ [registries.jfrog]
103
+ index = "sparse+https://databricks.jfrog.io/artifactory/api/cargo/db-cargo-remote/index/"
104
+ credential-provider = ["cargo:token"]
105
+ EOF
106
+
107
+ cat > ~/.cargo/credentials.toml << EOF
108
+ [registries.jfrog]
109
+ token = "Bearer ${JFROG_ACCESS_TOKEN}"
110
+ EOF
111
+ chmod 600 ~/.cargo/credentials.toml
112
+
113
+ # NOTE: we deliberately do NOT export CARGO_REGISTRIES_JFROG_TOKEN
114
+ # into $GITHUB_ENV. cargo (and tools that shell out to it —
115
+ # cargo-deny, cargo-llvm-cov) read the token from the
116
+ # ~/.cargo/credentials.toml written above via the
117
+ # `credential-provider = ["cargo:token"]` line in config.toml,
118
+ # so the env var was redundant. Critically, the token is
119
+ # regenerated on every run, and Swatinem/rust-cache (run by
120
+ # actions-rust-lang/setup-rust-toolchain) hashes every
121
+ # `CARGO*`-prefixed env var into its cache key — so exporting a
122
+ # fresh token here gave every run a unique key and a guaranteed
123
+ # cache miss (full cold rebuild of the ~57-crate tree in every
124
+ # job). Keeping the token in the credentials file only restores
125
+ # stable cache keys and warm builds.
126
+
127
+ echo "Cargo configured to use JFrog registry"
128
+
129
+ - name: Configure uv / pip to use JFrog
130
+ if: inputs.uv == 'true'
131
+ shell: bash
132
+ run: |
133
+ set -euo pipefail
134
+
135
+ # uv reads UV_INDEX_URL natively; PIP_INDEX_URL is set for
136
+ # fallback compatibility with tools that shell out to pip.
137
+ # Both URLs point at db-pypi via the JFrog OIDC service
138
+ # account.
139
+ INDEX_URL="https://gha-service-account:${JFROG_ACCESS_TOKEN}@databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple"
140
+ echo "UV_INDEX_URL=${INDEX_URL}" >> "$GITHUB_ENV"
141
+ echo "PIP_INDEX_URL=${INDEX_URL}" >> "$GITHUB_ENV"
142
+ echo "uv / pip configured to use JFrog registry"
@@ -0,0 +1,70 @@
1
+ # Copyright (c) 2026 Databricks, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Dependabot configuration for the kernel.
16
+ #
17
+ # Ecosystems intentionally covered:
18
+ # - cargo: keeps the Rust crate graph patched, complements
19
+ # `cargo-deny` (RustSec advisories already block merges).
20
+ # - github-actions: keeps the SHA-pinned actions current.
21
+ #
22
+ # Ecosystems intentionally NOT covered:
23
+ # - pip: per go/pinning-python-deps the kernel is an
24
+ # externally-published library; we use major-version bounds in
25
+ # pyo3/pyproject.toml + `uv sync` re-resolution per CI run, with
26
+ # no committed lockfile. Letting Dependabot rewrite pinned pip
27
+ # versions would conflict with that policy.
28
+
29
+ version: 2
30
+ updates:
31
+ # Root workspace (kernel + the pyo3 member, which share the root
32
+ # Cargo.lock).
33
+ - package-ecosystem: "cargo"
34
+ directory: "/"
35
+ schedule:
36
+ interval: "weekly"
37
+ open-pull-requests-limit: 10
38
+ groups:
39
+ # Batch patch + minor updates to reduce PR churn; security
40
+ # advisories still come through as individual PRs.
41
+ cargo-minor-and-patch:
42
+ update-types:
43
+ - "minor"
44
+ - "patch"
45
+
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
+
61
+ - package-ecosystem: "github-actions"
62
+ directory: "/"
63
+ schedule:
64
+ interval: "weekly"
65
+ open-pull-requests-limit: 5
66
+ groups:
67
+ gha-minor-and-patch:
68
+ update-types:
69
+ - "minor"
70
+ - "patch"
@@ -0,0 +1,125 @@
1
+ # Copyright (c) 2026 Databricks, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Publishes the kernel crate to Databricks's internal Cargo registry
16
+ # (db-cargo-remote, fronted by JFrog Artifactory). Triggered by:
17
+ #
18
+ # 1. Pushing a `v*` git tag (e.g. `v0.1.0`) — the canonical release path.
19
+ # 2. Manual `workflow_dispatch` from the Actions tab — for ad-hoc test
20
+ # publishes or re-running after a transient failure.
21
+ #
22
+ # Downstream consumer: `databricks-eng/universe` pulls the kernel via
23
+ # `third_party/rust/BUILD.bazel`'s `crates_vendor` packages dict,
24
+ # referencing it like any other crates.io dep (mirrors how
25
+ # `databricks-zerobus-ingest-sdk` is consumed). See universe PR
26
+ # https://github.com/databricks-eng/universe/pull/2006687 for the
27
+ # initial consumer wiring.
28
+ #
29
+ # Why this workflow exists: the same JFrog proxy this repo already
30
+ # uses to FETCH dependencies (via `.github/actions/setup-jfrog`) can
31
+ # also receive `cargo publish` uploads — they route to the local
32
+ # backing repo in the virtual `db-cargo-remote`. The OIDC token
33
+ # exchange grants both read and write scopes by default for the
34
+ # `jfrog-github` audience.
35
+
36
+ name: Cargo Publish
37
+
38
+ on:
39
+ push:
40
+ tags:
41
+ - "v*"
42
+ workflow_dispatch:
43
+ inputs:
44
+ dry_run:
45
+ description: "Run `cargo publish --dry-run` instead of an actual publish"
46
+ required: false
47
+ default: "false"
48
+
49
+ concurrency:
50
+ # Serialize publishes — Artifactory rejects concurrent uploads of
51
+ # the same crate-version pair, and a concurrent dry-run + real run
52
+ # could leave the registry in a confusing state.
53
+ group: ${{ github.repository }}-cargo-publish
54
+ cancel-in-progress: false
55
+
56
+ permissions:
57
+ contents: read
58
+ # Required for the OIDC token exchange that the
59
+ # `.github/actions/setup-jfrog` composite uses. See go/hardened-gha.
60
+ id-token: write
61
+
62
+ defaults:
63
+ run:
64
+ shell: bash
65
+
66
+ jobs:
67
+ publish:
68
+ name: cargo publish
69
+ runs-on: ubuntu-latest
70
+ steps:
71
+ - name: Checkout
72
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
73
+ with:
74
+ # Tag-triggered runs need full history-of-the-tag's commit only;
75
+ # depth=1 keeps the checkout small.
76
+ fetch-depth: 1
77
+
78
+ - name: Configure JFrog Artifactory access
79
+ uses: ./.github/actions/setup-jfrog
80
+ with:
81
+ cargo: "true"
82
+
83
+ - name: Set up Rust toolchain
84
+ uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.13.0
85
+
86
+ # Sanity-check the tag-vs-Cargo.toml-version alignment so a typo
87
+ # in the tag (`v0.1.0` vs Cargo.toml `0.1.1`) fails loudly here
88
+ # rather than producing a mismatched-name release. Only runs on
89
+ # tag-triggered builds; manual workflow_dispatch skips the check.
90
+ - name: Verify tag matches Cargo.toml version
91
+ if: github.event_name == 'push'
92
+ run: |
93
+ set -euo pipefail
94
+ TAG_VERSION="${GITHUB_REF_NAME#v}"
95
+ CARGO_VERSION=$(grep '^version' Cargo.toml | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
96
+ if [ "$TAG_VERSION" != "$CARGO_VERSION" ]; then
97
+ echo "FAIL: tag $GITHUB_REF_NAME (=> $TAG_VERSION) does not match Cargo.toml version $CARGO_VERSION"
98
+ exit 1
99
+ fi
100
+ echo "Tag and Cargo.toml version both at $CARGO_VERSION"
101
+
102
+ - name: cargo publish
103
+ env:
104
+ # The `setup-jfrog` action exports CARGO_REGISTRIES_JFROG_TOKEN
105
+ # into GITHUB_ENV for tools that read env directly; cargo
106
+ # publish picks it up automatically via the credential-provider
107
+ # config the action writes to ~/.cargo/credentials.toml.
108
+ CARGO_NET_GIT_FETCH_WITH_CLI: "true"
109
+ run: |
110
+ set -euo pipefail
111
+ DRY_RUN_FLAG=""
112
+ if [ "${{ github.event.inputs.dry_run || 'false' }}" = "true" ]; then
113
+ DRY_RUN_FLAG="--dry-run"
114
+ echo "DRY RUN — no actual publish will happen"
115
+ fi
116
+ # `--registry jfrog` matches the `[registries.jfrog]` block
117
+ # that setup-jfrog writes into ~/.cargo/config.toml. The
118
+ # workspace's other members (pyo3/) have their own publish
119
+ # workflows / are not part of this release; --no-verify
120
+ # skips re-compiling the crate during the package step
121
+ # since CI has already done that elsewhere.
122
+ cargo publish \
123
+ --registry jfrog \
124
+ --package databricks-sql-kernel \
125
+ $DRY_RUN_FLAG
@@ -0,0 +1,46 @@
1
+ # Copyright (c) 2026 Databricks, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Port of databricks/databricks-jdbc's closeStale.yml. Closes issues
16
+ # and PRs after 30 days of inactivity (with a 7-day stale window).
17
+
18
+ name: Close stale issues and PRs
19
+
20
+ on:
21
+ schedule:
22
+ # 06:30 UTC daily
23
+ - cron: "30 6 * * *"
24
+ workflow_dispatch:
25
+
26
+ permissions:
27
+ issues: write
28
+ pull-requests: write
29
+
30
+ jobs:
31
+ stale:
32
+ name: Close stale issues and PRs
33
+ runs-on:
34
+ group: databricks-protected-runner-group
35
+ labels: linux-ubuntu-latest
36
+ steps:
37
+ - uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
38
+ with:
39
+ stale-issue-message: "This issue has been marked as Stale because it has been open for 30 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue."
40
+ stale-pr-message: "This PR has been marked as Stale because it has been open for 30 days with no activity. If you would like the PR to remain open, please remove the stale label or comment on the PR."
41
+ close-pr-message: "This PR was closed because it has been inactive for 7 days since being marked as stale."
42
+ close-issue-message: "This issue was closed because it has been inactive for 7 days since being marked as stale."
43
+ days-before-stale: 30
44
+ days-before-close: 7
45
+ exempt-issue-labels: "epic, discussion, kernel-v0, tracked"
46
+ exempt-pr-labels: "kernel-v0, tracked"
@@ -0,0 +1,104 @@
1
+ # Copyright (c) 2026 Databricks, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Code coverage report. Runs `cargo llvm-cov` against the unit /
16
+ # integration test suite (E2E tests stay #[ignore]'d) and uploads
17
+ # the lcov result to Codecov via OIDC.
18
+
19
+ name: Coverage
20
+
21
+ on:
22
+ push:
23
+ 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"
34
+ pull_request:
35
+ branches: [main]
36
+ paths:
37
+ - "src/**"
38
+ - "tests/**"
39
+ - "pyo3/**"
40
+ - "Cargo.toml"
41
+ - "Cargo.lock"
42
+ - ".github/workflows/coverage.yml"
43
+ workflow_dispatch:
44
+
45
+ concurrency:
46
+ group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
47
+ cancel-in-progress: true
48
+
49
+ permissions:
50
+ contents: read
51
+ id-token: write
52
+ pull-requests: write
53
+
54
+ defaults:
55
+ run:
56
+ shell: bash
57
+
58
+ jobs:
59
+ coverage:
60
+ name: Coverage
61
+ runs-on:
62
+ group: databricks-protected-runner-group
63
+ labels: linux-ubuntu-latest
64
+ steps:
65
+ - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
66
+ with:
67
+ fetch-depth: 0
68
+
69
+ - uses: ./.github/actions/setup-jfrog
70
+ with:
71
+ cargo: "true"
72
+
73
+ - uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 # v1.16.1
74
+ with:
75
+ toolchain: stable
76
+ components: llvm-tools-preview
77
+
78
+ - name: Install cargo-llvm-cov
79
+ uses: taiki-e/install-action@e0eafa9a0d485c37f97c0f7beb930a58a2facbac # v2.79.4
80
+ with:
81
+ tool: cargo-llvm-cov
82
+
83
+ - name: Run coverage
84
+ # E2E tests stay #[ignore]'d; coverage runs the same suite
85
+ # as `pr-checks.yml`'s `test` job.
86
+ run: cargo llvm-cov --workspace --lcov --output-path lcov.info
87
+
88
+ # Codecov upload.
89
+ #
90
+ # `use_oidc: true` is tokenless, but it requires the repo to be
91
+ # enrolled in Codecov's GitHub App with OIDC enabled in the
92
+ # Codecov dashboard. Until that is set up, the action falls
93
+ # back to anonymous upload which Codecov silently rate-limits
94
+ # and may drop. `fail_ci_if_error: false` keeps the job green
95
+ # in that case (we don't want a one-off Codecov outage to red-
96
+ # light unrelated PRs) — but it does mean coverage data may not
97
+ # actually land. Watch for the Codecov check on the first few
98
+ # PRs to confirm uploads are flowing.
99
+ - name: Upload to Codecov
100
+ uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
101
+ with:
102
+ files: lcov.info
103
+ fail_ci_if_error: false
104
+ use_oidc: true
@@ -0,0 +1,92 @@
1
+ # Copyright (c) 2026 Databricks, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Verbatim port of the dco-check workflow used across the other
16
+ # databricks/databricks-sql-* repos. Enforces `git commit -s` sign-off
17
+ # on every commit in a PR — CLAUDE.md mandates this convention.
18
+
19
+ name: DCO Check
20
+
21
+ on:
22
+ pull_request:
23
+ types: [opened, synchronize, reopened]
24
+ branches: [main]
25
+
26
+ permissions:
27
+ contents: read
28
+
29
+ jobs:
30
+ dco-check:
31
+ runs-on:
32
+ group: databricks-protected-runner-group
33
+ labels: linux-ubuntu-latest
34
+ name: Check DCO Sign-off
35
+ steps:
36
+ - name: Checkout
37
+ uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
38
+ with:
39
+ fetch-depth: 0
40
+
41
+ - name: Check DCO Sign-off
42
+ env:
43
+ BASE_SHA: ${{ github.event.pull_request.base.sha }}
44
+ HEAD_SHA: ${{ github.event.pull_request.head.sha }}
45
+ run: |
46
+ #!/bin/bash
47
+ set -e
48
+
49
+ echo "Checking commits from $BASE_SHA to $HEAD_SHA"
50
+
51
+ COMMITS=$(git rev-list --no-merges "$BASE_SHA..$HEAD_SHA")
52
+
53
+ if [ -z "$COMMITS" ]; then
54
+ echo "No commits found in this PR"
55
+ exit 0
56
+ fi
57
+
58
+ FAILED_COMMITS=()
59
+
60
+ for commit in $COMMITS; do
61
+ echo "Checking commit: $commit"
62
+ COMMIT_MSG=$(git log --format=%B -n 1 "$commit")
63
+ if echo "$COMMIT_MSG" | grep -q "^Signed-off-by: "; then
64
+ echo " Commit $commit has DCO sign-off"
65
+ else
66
+ echo " Commit $commit is missing DCO sign-off"
67
+ FAILED_COMMITS+=("$commit")
68
+ fi
69
+ done
70
+
71
+ if [ ${#FAILED_COMMITS[@]} -ne 0 ]; then
72
+ echo ""
73
+ echo "DCO Check Failed!"
74
+ echo "The following commits are missing the required 'Signed-off-by' line:"
75
+ for commit in "${FAILED_COMMITS[@]}"; do
76
+ echo " - $commit: $(git log --format=%s -n 1 "$commit")"
77
+ done
78
+ echo ""
79
+ echo "To fix this, you need to sign off your commits. You can:"
80
+ echo "1. Add sign-off to new commits: git commit -s -m 'Your commit message'"
81
+ echo "2. Amend existing commits: git commit --amend --signoff"
82
+ echo "3. For multiple commits, use: git rebase --signoff HEAD~N (where N is the number of commits)"
83
+ echo ""
84
+ echo "The sign-off should be in the format:"
85
+ echo "Signed-off-by: Your Name <your.email@example.com>"
86
+ echo ""
87
+ echo "For more details, see CONTRIBUTING.md"
88
+ exit 1
89
+ else
90
+ echo ""
91
+ echo "All commits have proper DCO sign-off!"
92
+ fi