rusackas commented on code in PR #43640:
URL: https://github.com/apache/superset/pull/43640#discussion_r3879540027


##########
requirements/development.in:
##########
@@ -26,4 +26,9 @@
 # including it here breaks the multi-platform (amd64+arm64) dev Docker
 # image build. The testcontainers CI job installs it on demand, only for
 # the db2 matrix leg -- see .github/workflows/testcontainers.yml.
-testcontainers[cockroachdb,cratedb,db2,mssql,oracle,trino]>=4.15.0,<5
+#
+# mariadb/timescaledb/yugabytedb need no testcontainers extra of their own:
+# they reuse the postgres/mysql container classes pointed at a different
+# image, and psycopg2-binary/mysqlclient are already pulled in above via
+# the postgres/mysql extras.
+testcontainers[cockroachdb,cratedb,db2,mongodb,mssql,mysql,oracle,postgres,trino]>=4.15.0,<5

Review Comment:
   Confirmed, dropped `db2` from the `testcontainers[...]` extra: it pulls 
`ibm-db-sa`/`ibm-db` into the baseline lockfile transitively, same arm64 
problem the comment above it warns about. The db2 CI leg already installs it on 
demand.



##########
tests/testcontainers/db_engine_specs/test_timescaledb.py:
##########
@@ -0,0 +1,98 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+"""
+Tests db_engine_specs.timescaledb against a real TimescaleDB instance,
+spun up on demand via testcontainers. Run via
+.github/workflows/testcontainers.yml -- these exercise real SQL execution
+and dialect introspection, which mocked unit tests structurally cannot.
+
+TimescaleDB is a genuine Postgres extension, not a fork: connects via the
+plain "postgresql" dialect with psycopg2, same as vanilla Postgres, just
+pointed at the timescale/timescaledb image instead of postgres:latest.
+"""
+
+from collections.abc import Iterator
+
+import pytest
+from sqlalchemy import (
+    Column,
+    create_engine,
+    inspect,
+    Integer,
+    MetaData,
+    Table as SATable,
+)
+from sqlalchemy.engine import Engine
+
+from superset.db_engine_specs.timescaledb import TimescaleDBEngineSpec
+from superset.sql.parse import Table
+from superset.utils.core import GenericDataType
+
+pytestmark = pytest.mark.testcontainers
+
+from ._driver import require_driver  # noqa: E402
+
+require_driver("testcontainers.community.postgres")
+
+from testcontainers.community.postgres import PostgresContainer  # noqa: E402
+
+from ._pagination import (  # noqa: E402
+    assert_paginated_query_returns_correct_rows_in_order,
+)
+
+
[email protected](scope="module")
+def engine() -> Iterator[Engine]:
+    with PostgresContainer("timescale/timescaledb:latest-pg16") as container:

Review Comment:
   Pinned to `timescale/timescaledb:2.29.2-pg16` instead of `latest-pg16`.



-- 
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]

Reply via email to