Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
7b4d982
chore: move the Trino driver sources into a standalone crate
maltesander Jul 26, 2026
6caff70
fix: adapt the driver to stackable-odbc-core's newer API
maltesander Jul 26, 2026
3495a13
chore: add the lint and dependency-policy configuration
maltesander Jul 26, 2026
6e1766e
chore: move the release packaging scripts
maltesander Jul 26, 2026
4fc70c0
chore: move the Power Query custom connector
maltesander Jul 26, 2026
e3f70cc
chore: move the Trino integration test suite
maltesander Jul 26, 2026
f76c67f
chore: move the Windows VM test harness
maltesander Jul 26, 2026
395e956
ci: add build, lint, audit and release workflows
maltesander Jul 26, 2026
0e72d4e
docs: add README, agent guides and changelog
maltesander Jul 26, 2026
016a305
chore: add cargo-release configuration
maltesander Jul 26, 2026
36ba3db
chore: purge the remaining workspace-era references
maltesander Jul 26, 2026
c7a0cd0
fix!: state the SQLGetInfo capabilities core no longer invents
maltesander Jul 26, 2026
d721579
fix: stop advertising scalar functions whose escapes fail
maltesander Jul 26, 2026
4d1ec70
feat: translate the twelve scalar-function escapes, and state nine mo…
maltesander Jul 26, 2026
d9223bc
fix: report Trino's own reserved words as SQL_KEYWORDS
maltesander Jul 26, 2026
1591cfe
fix(connector): stop overriding capabilities the driver now reports h…
maltesander Jul 26, 2026
b5bc8b4
chore: update serial_test to 4
maltesander Jul 26, 2026
81fad40
feat!: move onto core's unified backend error and typed descriptors
maltesander Jul 27, 2026
d14cc24
feat: carry Trino's own error code and cause across the FFI boundary
maltesander Jul 27, 2026
2cedb52
ci: make the required check observe the lint gate
maltesander Jul 27, 2026
f3aa236
docs: describe the error, construction and test-support contracts
maltesander Jul 27, 2026
e9374f3
ci: drop the redundant checkout token
maltesander Jul 27, 2026
1bc294a
refactor: partition core's exported functions into advertised and wit…
maltesander Jul 27, 2026
ea18770
feat!: move onto core's cancel token and per-connection capabilities
maltesander Jul 28, 2026
5d22698
fix: report HY008 for a cancelled fetch, and follow core's sealed types
maltesander Jul 28, 2026
e73f10c
fix: translate {fn CONVERT(...)} to a Trino CAST
maltesander Jul 28, 2026
17a8423
fix: read Trino's IEEE special floats, and stop JSON-quoting fallback…
maltesander Jul 28, 2026
7f078ee
fix: strip the trailing statement terminator before submitting
maltesander Jul 28, 2026
d5038ea
test: add the raw C ABI pen test, with no Driver Manager in the loop
maltesander Jul 28, 2026
90ec9b7
test: add the SQL surface pen test, and disprove the EXPLAIN stall
maltesander Jul 28, 2026
988a1f6
test: fuzz the type-transform matrix, NULL, boundaries and terminators
maltesander Jul 28, 2026
bf45653
feat!: keep Trino's Java stack out of the SQLGetDiagRec message
maltesander Jul 28, 2026
e50260c
ci: run the unit tests on Windows, not just cross-compile the DLL
maltesander Jul 28, 2026
5c7a7dd
test: assert core's fixed behaviour instead of recording it as known
maltesander Jul 28, 2026
7970930
feat!: honour SQL_ATTR_METADATA_ID, and hand the catalog rows to core
maltesander Jul 28, 2026
28144bf
feat!: serve SQLTablePrivileges, and take the parsed TableType list
maltesander Jul 28, 2026
f58d359
feat: answer SQLDescribeParam from Trino's DESCRIBE INPUT
maltesander Jul 28, 2026
078152d
feat!: default to https, and attribute queries with Source and Client…
maltesander Jul 28, 2026
d958865
test: check the folding contract, and fix the two bugs it found
maltesander Jul 28, 2026
c5a23e3
test: assert core's fixed parameter handling instead of noting it
maltesander Jul 28, 2026
0378893
fix: report the verbose type for datetime columns, and bind parameters
maltesander Jul 28, 2026
f2da4e8
fix: let the catalog functions reach a catalog other than the connect…
maltesander Jul 28, 2026
70b0c86
feat!: declare the ten capabilities core stopped inventing, and cover…
maltesander Jul 29, 2026
777ad59
feat: enforce the query timeout, report a dead connection, and honour…
maltesander Jul 29, 2026
e35959c
fix: report a cancelled fetch as HY008 rather than an empty result set
maltesander Jul 29, 2026
98a5974
feat: expose eight Trino client options as connection-string keys
maltesander Jul 29, 2026
d5f54fe
feat: build against the Trino client fork, and fold four more constan…
maltesander Jul 29, 2026
e1a1cc0
fix: report the catalog the session is on, not the one it connected with
maltesander Jul 29, 2026
de9ae70
feat: expose SessionUser and Locale as connection-string keys
maltesander Jul 29, 2026
2e48800
feat: expose Roles as a connection-string key
maltesander Jul 29, 2026
02077ba
feat: expose TimeZone as a connection-string key
maltesander Jul 29, 2026
0c2ce1a
feat: expose ExtraHeaders and ClientCapabilities as connection-string…
maltesander Jul 29, 2026
dc901b9
feat: expose Proxy, ProxyUser and ProxyPassword as connection-string …
maltesander Jul 30, 2026
232958d
feat: interactive OAuth 2.0 authentication
maltesander Jul 30, 2026
067a129
feat: User is optional under ExternalAuthentication
maltesander Jul 30, 2026
6688851
chore: improve upstream fix comment
maltesander Jul 30, 2026
f28f89b
feat: three-mode TLS verification and mutual TLS
maltesander Jul 30, 2026
863f6ca
refactor(test): move test/ to integration-tests/ with scripts, stack,…
maltesander Jul 30, 2026
b16877d
test: add shared Results harness for the integration suites
maltesander Jul 30, 2026
9731d24
test: add Stack, reading the running stack from generated/stack.env
maltesander Jul 30, 2026
8e95830
test: move the suites onto the shared harness and stack.env
maltesander Jul 30, 2026
be2a718
refactor(test): split setup into generators, describe the stack in st…
maltesander Jul 30, 2026
eb53a42
test: replace the self-signed cert with a CA and four signed leaves
maltesander Jul 30, 2026
b0dd034
chore(test): pin Trino 483
maltesander Jul 30, 2026
5b86058
test: move the coordinator and every client to HTTPS only
maltesander Jul 30, 2026
811c290
test: authenticate client certificates against the test CA
maltesander Jul 30, 2026
c43792a
test: cover the TLS verification modes and mutual TLS
maltesander Jul 30, 2026
997ab71
test: add compose profiles and the Trino config assembler
maltesander Jul 30, 2026
ee07247
test: gate suites on their profile and recreate Trino when profiles c…
maltesander Jul 30, 2026
852b912
docs: document the integration-tests layout, profiles and HTTPS-only …
maltesander Jul 30, 2026
2cf14f0
Merge branch 'test-rework' into scaffolding
maltesander Jul 30, 2026
5885cfe
test: bring Keycloak into the stack under the oauth profile
maltesander Jul 30, 2026
1860bc0
test: configure the coordinator for OAuth 2.0 under the oauth profile
maltesander Jul 30, 2026
0fc1847
fix: report 28000 for a failed interactive OAuth 2.0 login
maltesander Jul 30, 2026
63559a9
test: extract the shared ctypes ODBC plumbing into odbc_abi.py
maltesander Jul 30, 2026
4184a39
test: add the fake browser for the interactive OAuth 2.0 flow
maltesander Jul 30, 2026
cd48b0d
test: cover the interactive OAuth 2.0 flow end to end
maltesander Jul 30, 2026
2d04deb
test: cover both ways an interactive login fails
maltesander Jul 30, 2026
c5a1045
test: cover both sides of the DriverCompletion gate
maltesander Jul 30, 2026
4ab612d
docs: record what the OAuth 2.0 suite covers
maltesander Jul 30, 2026
b40589d
fix: drop SQLSetScrollOptions from the withheld function list
maltesander Jul 30, 2026
28f03a8
test: spool to MinIO under the spooling profile
maltesander Jul 30, 2026
a75ae25
fix: advertise SQL_API_SQLEXTENDEDFETCH, which the driver performs
maltesander Jul 30, 2026
6e303db
fix: adapt to core withholding the ODBC 2.x entry points
maltesander Jul 30, 2026
670db68
feat: add the Encoding connection-string key
maltesander Jul 30, 2026
a9d8404
chore: point at the fork commits carrying Client::decode_page
maltesander Jul 30, 2026
8e7775a
test: cover Trino's spooled protocol through the driver
maltesander Jul 30, 2026
dbdfad8
feat: decode spooled result pages in the fetch path
maltesander Jul 30, 2026
e7bfbfe
test: make the spooling suite prove segments were fetched
maltesander Jul 30, 2026
7358987
test: record the Driver Manager's own answer to a cross-thread cancel
maltesander Jul 30, 2026
b9f4109
docs: record the spooled protocol and the Encoding key
maltesander Jul 30, 2026
c066783
test: let the cross-thread cancel accept the DM's own answer
maltesander Jul 30, 2026
62d1b52
docs: give the README a feature summary and the full key list
maltesander Jul 30, 2026
7b206d1
test: drop the stale ODBC ini fixtures that named an absolute home path
maltesander Jul 30, 2026
13659ca
test: give the stack a hive catalog that can hold a transaction
maltesander Jul 30, 2026
016c551
feat: support ODBC manual-commit transactions
maltesander Jul 30, 2026
b5ee784
test: drive the transaction surface through the C ABI
maltesander Jul 30, 2026
8251379
test: prove the transaction contract through the Driver Manager
maltesander Jul 30, 2026
bb7bf79
fix: answer the three SQLGetInfo strings that identify a connection
maltesander Jul 30, 2026
216cb8e
chore: switch SQL_ERROR test assert
maltesander Jul 30, 2026
ab2dc69
refactor: the ten catalog hooks take core's query types
maltesander Jul 31, 2026
495fc4d
feat: expose the connection-string surface to Windows and Power BI
maltesander Aug 1, 2026
f2c15a7
feat(connector): brand the Power Query icons with the Stackable mark
maltesander Aug 1, 2026
8c26ebc
docs: rewrite the README for the people who install the driver
maltesander Aug 1, 2026
e538b8b
docs: correct the claims that drifted across the supporting docs
maltesander Aug 1, 2026
e537ddc
docs(connector): point the SDK test query at a coordinator that exists
maltesander Aug 1, 2026
87b5b1c
style(connector): let the comments describe the connector as it stands
maltesander Aug 1, 2026
d3ef256
docs: audit the comments against the code they describe
maltesander Aug 1, 2026
dabc07f
ci: gate on rustdoc, and stop linking public docs into private items
maltesander Aug 1, 2026
03a2ca5
fix: correct the defects a pre-release pen test found
maltesander Aug 1, 2026
29dae65
docs: add a security policy and a private disclosure channel
maltesander Aug 1, 2026
5318102
ci: adopt the org Renovate preset
maltesander Aug 1, 2026
ceee166
ci: run OpenSSF Scorecard and publish its badge
maltesander Aug 1, 2026
257c0b9
build: record the natively linked components for the SBOM
maltesander Aug 1, 2026
8a9b0f0
build: generate a CycloneDX SBOM from the built artifact
maltesander Aug 1, 2026
0fdf622
build: fill SBOM licenses and correct non-registry purls
maltesander Aug 1, 2026
b31f024
build: merge natively linked components into the SBOM
maltesander Aug 1, 2026
0bca97f
build: make the artifact the SBOM subject and record the toolchain
maltesander Aug 1, 2026
dbbf777
build: fail the SBOM run when the native links drift
maltesander Aug 1, 2026
8c6e13d
docs: describe the SBOM pipeline and its native fragment
maltesander Aug 1, 2026
38b5f65
build: cover the Windows artifact in the SBOM pipeline
maltesander Aug 1, 2026
c3661d3
docs: correct the SBOM notes to match the pipeline
maltesander Aug 1, 2026
c6085d9
build: emit SPDX alongside CycloneDX
maltesander Aug 1, 2026
1b2962e
build: give the Power Query connector its own SBOM
maltesander Aug 1, 2026
199e7c3
build: ship an SBOM in every archive, and checksum the release
maltesander Aug 1, 2026
df8ebfb
docs: cover SPDX, the connector SBOM and the archive integration
maltesander Aug 1, 2026
5bd6d0d
feat: answer the ODBC Administrator's Add... and Configure... buttons
maltesander Aug 2, 2026
5477729
docs: cover the setup hook and the buttons it answers
maltesander Aug 2, 2026
6fd3cf9
build: embed a Windows version resource in the driver DLL
maltesander Aug 2, 2026
f6dda73
test: drive the ODBC Administrator's buttons on the Windows VM
maltesander Aug 2, 2026
ac6e330
docs: cover the version resource and the dialog test
maltesander Aug 2, 2026
344a773
feat: say that an interactive login cannot be tested from the dialog
maltesander Aug 2, 2026
ab029cd
build: take stackable-odbc-core from git rather than a sibling checkout
maltesander Aug 3, 2026
98aafb7
docs: rewrite documentation and code comments for the first release
maltesander Aug 3, 2026
6867bd3
ci: build releases with cargo auditable and attest what they produce
maltesander Aug 3, 2026
92b1bbc
fix: name what actually failed when the coordinator cannot be reached
maltesander Aug 3, 2026
c93eab9
fix: flatten the remaining reqwest chains into their diagnostic messages
maltesander Aug 3, 2026
90382c3
docs: record the measured wording of each connect failure
maltesander Aug 3, 2026
96a9ad6
fix(tests): start the stack when it is configured but not running
maltesander Aug 3, 2026
8e65fc9
fix(connector): the advanced-options surface loads and omits blank fi…
adwk67 Aug 3, 2026
d978860
test: run the suites on Windows from one shared registry
maltesander Aug 3, 2026
b9845e4
fix: Certificate is the trust anchor, not an addition to the store
maltesander Aug 3, 2026
6dbc462
fix: read back the negative years the driver itself writes
maltesander Aug 3, 2026
4e2beed
fix(escape): translate {fn RAND(seed)} rather than handing Trino the …
maltesander Aug 3, 2026
96c5d04
fix: keep the transaction abort flag scoped to an open transaction
maltesander Aug 3, 2026
17243fe
fix(connector): stop inventing a user, and correct three wrong values
maltesander Aug 3, 2026
301c210
fix(packaging): check what the installers and the export check claim
maltesander Aug 3, 2026
eb938a3
test: cover the escapes, the session keys and SQLDescribeParam
maltesander Aug 3, 2026
9fbf103
docs: correct the archive contents and complete the pre-commit list
maltesander Aug 3, 2026
de4b52f
chore: bump stackable-odbc-core
maltesander Aug 3, 2026
4ac86d1
fix(escapes): correct TRUNCATE, LENGTH, LTRIM and RTRIM against the spec
maltesander Aug 3, 2026
ce51c1e
docs(escapes): record the ATAN2 deviation and the ROUND and WEEK find…
maltesander Aug 3, 2026
4f661ef
chore: bump stackable-odbc-core, and carry intervals in nanoseconds
maltesander Aug 4, 2026
4c081f4
feat: report the fractional seconds this driver drops as 01S07
maltesander Aug 4, 2026
7685655
edits to README
adwk67 Aug 4, 2026
31a6e19
docs: name header cells
adwk67 Aug 4, 2026
58e1b8a
build: take stackable-odbc-core from the v0.1.0 tag
maltesander Aug 4, 2026
76c00f3
fix(packaging): unblock cargo-release, and derive every version from …
maltesander Aug 4, 2026
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
282 changes: 282 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
---
name: Build and Test

