Skip to content

[MAINTENANCE] Register SingleStore as a harness backend - #12036

Draft
joshua-stauffer wants to merge 1 commit into
f/sql-harness/dialect-absent-import-assertionfrom
f/sql-harness/singlestore-backend
Draft

[MAINTENANCE] Register SingleStore as a harness backend#12036
joshua-stauffer wants to merge 1 commit into
f/sql-harness/dialect-absent-import-assertionfrom
f/sql-harness/singlestore-backend

Conversation

@joshua-stauffer

Copy link
Copy Markdown
Collaborator

Stacked on #12035 — review the earlier PRs in this series first. This PR shows only its own commit;
GitHub retargets it as its parents merge.

SingleStore was reachable only through a hand-written module that built the generic escape hatch by
hand against a literal connection string. It sat outside everything the harness provides — no
declaration, no registry entry, no tier membership — and was the one-off pattern anyone onboarding
the next backend would have copied.

It is now a declared, registered backend like the others.

Every wiring coordinate already existed

The marker, the requirements file, the task-runner key, the container service and the CI lane are
all pre-existing. This declares against them and edits none of them — pyproject.toml, tasks.py,
the workflow file, reqs/** and assets/docker/** are untouched.

It reaches its datasource through the dialect-agnostic SQL datasource, since no SingleStore-specific
fluent datasource exists and this does not add one. It declares no schema support, a length-carrying
string type taken from core SQLAlchemy rather than from its driver (so the harness still imports
where no driver is installed), and membership of the curated tier only.

This is the first backend in the curated tier

Several assertions added earlier in this series have been comparing an empty list to an empty list
until now. Registering a real curated backend makes them live — in particular the guard that a
registered backend actually reaches its derived list.

That guard now has a real subject rather than a synthetic one, and it bites: moving this backend's
import after the module that builds those lists turns the guard and the new curated pin red
together. That is precisely the silent-drop failure it was written for.

Verification

A batch obtained through the standard parameterization decorator against a live SingleStore 9.1.1
container creates its table, loads the data, and validates. Confirmed from inside the batch rather
than by exit code: the table exists with the declared varchar(255) column type, all four rows are
present verbatim, and a deliberately failing expectation reports the right unexpected count — so the
passing assertions cannot be succeeding against an empty or pre-existing table. Teardown leaves no
tables behind.

The registry module also passes with every SQL driver package made unimportable, confirming this
backend's declaration needs no driver at import.

-m singlestore unchanged at 11 passed (the existing hand-written suite, deliberately left for the
change that ports and retires it). -m project 54 → 55. SQLite 556, PostgreSQL 472, SQL Server 181
all at baseline; tests/integration and tests/metrics collect unchanged.

Mutation-tested: removing the registration, moving the import, flipping the declared tier, rewriting
the pin's literal three ways, and re-decorating the config with a bare @dataclass each turn at
least one test red.

MySQL could not be exercised in this run — its container shares a port with SingleStore's — so its
suite is covered by the earlier PRs in this series and by CI.

ruff clean. mypy adds no diagnostics over an untouched-file baseline.

SingleStore was reachable only through a hand-written module that built the
generic escape hatch by hand against a literal connection string. It therefore
sat outside everything the harness provides - no declaration, no registry entry,
no tier membership - and was the one-off pattern anyone onboarding the next
backend would have copied.

It is now a declared, registered backend like the others. Its record points at
wiring that already existed: the marker, the requirements file, the task-runner
key, the container service, and the CI lane are all pre-existing and unedited.

It reaches its datasource through the dialect-agnostic SQL datasource, because
no SingleStore-specific fluent datasource exists and this does not add one. It
declares no schema support, a length-carrying string type taken from core
SQLAlchemy rather than from its driver, and membership of the curated tier only.

This is also the first backend to populate that tier, which turns several
previously empty-versus-empty assertions into real ones - notably the guard that
a registered backend actually reaches its derived list. Moving this backend's
import after the module that builds those lists now turns that guard and the new
curated pin red together, which is the failure mode the guard exists for and the
first time it has had a real subject rather than a synthetic one.

The hand-written module is deliberately left in place; retiring it belongs with
porting its assertions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant