Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New Container: Trino #641

Closed
grieve54706 opened this issue Jul 8, 2024 · 0 comments · Fixed by #642 or #639
Closed

New Container: Trino #641

grieve54706 opened this issue Jul 8, 2024 · 0 comments · Fixed by #642 or #639

Comments

@grieve54706
Copy link
Contributor

grieve54706 commented Jul 8, 2024

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.

alexanderankin pushed a commit that referenced this issue Jul 15, 2024
🤖 I have created a release *beep* *boop*
---


##
[4.7.2](testcontainers-v4.7.1...testcontainers-v4.7.2)
(2024-07-15)


### Bug Fixes

* Add container Trino
([#642](#642))
([49ce5a5](49ce5a5)),
closes
[#641](#641)
* **core:** Improve private registry support (tolerate not implemented
fields in DOCKER_AUTH_CONFIG)
([#647](#647))
([766c382](766c382))
* **kafka:** add a flag to limit to first hostname for use with networks
([#638](#638))
([0ce4fec](0ce4fec)),
closes
[#637](#637)
* **modules:** Mailpit container base API URL helper method
([#643](#643))
([df07586](df07586))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
1 participant