# TODO(@maltesander): The Trino integration suite (./integration-tests/setup.sh
# followed by ./integration-tests/run-tests.sh) is not run
# here. The core compose stack is Trino plus Postgres; the
# oauth and spooling profiles add Keycloak and MinIO, are
# opt-in, and are not proposed for CI. Whether the core
# stack fits a standard runner is unmeasured, and
# ubuntu-24.04 is 4 vCPU / 16 GB, so it should be tried
# rather than assumed. If it does not fit, record the
# measured failure here in place of this note. Until then,
# run it locally before a release. Unit tests run on every
# PR below.

permissions:
contents: read

on:
push:
branches:
- main
pull_request:
merge_group:

# Supersede in-flight runs on the same ref. Never cancel in a merge queue: a
# cancelled merge_group run reports failure and evicts the PR from the queue.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN_VERSION: "1.95.0"

# Every job below names a runner image rather than a `-latest` alias, so an
# image roll cannot change what a merge is gated on. The label cannot be lifted
# into a variable: `runs-on` accepts no `env` context, and the one context that
# would work, `vars`, holds its value in repository settings rather than here.
jobs:
# Formatting, clippy (which is what enforces the unwrap_used /
# unwrap_in_result / panic denies from Cargo.toml), cargo-deny and
# cargo-sort. This lives in this workflow rather than its own because
# `needs:` cannot cross workflows, and a lint gate the required check does
# not observe is not a gate.
pre-commit:
name: pre-commit
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
# The cargo-test pre-commit hook links libodbc via odbc-sys.
- name: Install host dependencies
uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0
with:
packages: unixodbc-dev
# A cache key, not a runner label, but it tracks the runner image so
# that bumping the image invalidates the cached .deb files.
version: ubuntu-24.04

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Install Rust ${{ env.RUST_TOOLCHAIN_VERSION }} toolchain
uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b # 1.95.0
with:
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
components: rustfmt, clippy

