-
Notifications
You must be signed in to change notification settings - Fork 332
Labels
Description
What is the new container you'd like to have?
Trino
Official website: https://trino.io
Github: https://github.com/trinodb/trino
Docker hub: https://hub.docker.com/r/trinodb/trino
Why not just use a generic container for this?
If using DockerContaine("trinodb/trino:latest")
, the get_exposed_port
with @wait_container_is_ready()
will be stuck until 120s timeout.
The Trino docker image does not default expose the port. We need to bind the port explicitly.
And it should check .*======== SERVER STARTED ========.*
and execute a statement to trigger the node register like below.
@wait_container_is_ready()
def _connect(self) -> None:
wait_for_logs(
self,
re.compile(".*======== SERVER STARTED ========.*", re.MULTILINE).search,
c.max_tries,
c.sleep_time,
)
conn = connect(
host=self.get_container_host_ip(),
port=self.get_exposed_port(self.port),
user="test",
)
cur = conn.cursor()
cur.execute("SELECT 1")
cur.fetchall()
conn.close()
Other references:
Follow #152
I already created a TrinoContainer
in project wren-engine. If you agreed, I can add a pull request to implement this issue.