Skip to content

feat(ci): expand testcontainers coverage to databend, risingwave, firebird, ydb, oceanbase, vertica - #43668

Merged
rusackas merged 59 commits into
feat/testcontainers-nightly-only-gatingfrom
feat/testcontainers-batch2-dialects
Aug 30, 2026
Merged

rusackas merged 59 commits into
feat/testcontainers-nightly-only-gatingfrom
feat/testcontainers-batch2-dialects

Conversation

@rusackas

Copy link
Copy Markdown
Member

SUMMARY

Stacks on #43662. Adds 6 more dialects to the testcontainers-based db_engine_specs suite, 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 in pyproject.toml, so this is purely test wiring.

oceanbase and vertica run nightly_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/ydb run on every PR like the rest of this suite.

Real quirks found along the way:

  • 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 treatment as db2's ibm-db-sa) and installed on demand with --no-deps for just its own CI leg -- it never actually imports sqlalchemy_utils itself, so the version mismatch is inert at runtime.
  • RisingWave's storage engine checkpoints asynchronously: a SELECT immediately after INSERT can see zero rows without an explicit FLUSH (confirmed against a real instance). Uses the shared _pagination.py helper's after_insert hook, originally added for CrateDB, to handle this.
  • sqlalchemy-firebird's driver is a pure-Python ctypes wrapper (its wheel is py3-none-any, 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, only for the firebird leg.
  • YDB needed three real fixes to make a generic DockerContainer usable 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 advertising localhost as the container's own hostname; (2) the gRPC port opens before storage pools finish initializing, so the fixture retries a real metadata.create_all() probe rather than trusting the open port; (3) YDB rejects DDL inside an explicit transaction, which only affects a raw text("CREATE TABLE..."), not metadata.create_all()'s own DDL execution path.
  • Small side finding, not acted on here: FirebirdEngineSpec sets limit_method = LimitMethod.FETCH_MANY with a comment claiming Firebird "uses FIRST to limit" -- stale relative to the modern driver, which compiles real ROWS-based pagination correctly. Noted in the test docstring as a possible follow-up.

TESTING INSTRUCTIONS

CI: .github/workflows/testcontainers.yml runs each per-PR dialect in its own matrix job; oceanbase/vertica only run on the nightly cron or a manual workflow_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-driver needs a native client library with no macOS install path here); CI's libfbclient2 system 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 manual workflow_dispatch run for first real verification, matching the nightly_only gating.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@bito-code-review

bito-code-review Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Bito Automatic Review Skipped - Branch Excluded

Bito didn't auto-review because the source or target branch is excluded from automatic reviews.
No action is needed if you didn't intend for the agent to review it. Otherwise, to manually trigger a review, type /review in a comment and save.
You can change the branch exclusion settings here, or contact your Bito workspace admin at [email protected].

@github-actions github-actions Bot added github_actions Pull requests that update GitHub Actions code dependencies:python preset-io labels Aug 29, 2026
@netlify

netlify Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit c3294ce
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a931293ca12fe000855dce6
😎 Deploy Preview https://deploy-preview-43668--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.00781% with 87 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (feat/testcontainers-nightly-only-gating@76417f3). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ugin-chart-echarts/src/Butterfly/transformProps.ts 67.85% 18 Missing ⚠️
...s/plugin-chart-echarts/src/Butterfly/Butterfly.tsx 0.00% 10 Missing ⚠️
superset/explore/form_data/api.py 11.11% 8 Missing ⚠️
...l/AdhocFilterEditPopoverSimpleTabContent/index.tsx 88.52% 7 Missing ⚠️
superset/commands/dataset/export.py 57.14% 4 Missing and 2 partials ⚠️
superset/commands/query/export.py 50.00% 3 Missing and 3 partials ⚠️
superset/versioning/api_helpers.py 66.66% 4 Missing and 2 partials ⚠️
superset-frontend/src/pages/DatasetList/index.tsx 20.00% 4 Missing ⚠️
...d/src/explore/components/PropertiesModal/index.tsx 81.25% 3 Missing ⚠️
...rc/components/Datasource/DatasourceModal/index.tsx 94.28% 2 Missing ⚠️
... and 13 more
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           
Flag Coverage Δ
hive 37.91% <18.40%> (?)
javascript 74.68% <83.27%> (?)
mysql 57.64% <48.25%> (?)
postgres 57.67% <48.25%> (?)
presto 39.82% <18.40%> (?)
python 83.75% <81.09%> (?)
sqlite 57.37% <48.25%> (?)
unit 73.99% <71.14%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rusackas
rusackas force-pushed the feat/testcontainers-batch2-dialects branch from b52e698 to 05e8d24 Compare August 29, 2026 01:36
Comment thread .github/workflows/testcontainers.yml Resolved
@bito-code-review

Copy link
Copy Markdown
Contributor

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 nightly_only flag is defined in the matrix but cannot be referenced directly in a job-level if condition, the install step should be updated to check the matrix variable explicitly, similar to how the test step handles it.

.github/workflows/testcontainers.yml

- name: Install oceanbase driver (oceanbase_py)
        if: matrix.dialect == 'oceanbase' && (github.event_name != 'pull_request' || matrix.nightly_only != true)
        run: uv pip install --system --no-deps "oceanbase_py>=0.0.1.2"

@rusackas
rusackas force-pushed the feat/testcontainers-batch2-dialects branch from 0fbf939 to c3294ce Compare August 29, 2026 17:10
@github-actions github-actions Bot added risk:db-migration PRs that require a DB migration size/XL api Related to the REST API labels Aug 29, 2026
dependabot Bot and others added 26 commits August 29, 2026 14:41
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]>
…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>
…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]>
@rusackas
rusackas force-pushed the feat/testcontainers-batch2-dialects branch from c3294ce to ec7cda9 Compare August 29, 2026 21:47
@rusackas
rusackas merged commit 47ba1c3 into feat/testcontainers-nightly-only-gating Aug 30, 2026
98 checks passed
@rusackas
rusackas deleted the feat/testcontainers-batch2-dialects branch August 30, 2026 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the REST API data:connect:databend data:connect:oceanbase data:connect:vertica Related to Vertica dependencies:npm dependencies:python doc Namespace | Anything related to documentation embedded github_actions Pull requests that update GitHub Actions code packages plugins preset-io risk:db-migration PRs that require a DB migration size/XXL

Projects

None yet

Development

Successfully merging this pull request may close these issues.