- name: Setup Rust Cache
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0

- name: Install cargo-deny and cargo-sort
uses: taiki-e/install-action@97a5807a604e12de3a13b52d868ebecaeeea757c # v2.75.4
with:
tool: cargo-deny,cargo-sort

- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.12"

- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

unit-tests:
name: Unit Tests
runs-on: ubuntu-24.04
timeout-minutes: 20
steps:
# odbc-sys links against libodbc/libodbcinst, so the unixODBC dev
# libraries must be present to link the test binaries (no running Driver
# Manager is needed — only the libraries).
- name: Install host dependencies
uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0
with:
packages: unixodbc-dev
# A cache key, not a runner label, but it tracks the runner image so
# that bumping the image invalidates the cached .deb files.
version: ubuntu-24.04

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Install Rust ${{ env.RUST_TOOLCHAIN_VERSION }} toolchain
uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
with:
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}

- name: Setup Rust Cache
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0

# --locked so CI tests the dependency versions Cargo.lock pins, and so a
# Cargo.toml change without a matching lockfile update fails here instead
# of drifting.
- name: Run unit tests
run: cargo test --locked

unit-tests-windows:
name: Unit Tests (Windows)
runs-on: windows-2022
timeout-minutes: 30
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

# aws-lc-sys reaches this crate through trino-rust-client -> reqwest ->
# rustls, and its build script assembles x86_64 code with NASM.
# Installed explicitly rather than relied on from the runner image, so a
# future image change cannot turn this job red for a reason unrelated to
# the driver.
- name: Install NASM (required to build aws-lc-sys)
run: choco install nasm --no-progress -y

