Skip to content

feat: make GizmoSQL clientless and expose backend services - #141

Open
cofin wants to merge 3 commits into
feat/provider-aware-cifrom
feat/clientless-gizmosql
Open

feat: make GizmoSQL clientless and expose backend services#141
cofin wants to merge 3 commits into
feat/provider-aware-cifrom
feat/clientless-gizmosql

Conversation

@cofin

@cofin cofin commented May 24, 2026

Copy link
Copy Markdown
Member

Summary

  • Replace the adbc_driver_flightsql startup and readiness path with the container-native gizmosql_client CLI.
  • Add gizmosql_duckdb_service and gizmosql_sqlite_service, each with an explicit DATABASE_BACKEND and a distinct container name.
  • Keep gizmosql_service backward compatible by returning the DuckDB-backed service.
  • Remove the gizmosql_connection fixture and leaked _make_connection_kwargs helper; consumers own their Flight SQL client.

Clientless contract

The CLI password is passed through GIZMOSQL_PASSWORD on exec_run, so it is not exposed in the command or persisted in container inspection metadata. The gizmosql install extra remains empty: neither backend adds a Python client dependency, and readiness for both backends runs through the CLI already shipped in the GizmoSQL image.

Behavior

Both backend fixtures can run independently or together in one session. Their image, credentials, TLS behavior, readiness check, xdist server isolation, and teardown share one lifecycle provider. Under pytest -n 2, each worker receives distinct DuckDB and SQLite containers.

Validation

  • uv run pytest tests/test_gizmosql.py -q — 6 passed
  • uv run ruff check src/pytest_databases/docker/gizmosql.py tests/test_gizmosql.py
  • uv run ruff format --check src/pytest_databases/docker/gizmosql.py tests/test_gizmosql.py
  • uv run mypy src/pytest_databases/docker/gizmosql.py tests/test_gizmosql.py
  • uv run pyright src/pytest_databases/docker/gizmosql.py tests/test_gizmosql.py

Closes #151

@cofin
cofin force-pushed the feat/clientless-gizmosql branch from 0ac1ea1 to 98d2ac5 Compare May 25, 2026 16:23
@cofin
cofin force-pushed the feat/clientless-gizmosql branch from 98d2ac5 to c79733f Compare July 21, 2026 17:13
@cofin cofin changed the title feat: move GizmoSQL to clientless validation feat: make GizmoSQL clientless and expose backend services Jul 21, 2026
@cofin
cofin changed the base branch from main to feat/provider-aware-ci July 21, 2026 18:51
@cofin
cofin force-pushed the feat/clientless-gizmosql branch 2 times, most recently from 94fdda8 to a790cdc Compare July 22, 2026 05:08
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat/provider-aware-ci@f0b2684). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/pytest_databases/docker/gizmosql.py 0.00% 26 Missing ⚠️
Additional details and impacted files
@@                   Coverage Diff                    @@
##             feat/provider-aware-ci    #141   +/-   ##
========================================================
  Coverage                          ?   6.14%           
========================================================
  Files                             ?      22           
  Lines                             ?    1805           
  Branches                          ?     135           
========================================================
  Hits                              ?     111           
  Misses                            ?    1671           
  Partials                          ?      23           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cofin added 3 commits July 22, 2026 15:56
Replace `adbc_driver_flightsql` startup/readiness path with the
container-native `gizmosql_client` CLI invoked through
`container.exec_run`. The `gizmosql_client` `--password` flag forces an
interactive prompt, so the password is plumbed via the
`GIZMOSQL_PASSWORD` env var on the exec call instead.

Public surface changes:
- Remove `gizmosql_connection` fixture and the leaked
  `_make_connection_kwargs` helper — users now build their own
  `flightsql.connect(...)` from `gizmosql_service.uri`, `.username`,
  and `.password`.
- Keep `GizmoSQLService` (with its `uri` property) and all
  configuration fixtures (`gizmosql_image`, `gizmosql_username`,
  `gizmosql_password`, `xdist_gizmosql_isolation_level`).
- Empty the `gizmosql` extra so `pytest-databases[gizmosql]` no longer
  pulls in `adbc-driver-flightsql` or `pyarrow`.

Tests rewritten to drive the service through `service.container.exec_run`
and include a regression guard that blocks `adbc_driver_flightsql` at
import time. `server`-only xdist isolation preserved (DuckDB backend
constraint). Docs updated to show user-owned Flight SQL client wiring.
@cofin
cofin force-pushed the feat/clientless-gizmosql branch from a790cdc to 2453783 Compare July 22, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(gizmosql): expose backend-specific DuckDB and SQLite service fixtures

2 participants