rusackas opened a new pull request, #43652: URL: https://github.com/apache/superset/pull/43652
### SUMMARY Stacks on #43640, adding 4 more dialects to the testcontainers-based `db_engine_specs` suite: PostgreSQL, MySQL, ClickHouse, and StarRocks. All four already have `pyproject.toml` extras, so this is purely test wiring, no new optional-dependency groups. PostgreSQL and MySQL are close to copy-paste of the TimescaleDB/MariaDB tests already in this suite, just pointed at vanilla images instead of a fork/extension. ClickHouse and StarRocks each turned up a real wrinkle: ClickHouse has no real primary-key concept, and `clickhouse-connect`'s DDL compiler rejects a bare `CREATE TABLE` without an explicit engine (e.g. `MergeTree(order_by=...)`), so the shared `_pagination.py` helper gained an optional `extra_table_args` hook. It also connects over the container's HTTP port (8123), not the native TCP port (9000) the container's own docstring example uses -- `clickhouse-connect` is Superset's actual driver and only speaks HTTP. Along the way this surfaced 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 gets an app context for free from an autouse fixture this suite doesn't have, so this test pushes one explicitly around the one-time import. StarRocks has no dedicated testcontainers module, so this uses a generic `DockerContainer` against the official `starrocks/allin1-ubuntu` image (FE+BE in one container). Not verified locally in this environment -- it's a multi-GB image and was skipped to keep local Docker load reasonable; CI doesn't have that constraint. The fixture retries its first connection since the query port can accept TCP connections before StarRocks' query engine is fully initialized. Google Datastore was also on the original candidate list but got dropped: it looked trivial from the testcontainers side, but Superset's own `DatastoreEngineSpec` depends on an obscure, single-contributor third-party package (`python-datastore-sqlalchemy`) with no `pyproject.toml` extra defined at all today, and it's unconfirmed whether Superset's connection path respects the emulator's `DATASTORE_EMULATOR_HOST` env var the way the native `google-cloud-datastore` client does. Left for a follow-up once someone traces through that. ### TESTING INSTRUCTIONS CI: `.github/workflows/testcontainers.yml` runs each dialect in its own matrix job (`testcontainers (postgres|mysql|clickhouse|starrocks, 10-15)`). Locally verified (postgres, mysql import path, clickhouse): `pytest -m testcontainers tests/testcontainers/db_engine_specs/test_postgres.py tests/testcontainers/db_engine_specs/test_clickhouse.py`. MySQL couldn't be run locally (mysqlclient has a pre-existing Homebrew linking issue on this machine, same as the MariaDB test); StarRocks wasn't pulled locally per the note above -- both rely on CI for first real verification. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