- name: Add NASM to PATH
run: echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Install Rust ${{ env.RUST_TOOLCHAIN_VERSION }} toolchain
uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
with:
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
targets: x86_64-pc-windows-gnu

# A separate cache key: the Linux job's artefacts are a different target
# triple and sharing the key would thrash both.
- name: Setup Rust Cache
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
with:
key: windows-gnu-test

# The GNU target's linker. The runner image ships MSYS2, but its mingw64
# bin directory is not on PATH by default.
- name: Add MinGW to PATH
run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

# `--target x86_64-pc-windows-gnu`, not the runner's default MSVC triple.
# That is the target release.yaml builds and packaging/build-archives.sh
# ships, and a suite passing against a toolchain nobody receives is only
# evidence about that toolchain. odbc-sys links odbc32, which comes with
# the Windows SDK already on the runner, so there is no equivalent of the
# unixodbc-dev install the Linux jobs need.
- name: Run unit tests
run: cargo test --locked --target x86_64-pc-windows-gnu

# Builds both shipping artifacts the way release.yaml does, and checks the two
# properties that are invisible in a unit test run: that the DLL exports the
# ODBC entry points, and that what each artifact links at load time still
# matches packaging/sbom-native.json. The SBOM declares native dependencies by
# hand, since no cargo metadata describes them, so nothing but this check keeps
# the declaration true.
release-artifacts:
name: Release Artifacts
runs-on: ubuntu-24.04
timeout-minutes: 20
needs: [unit-tests]
steps:
- name: Install MinGW cross-compiler
run: sudo apt-get update && sudo apt-get install -y gcc-mingw-w64-x86-64 unixodbc-dev

- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false

- name: Install Rust ${{ env.RUST_TOOLCHAIN_VERSION }} toolchain
uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b
with:
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
targets: x86_64-pc-windows-gnu

- name: Setup Rust Cache
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
with:
key: windows-gnu

- name: Build Linux shared library
run: cargo build --locked --release

- name: Build Windows DLL
run: cargo build --locked --target x86_64-pc-windows-gnu --release

# Named symbols and a floor, not a printed count. The count alone used to
# be piped into `xargs echo`, whose exit status is what the step was
# graded on, so a DLL exporting nothing at all passed. The Driver Manager
# resolves these by name, and a missing one is a load failure on a user's
# machine that no unit test can see.
#
# ConfigDSNW is in the list because it is the only Windows-only export:
# core builds it nowhere else, and it is what the ODBC Administrator's
# Add.../Configure... buttons call. The Linux .so has 60 of these; the DLL
# has 61.
- name: Verify DLL exports
run: |
DLL=target/x86_64-pc-windows-gnu/release/stackable_odbc_trino.dll
EXPORTS=$(x86_64-w64-mingw32-objdump -p "$DLL" \
| awk '/Export Address Table/,/Ordinal base/' \
| grep -oE '\b(SQL|Config)[A-Za-z]+\b' | sort -u)
echo "$EXPORTS" | tr '\n' ' '; echo

