Repository navigation
Conversation
…abytedb, monetdb, mongodb Adds five more dialects to the testcontainers suite, stacked on top of the 7-dialect pilot in feat/testcontainers-nightly-pilot: mariadb, timescaledb, yugabytedb, monetdb, mongodb. mariadb, timescaledb, and yugabytedb are all wire-compatible with an existing base dialect (MySQL and Postgres respectively), so they reuse testcontainers' MySqlContainer/PostgresContainer classes pointed at a different image rather than needing new container-class wiring. yugabytedb specifically cannot reuse PostgresContainer's built-in readiness check, though: that execs `psql`, which the yugabyte image doesn't ship (only its own `ysqlsh`) -- uses a generic DockerContainer instead, started via `yugabyted start` and waiting on its own final startup log line. monetdb has no native testcontainers module; uses a generic DockerContainer with the documented MDB_* environment variables. Publishes an amd64-only image (confirmed running under Rosetta/QEMU emulation on Apple Silicon, unlike CrateDB's harder x86-64-v3 CPU requirement). mongodb needed a different data-setup approach, like elasticsearch before it: documents get inserted via the native pymongo driver, not SQL INSERT, since MongoDB is schemaless and Superset talks to it through pymongosql (a SQL-to-MongoDB translation layer requiring a `?mode=superset` query param). Two real bugs surfaced writing this one: testcontainers' MongoDbContainer.get_connection_url() has no database path or query string at all, so naively appending "&mode=superset" glued directly onto the port number instead of starting a query string; and the root user MongoDbContainer creates lives in the `admin` database, so connecting with a different default database in the URL requires authSource=admin or authentication fails outright. Confirmed pymongosql supports OFFSET (maps to MongoDB's native `skip`), unlike Elasticsearch's SQL layer. mariadb could not be verified locally in this environment: mysqlclient (MySQLdb) has a pre-existing, unrelated native-library linking issue against this machine's Homebrew-installed libmysqlclient. CI installs it via apt on Linux, where this does not occur -- same accepted pattern already used for crate/mssql/db2 in the base branch.
MySqlContainer.get_connection_url() has no host override and defaults to get_container_host_ip(), which returns the literal string "localhost" on native Linux Docker (e.g. GitHub Actions runners). MySQLdb (mysqlclient) treats a "localhost" host specially and attempts a Unix socket connection instead of TCP, which fails since there's no local MySQL socket -- the container is only reachable over the network. Confirmed on a real GHA run: "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'". This was never caught locally because of the separate, unrelated mysqlclient linking issue on this dev machine, which crashed before ever reaching a real connection attempt.
create_all() defaults to checkfirst=True, silently skipping creation (and leaving old rows behind) if the table already exists from a prior run, which collided with the fresh id=0-9 insert on primary key for mariadb.
…t's id column A single-column integer primary key implicitly becomes AUTO_INCREMENT on MySQL/MariaDB. That column type treats an explicit 0 as NULL by default, so inserting id=0 got silently reassigned to 1, colliding with the explicit id=1 row in the same batch insert -- reproduced locally against a real mariadb:11 container and confirmed fixed with autoincrement=False. Supersedes the previous (incorrect) guess that a leftover table from an earlier run was the cause.
… mariadb host, mongodb pagination test, weak type assertions, monetdb readiness, and CI path coverage - drop `db2` from the `testcontainers[...]` extra in development.in/.txt: it transitively pulls `ibm-db-sa`/`ibm-db` into the baseline dev lockfile, which has no Linux arm64 wheel and breaks the multi-platform dev Docker image build; the db2 CI leg already installs it on demand separately. - mariadb: preserve a remote Docker daemon's real host, only rewrite the literal "localhost" case to 127.0.0.1. - testcontainers.yml: widen pull_request paths to superset/db_engine_specs/**, pyproject.toml, and the requirements manifests so a driver/lockfile-only change can't bypass this coverage. - mongodb: use Core `select(...).limit().offset()` instead of a literal SQL string, so the pagination test actually exercises the dialect's own compilation. - monetdb/mongodb/yugabytedb: assert generic_type/sqla_type on the mapped column spec, not just that a spec was returned. - monetdb: wait for the exposed port (not just a log line that predates `monetdbd start -n`) before considering the container ready. - timescaledb: pin the image to a specific tag instead of the mutable `latest-pg16`. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ng global compiler state sqlalchemy-monetdb mutates SQLAlchemy's shared, process-global compiler.OPERATORS mapping in place on import instead of subclassing it (OPERATORS = compiler.OPERATORS; OPERATORS[operators.ne] = " <> "). Once Superset's own get_available_engine_specs() enumerates the "monetdb" sqlalchemy.dialects entry point to build the "available databases" list (which happens on every app boot, not just when MonetDB is actually used), that changes `!=` rendering to `<>` for every dialect for the rest of the process -- breaking test_where_operators identically across the test-mysql/test-postgres/test-sqlite CI jobs, since installing the monetdb extra now pulls sqlalchemy-monetdb into their shared dev requirements. Snapshot/restore sqlalchemy.sql.compiler.OPERATORS around each third-party dialect entry point load so a misbehaving connector can't leak global compiler state just because it was enumerated here. Also fix the new mongodb testcontainers pagination test: pymongosql's SQL-to-Mongo AST parser reads LIMIT/OFFSET off the compiled SQL text ahead of parameter substitution, so a bound `LIMIT ?`/`OFFSET ?` placeholder is silently dropped. Compile with literal_binds=True instead, matching how Superset actually issues chart/SQL Lab queries. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…test text() has no static column metadata of its own -- the row's key comes entirely from whatever pymongosql's DBAPI cursor reports for the raw compiled SQL string, which turned out to be the qualified "pilot_pagination.id" (matching the SELECT list's column reference), not the bare "id" that attribute access expected. Reproduced by compiling the exact statement offline and inspecting text()'s (empty) column metadata; confirmed the AttributeError on real CI runs of this branch and #43640.
…ion test
The previous fix (positional row access) only masked the symptom.
Root cause: SQLAlchemy always qualifies a Table-bound column as
"pilot_pagination.id" once there's a FROM clause, but pymongosql's
projection builder takes that qualified text completely literally as a
MongoDB field path -- {"pilot_pagination.id": 1} reads a *nested* field
under a top-level "pilot_pagination" key, which doesn't exist on these
flat documents, silently projecting None for every row instead of
raising (confirmed via pymongosql/sql/query_handler.py's
_extract_field_and_alias, which uses the raw expression text verbatim
as the Mongo field key regardless of any AS alias).
A bare column()/table() pair (not bound to each other via a real Table
object) compiles to an unqualified "id" reference, which resolves
correctly, while still exercising the dialect's own LIMIT/OFFSET
compilation through a real Core select() -- this test's actual intent.
…se, starrocks Stacked on feat/testcontainers-more-dialects. All four extras already existed in pyproject.toml, so this only wires up tests -- no new optional-dependency groups needed. - postgres/mysql: straight copies of the timescaledb/mariadb pattern respectively, pointed at vanilla images instead of a fork/extension. - clickhouse: connects over the container's HTTP port (8123), matching clickhouse-connect (Superset's driver), not the native TCP port (9000) the container's own docstring example uses. ClickHouse has no real primary-key concept and clickhouse-connect's DDL compiler rejects CREATE TABLE without an explicit engine, so _pagination.py gained an optional extra_table_args hook to pass MergeTree(order_by=...). Also works around a pre-existing quirk in db_engine_specs/clickhouse.py: its module-level type-formatting setup dereferences current_app.config, so importing it outside a Flask app context raises RuntimeError -- tests/unit_tests/db_engine_specs/test_clickhouse.py already works around this with per-test local imports, but that suite also benefits from an autouse app_context fixture this suite doesn't have, so this test pushes one explicitly around the one-time import. - starrocks: no dedicated testcontainers module, so a generic DockerContainer against the official allin1-ubuntu image (FE+BE in one container). Not verified locally (multiple-GB image, skipped to keep local Docker load low per session guidance); the fixture retries its first connection since the query port can accept TCP before StarRocks' query engine is fully initialized.
…tarrocks readiness The FE's query port accepts connections, and can even run metadata statements like CREATE DATABASE, before the BE (execution backend) has registered with it -- an actual CREATE TABLE/INSERT then fails with "Backend node not found. Check if any backend node is down." (confirmed on real CI). Replace the bare CREATE DATABASE readiness check with a throwaway create-table-and-insert probe that exercises the exact operations the tests below need.
A future dialect whose image is too heavy for per-PR CI (a multi-service cluster, a many-GB image, a slow licensed installer) can set nightly_only: true on its matrix entry to run only on the cron or a manual workflow_dispatch, never on pull_request. No existing dialect uses it yet -- this just lays the groundwork for candidates like SAP HANA, Teradata, or Apache Druid.
|
Bito Automatic Review Skipped - Branch Excluded |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
A job-level `if:` can't reference `matrix` at all -- only github/inputs/ needs/vars contexts are available there, confirmed by actionlint and by this exact commit's own CI run failing outright with "This run likely failed because of a workflow file issue" (zero jobs registered). Moves the same condition onto the step that actually runs the tests instead, where matrix access is already used successfully by the existing db2 install step.
|
Yes, you are correct. Because the .github/workflows/testcontainers.yml |
… test step Addresses reviewer feedback: gating on the test step alone still ran checkout/setup/driver-install for a nightly_only leg on every PR. A new compute-matrix job filters those dialects out before the testcontainers matrix is even created. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ebird, ydb, oceanbase, vertica (#43668) Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: hainenber <[email protected]> Signed-off-by: Gabriel Torres Ruiz <[email protected]> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Milad Rashidikhah <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: bucketbase26 <[email protected]> Co-authored-by: Joe Li <[email protected]> Co-authored-by: Viktor Högberg <[email protected]> Co-authored-by: joey <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Chandan P <[email protected]> Co-authored-by: Mafi <[email protected]> Co-authored-by: Matt Fitzgerald <[email protected]> Co-authored-by: Enzo Martellucci <[email protected]> Co-authored-by: Alexandru Soare <[email protected]> Co-authored-by: Mehmet Salih Yavuz <[email protected]> Co-authored-by: Sanmitra Nagaraj <[email protected]> Co-authored-by: Lalith Kothuru <[email protected]> Co-authored-by: shaurya <[email protected]> Co-authored-by: Shaurya <[email protected]> Co-authored-by: Đỗ Trọng Hải <[email protected]> Co-authored-by: rlei <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Gabriel Torres Ruiz <[email protected]> Co-authored-by: hainenber <[email protected]> Co-authored-by: ʈᵃᵢ <[email protected]> Co-authored-by: Mike Bridge <[email protected]> Co-authored-by: Elizabeth Thompson <[email protected]> Co-authored-by: Francesco.Castaldi <[email protected]> Co-authored-by: FrancescoCastaldi <[email protected]> Co-authored-by: Superset Dev <[email protected]> Co-authored-by: Abdul Rehman <[email protected]> Co-authored-by: Sepuri Sai Krishna <[email protected]> Co-authored-by: Mallikarjuna Reddy Nimmakayala <[email protected]> Co-authored-by: PRATHAMESH HUKKERI <[email protected]> Co-authored-by: Prathamesh Hukkeri <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: SBIN2010 <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/testcontainers-nightly-pilot #43662 +/- ##
=====================================================================
+ Coverage 79.18% 79.21% +0.03%
=====================================================================
Files 2879 2885 +6
Lines 165968 166179 +211
Branches 38367 38446 +79
=====================================================================
+ Hits 131420 131645 +225
+ Misses 32065 32051 -14
Partials 2483 2483
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ners-nightly-only-gating # Conflicts: # .github/workflows/testcontainers.yml # requirements/development.in # requirements/development.txt
…43662) Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: hainenber <[email protected]> Signed-off-by: Gabriel Torres Ruiz <[email protected]> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Superset Dev <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Milad Rashidikhah <[email protected]> Co-authored-by: bucketbase26 <[email protected]> Co-authored-by: Joe Li <[email protected]> Co-authored-by: Viktor Högberg <[email protected]> Co-authored-by: joey <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Chandan P <[email protected]> Co-authored-by: Mafi <[email protected]> Co-authored-by: Matt Fitzgerald <[email protected]> Co-authored-by: Enzo Martellucci <[email protected]> Co-authored-by: Alexandru Soare <[email protected]> Co-authored-by: Mehmet Salih Yavuz <[email protected]> Co-authored-by: Sanmitra Nagaraj <[email protected]> Co-authored-by: Lalith Kothuru <[email protected]> Co-authored-by: shaurya <[email protected]> Co-authored-by: Shaurya <[email protected]> Co-authored-by: Đỗ Trọng Hải <[email protected]> Co-authored-by: rlei <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Gabriel Torres Ruiz <[email protected]> Co-authored-by: hainenber <[email protected]> Co-authored-by: ʈᵃᵢ <[email protected]> Co-authored-by: Mike Bridge <[email protected]> Co-authored-by: Elizabeth Thompson <[email protected]> Co-authored-by: Francesco.Castaldi <[email protected]> Co-authored-by: FrancescoCastaldi <[email protected]> Co-authored-by: Abdul Rehman <[email protected]> Co-authored-by: Sepuri Sai Krishna <[email protected]> Co-authored-by: Mallikarjuna Reddy Nimmakayala <[email protected]> Co-authored-by: PRATHAMESH HUKKERI <[email protected]> Co-authored-by: Prathamesh Hukkeri <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: SBIN2010 <[email protected]>
…43662) Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: hainenber <[email protected]> Signed-off-by: Gabriel Torres Ruiz <[email protected]> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Superset Dev <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Milad Rashidikhah <[email protected]> Co-authored-by: bucketbase26 <[email protected]> Co-authored-by: Joe Li <[email protected]> Co-authored-by: Viktor Högberg <[email protected]> Co-authored-by: joey <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Chandan P <[email protected]> Co-authored-by: Mafi <[email protected]> Co-authored-by: Matt Fitzgerald <[email protected]> Co-authored-by: Enzo Martellucci <[email protected]> Co-authored-by: Alexandru Soare <[email protected]> Co-authored-by: Mehmet Salih Yavuz <[email protected]> Co-authored-by: Sanmitra Nagaraj <[email protected]> Co-authored-by: Lalith Kothuru <[email protected]> Co-authored-by: shaurya <[email protected]> Co-authored-by: Shaurya <[email protected]> Co-authored-by: Đỗ Trọng Hải <[email protected]> Co-authored-by: rlei <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Gabriel Torres Ruiz <[email protected]> Co-authored-by: hainenber <[email protected]> Co-authored-by: ʈᵃᵢ <[email protected]> Co-authored-by: Mike Bridge <[email protected]> Co-authored-by: Elizabeth Thompson <[email protected]> Co-authored-by: Francesco.Castaldi <[email protected]> Co-authored-by: FrancescoCastaldi <[email protected]> Co-authored-by: Abdul Rehman <[email protected]> Co-authored-by: Sepuri Sai Krishna <[email protected]> Co-authored-by: Mallikarjuna Reddy Nimmakayala <[email protected]> Co-authored-by: PRATHAMESH HUKKERI <[email protected]> Co-authored-by: Prathamesh Hukkeri <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: SBIN2010 <[email protected]>
…43662) Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: hainenber <[email protected]> Signed-off-by: Gabriel Torres Ruiz <[email protected]> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Superset Dev <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Milad Rashidikhah <[email protected]> Co-authored-by: bucketbase26 <[email protected]> Co-authored-by: Joe Li <[email protected]> Co-authored-by: Viktor Högberg <[email protected]> Co-authored-by: joey <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Chandan P <[email protected]> Co-authored-by: Mafi <[email protected]> Co-authored-by: Matt Fitzgerald <[email protected]> Co-authored-by: Enzo Martellucci <[email protected]> Co-authored-by: Alexandru Soare <[email protected]> Co-authored-by: Mehmet Salih Yavuz <[email protected]> Co-authored-by: Sanmitra Nagaraj <[email protected]> Co-authored-by: Lalith Kothuru <[email protected]> Co-authored-by: shaurya <[email protected]> Co-authored-by: Shaurya <[email protected]> Co-authored-by: Đỗ Trọng Hải <[email protected]> Co-authored-by: rlei <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Gabriel Torres Ruiz <[email protected]> Co-authored-by: hainenber <[email protected]> Co-authored-by: ʈᵃᵢ <[email protected]> Co-authored-by: Mike Bridge <[email protected]> Co-authored-by: Elizabeth Thompson <[email protected]> Co-authored-by: Francesco.Castaldi <[email protected]> Co-authored-by: FrancescoCastaldi <[email protected]> Co-authored-by: Abdul Rehman <[email protected]> Co-authored-by: Sepuri Sai Krishna <[email protected]> Co-authored-by: Mallikarjuna Reddy Nimmakayala <[email protected]> Co-authored-by: PRATHAMESH HUKKERI <[email protected]> Co-authored-by: Prathamesh Hukkeri <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: SBIN2010 <[email protected]>
…43662) Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: hainenber <[email protected]> Signed-off-by: Gabriel Torres Ruiz <[email protected]> Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Superset Dev <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Milad Rashidikhah <[email protected]> Co-authored-by: bucketbase26 <[email protected]> Co-authored-by: Joe Li <[email protected]> Co-authored-by: Viktor Högberg <[email protected]> Co-authored-by: joey <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: Chandan P <[email protected]> Co-authored-by: Mafi <[email protected]> Co-authored-by: Matt Fitzgerald <[email protected]> Co-authored-by: Enzo Martellucci <[email protected]> Co-authored-by: Alexandru Soare <[email protected]> Co-authored-by: Mehmet Salih Yavuz <[email protected]> Co-authored-by: Sanmitra Nagaraj <[email protected]> Co-authored-by: Lalith Kothuru <[email protected]> Co-authored-by: shaurya <[email protected]> Co-authored-by: Shaurya <[email protected]> Co-authored-by: Đỗ Trọng Hải <[email protected]> Co-authored-by: rlei <[email protected]> Co-authored-by: Ville Brofeldt <[email protected]> Co-authored-by: Gabriel Torres Ruiz <[email protected]> Co-authored-by: hainenber <[email protected]> Co-authored-by: ʈᵃᵢ <[email protected]> Co-authored-by: Mike Bridge <[email protected]> Co-authored-by: Elizabeth Thompson <[email protected]> Co-authored-by: Francesco.Castaldi <[email protected]> Co-authored-by: FrancescoCastaldi <[email protected]> Co-authored-by: Abdul Rehman <[email protected]> Co-authored-by: Sepuri Sai Krishna <[email protected]> Co-authored-by: Mallikarjuna Reddy Nimmakayala <[email protected]> Co-authored-by: PRATHAMESH HUKKERI <[email protected]> Co-authored-by: Prathamesh Hukkeri <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: SBIN2010 <[email protected]>
SUMMARY
Stacks on #43652. Pure infrastructure, no dialect changes: adds an opt-out mechanism so a future testcontainers dialect whose image is too heavy for per-PR CI (a multi-service cluster, a many-GB image, a slow licensed installer) can set
nightly_only: trueon its matrix entry and only run on the nightly cron or a manualworkflow_dispatch, never onpull_request.No existing dialect uses the flag yet -- this just lays the groundwork for candidates like SAP HANA, Teradata, or Apache Druid, which came up while surveying testcontainers coverage but are too heavy to add to every PR's CI budget.
The condition (
matrix.nightly_only != true || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') lives at the job level, evaluated per expanded matrix entry -- GitHub Actions resolves the matrix before evaluating a job'sif:, so each matrix combination checks its own value. Omitting the field (the default for every dialect today) evaluates tonull != true, which istrue, so nothing changes for existing dialects.TESTING INSTRUCTIONS
No dialect is currently flagged
nightly_only, so this PR's own CI run should show all 16 existing dialects running exactly as before onpull_request-- confirms the newif:doesn't change current behavior. The skip path itself will be exercised the first time a future PR actually sets the flag on a real dialect.ADDITIONAL INFORMATION