Martijn Visser created FLINK-40733:
--------------------------------------
Summary: Trino tests are disabled, so the Trino dialect has no
test coverage
Key: FLINK-40733
URL: https://issues.apache.org/jira/browse/FLINK-40733
Project: Flink
Issue Type: Technical Debt
Components: Connectors / JDBC
Reporter: Martijn Visser
{{TrinoDialectTest}}, {{TrinoDynamicTableSourceITCase}} and
{{TrinoDynamicTableSinkITCase}} all carry {{@Disabled("Not working on jenkins
as container not start.")}}, added in FLINK-35366 in May 2024. Nothing has
exercised {{TrinoDialect}} against a running Trino since. Only
{{TrinoPreparedStatementTest}} runs, and it never opens a connection.
Removing the three annotations was tried on the FLINK-40729 branch. The tests
pass locally but the container does not start on a GitHub Actions runner:
{code}
ContainerLaunchException: Container startup failed for image trinodb/trino:483
Caused by: IllegalStateException: Wait strategy failed. Container exited with
code 100
Caused by: IllegalStateException: Container is started, but cannot be accessed
by
(JDBC URL: jdbc:trino://localhost:32845/postgres/public)
{code}
https://github.com/apache/flink-connector-jdbc/actions/runs/35604935995/job/106349603601
Exit code 100 is how Trino reports that it could not load a catalog. A likely
cause is the catalog file {{TrinoDatabase}} builds: {{Files.createTempFile}}
creates it {{0600}} owned by the build user, and it is bind mounted to
{{/etc/trino/catalog/postgres.properties}}, where the image reads it as {{uid
1000 (trino)}}. Docker Desktop on macOS hides host ownership, which is why it
passes there and fails on Linux. Worth trying a {{chmod}} to {{0644}} on that
temp file first, though that is a hypothesis and the container log on the
runner should confirm it before anything is changed.
The two method level exclusions in {{TrinoDynamicTableSinkITCase}} are
unrelated and should stay; Trino cannot create a table with a primary key.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)