missing=""
for sym in SQLAllocHandle SQLFreeHandle SQLDriverConnectW SQLConnectW \
SQLBrowseConnectW SQLDisconnect SQLPrepareW SQLExecute \
SQLExecDirectW SQLBindParameter SQLDescribeParam SQLFetch \
SQLGetData SQLNumResultCols SQLDescribeColW SQLGetInfoW \
SQLGetTypeInfoW SQLGetDiagRecW SQLTablesW SQLColumnsW \
SQLEndTran SQLCancel ConfigDSNW; do
grep -qx "$sym" <<< "$EXPORTS" || missing="$missing $sym"
done
if [ -n "$missing" ]; then
echo "::error::the DLL does not export:$missing"
exit 1
fi

# A floor as well as the named set, so a wholesale regression in
# core's forward_ffi! is caught even if these particular names survive.
count=$(echo "$EXPORTS" | grep -c .)
if [ "$count" -lt 55 ]; then
echo "::error::only $count ODBC symbols exported; expected at least 55"
exit 1
fi
echo "Trino DLL: $count ODBC symbols exported, all required names present"

# Two different assertions behind one flag. For the .so it compares
# DT_NEEDED against the sonames sbom-native.json declares, in both
# directions. For the .dll it asserts the mingw runtime is still linked
# statically: the release archive ships no runtime DLL, so an artifact
# that imported one would fail to load on a user's machine.
#
# Only the release binaries are checked, and only here rather than in
# release.yaml, because a pull request is where a dependency change can
# still be reverted cheaply.
- name: Verify declared native dependencies
run: |
./packaging/sbom.sh --check-native target/release/libstackable_odbc_trino.so
./packaging/sbom.sh --check-native target/x86_64-pc-windows-gnu/release/stackable_odbc_trino.dll

# Single required check for branch protection rules.
finished:
name: Finished Build and Test
if: always()
needs:
- pre-commit
- unit-tests
- unit-tests-windows
- release-artifacts
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
# Derived from needs.* rather than a hand-written list of job names: a job
# added to `needs` above but forgotten here would otherwise be silently
# non-blocking, which is exactly how the lint gate came to sit in a
# workflow this check never observed.
- name: Check job results
env:
RESULTS: ${{ join(needs.*.result, ' ') }}
run: |
for result in $RESULTS; do
if [[ "$result" != "success" ]]; then
echo "One or more jobs did not succeed: $RESULTS"
exit 1
fi
done
echo "All jobs passed: $RESULTS"
Loading
Loading