Repository navigation
feat(ci): expand testcontainers coverage to databend, risingwave, firebird, ydb, oceanbase, vertica - #43668
Conversation
|
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. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/testcontainers-nightly-only-gating #43668 +/- ##
==========================================================================
Coverage ? 79.21%
==========================================================================
Files ? 2885
Lines ? 166178
Branches ? 38446
==========================================================================
Hits ? 131644
Misses ? 32051
Partials ? 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:
|
b52e698 to
05e8d24
Compare
|
Yes, the OceanBase install step should include the same gate as the test step to prevent PR failures when the package is unavailable. Since the .github/workflows/testcontainers.yml |
0fbf939 to
c3294ce
Compare
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Evan Rusackas <[email protected]> Co-authored-by: Superset Dev <[email protected]>
…tes (#43447) Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: hainenber <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: hainenber <[email protected]>
…al (#42809) (#42976) Co-authored-by: Evan Rusackas <[email protected]> Co-authored-by: Claude Opus 4.7 <[email protected]>
…#42438) Co-authored-by: Prathamesh Hukkeri <[email protected]>
…end (#43677) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…7 in /superset-frontend (#43676) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…43675) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
… /docs (#43673) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…cket (#43670) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <[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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Superset Dev <[email protected]>
…oS in cypress-base (#43664)
…ebird, ydb, oceanbase, vertica
Stacked on feat/testcontainers-nightly-only-gating. All six extras already
existed in pyproject.toml. oceanbase and vertica run nightly_only: true
(heavy first-boot and a ~12GB RAM floor, respectively), so they don't run
per-PR; databend/risingwave/firebird/ydb run on every PR like the rest of
this suite.
- oceanbase_py pins sqlalchemy-utils<0.39, which conflicts outright with
Superset's own sqlalchemy-utils==0.42.1 pin -- kept out of the baseline
dev install (same reason as db2's ibm-db-sa) and installed on demand,
--no-deps, only for its own CI leg (it never actually imports
sqlalchemy_utils itself, so the version mismatch is inert at runtime).
- databend: connects to the local standalone image's builtin `root` user
(no password) with sslmode=disable, since Superset's default
encryption_parameters assume TLS the local image doesn't have.
- risingwave: RisingWave's storage engine checkpoints asynchronously --
a SELECT immediately after INSERT can see zero rows without an explicit
FLUSH (confirmed on a real instance). Uses the shared _pagination.py
helper's after_insert hook (originally added for CrateDB) to do that.
- firebird: sqlalchemy-firebird's driver is a pure-Python ctypes wrapper
(py3-none-any wheel, confirmed by downloading it directly) that
dynamically loads the native libfbclient from the host rather than
bundling it -- CI installs that system package on demand. Also confirms
in the test docstring that FirebirdEngineSpec's `limit_method =
LimitMethod.FETCH_MANY` (comment: "uses FIRST to limit") is stale
against the modern driver, which compiles real ROWS-based pagination.
- ydb: needed three real fixes to make a generic DockerContainer usable
at all. (1) YDB's gRPC client does endpoint discovery and reconnects to
whatever the server reports, which by default is the container's own
internal Docker hostname -- fixed by binding the same port on the host
as inside the container and advertising "localhost" as the container's
own hostname, so the discovered endpoint is actually reachable. (2) The
gRPC port opens before storage pools are fully initialized, so an early
CREATE TABLE fails; the fixture retries a real metadata.create_all()
probe rather than trusting the open port. (3) YDB rejects DDL inside an
explicit transaction ("Scheme operations cannot be executed inside
transaction") -- confirmed this only affects a raw text("CREATE
TABLE..."), not metadata.create_all()'s own DDL execution path, which
already does the right thing.
… tears down Both tests passed on CI, but the job still failed: firebird-driver registers its own atexit handler that talks to the Firebird subsystem to shut it down cleanly, and it fired after the container was already gone, segfaulting (exit code 139) rather than raising a catchable error. Disposing the engine while the server is still up lets the driver close out normally, so the later atexit call has nothing left to talk to.
The oceanbase driver install step reported success but never actually installed oceanbase_py: --no-deps applied to `-e .[oceanbase]` blocks pip from installing anything the extras marker pulls in, including oceanbase_py itself, not just its conflicting transitive dependency. Installing oceanbase_py as its own standalone package instead means --no-deps only skips *its* dependencies, which is what was actually intended. Confirmed via a manual workflow_dispatch run (nightly_only dialects don't run on pull_request, so this needed a manual trigger to catch at all). Vertica dropped from this PR: the same workflow_dispatch run found `vertica/vertica-ce` doesn't exist on Docker Hub. The only actively maintained official image (`opentext/vertica-k8s`) is built to run under the Vertica Kubernetes operator's orchestration, not as a standalone single-container database -- a bare `docker run` likely won't bootstrap a working instance on its own. Needs real investigation before it's worth another attempt, same as Solr/IoTDB/TDengine/Parseable/Dremio earlier in this series.
oceanbase_py's has_table() -- called by create_all()'s default checkfirst=True before creating each table -- passes a raw string straight to Connection.execute(), which SQLAlchemy 2.0 rejects outright (ObjectNotExecutableError, confirmed on real CI). Added an optional checkfirst override to the shared _pagination.py helper and used it here; safe to skip the existence check since each test gets a genuinely fresh container.
…skipping checkfirst checkfirst=False only sidestepped create_all()'s own call to has_table(); Inspector.get_columns() (used by OceanBaseEngineSpec.get_columns(), which the second test needs to actually exercise) calls the same broken has_table() internally and hit the identical ObjectNotExecutableError (confirmed on real CI). Every other raw-SQL method in the same dialect module correctly uses connection.exec_driver_sql(...) -- this looks like an isolated oversight in just has_table(), not a deliberate design choice, so this monkeypatches it to do the same thing the rest of the dialect already does, fixing the root cause for both call sites instead of routing around one of them.
…ypatch
Confirmed on real CI: even with exec_driver_sql fixing the SQLAlchemy 2.0
incompatibility, has_table() still failed -- DESCRIBE on a nonexistent
table raises 1146 ("table doesn't exist") rather than returning an empty
result set, and the original method never catches that at all. It can
only ever return True; checking for a table that doesn't exist (exactly
what create_all()'s checkfirst does first) raised instead of returning
False. Catches the error and returns False, same as any other dialect's
has_table() would.
Fixing has_table() alone wasn't enough: get_columns() -- the actual column-introspection call OceanBaseEngineSpec.get_columns() needs, and what this test's second half exercises -- has the identical connection.execute(raw string) bug, confirmed on real CI as the same ObjectNotExecutableError. Patched the same way, reusing has_table() correctly since self.has_table already resolves to the earlier patch.
The install step ran on every pull_request regardless of nightly_only, so a PR could fail if the unpinned oceanbase_py package became unavailable even though the test step itself was skipped. Co-Authored-By: Claude Opus 4.8 <[email protected]>
c3294ce to
ec7cda9
Compare
47ba1c3
into
feat/testcontainers-nightly-only-gating
SUMMARY
Stacks on #43662. Adds 6 more dialects to the testcontainers-based
db_engine_specssuite, selected from a research pass over ~11 candidates (Solr, IoTDB, TDengine, Parseable, and Dremio were dropped -- each needs a schema-bypass test design or deeper investigation, not a quick win). All six extras already existed inpyproject.toml, so this is purely test wiring.oceanbaseandverticarunnightly_only: true(the gating mechanism added in #43662): OceanBase bootstraps a distributed-style cluster even in single-node mode, and Vertica Community Edition has a well-documented ~12GB RAM floor to even start.databend/risingwave/firebird/ydbrun on every PR like the rest of this suite.Real quirks found along the way:
oceanbase_pypinssqlalchemy-utils<0.39, which conflicts outright with Superset's ownsqlalchemy-utils==0.42.1pin. Kept out of the baseline dev install (same treatment asdb2'sibm-db-sa) and installed on demand with--no-depsfor just its own CI leg -- it never actually importssqlalchemy_utilsitself, so the version mismatch is inert at runtime.SELECTimmediately afterINSERTcan see zero rows without an explicitFLUSH(confirmed against a real instance). Uses the shared_pagination.pyhelper'safter_inserthook, originally added for CrateDB, to handle this.sqlalchemy-firebird's driver is a pure-Python ctypes wrapper (its wheel ispy3-none-any, confirmed by downloading it directly) that dynamically loads the nativelibfbclientfrom the host rather than bundling it -- CI installs that system package on demand, only for the firebird leg.DockerContainerusable at all: (1) its gRPC client does endpoint discovery and reconnects to whatever the server reports, which by default is the container's own internal Docker hostname -- fixed by binding the same port on host and container and advertisinglocalhostas the container's own hostname; (2) the gRPC port opens before storage pools finish initializing, so the fixture retries a realmetadata.create_all()probe rather than trusting the open port; (3) YDB rejects DDL inside an explicit transaction, which only affects a rawtext("CREATE TABLE..."), notmetadata.create_all()'s own DDL execution path.FirebirdEngineSpecsetslimit_method = LimitMethod.FETCH_MANYwith a comment claiming Firebird "uses FIRST to limit" -- stale relative to the modern driver, which compiles realROWS-based pagination correctly. Noted in the test docstring as a possible follow-up.TESTING INSTRUCTIONS
CI:
.github/workflows/testcontainers.ymlruns each per-PR dialect in its own matrix job;oceanbase/verticaonly run on the nightly cron or a manualworkflow_dispatch.Locally verified (databend, risingwave, ydb -- each iterated against a real container until green):
pytest -m testcontainers tests/testcontainers/db_engine_specs/test_databend.py tests/testcontainers/db_engine_specs/test_risingwave.py tests/testcontainers/db_engine_specs/test_ydb.py. Firebird's DDL/pagination compilation was verified offline (no live connection possible on this machine --firebird-driverneeds a native client library with no macOS install path here); CI'slibfbclient2system package install gives it a real client library to actually connect. OceanBase and Vertica weren't pulled locally at all given their heavier resource footprint -- both rely on a manualworkflow_dispatchrun for first real verification, matching thenightly_onlygating.ADDITIONAL INFORMATION