testcontainers-python icon indicating copy to clipboard operation
testcontainers-python copied to clipboard

Enable using clickhouse HTTP interface

Open pofl opened this issue 2 years ago • 7 comments

ClickHouse provides both a TCP connection interface and a HTTP API. The existing implementation of the CH testcontainer was solely based on the TCP interface. However, the HTTP interface is the recommended interface to use. The official clickhouse Python client library uses the HTTP interface.

IMO the Clickhouse testcontainer should expose the HTTP interface by default. However, that would be a breaking change, so I implement the change as optional. Let me know what you think.

It's also worth considering adding a new Testcontainer class class ClickHouseHTTPContainer(DbContainer): Instead of accepting this PR.

pofl avatar Mar 12 '23 11:03 pofl

@yakimka @pffijt I hope I'm not annoying but is there anything blocking review of this PR?

pofl avatar Mar 22 '23 16:03 pofl

@yakimka @pffijt I hope I'm not annoying but is there anything blocking review of this PR?

No, you aren't annoying. We really appreciate pull-requests from the community but you should understand we try to maintain this repo besides our full-time jobs and private life. So that is why there are some delays.

pffijt avatar Mar 24 '23 10:03 pffijt

I think it is fine to keep everything related to Clickhouse inside one Container class.

pffijt avatar Mar 24 '23 10:03 pffijt

I'm happy with the PR too. Feel free to merge, as I can't. Thanks for reviewing ❤️

pofl avatar Mar 28 '23 09:03 pofl

Thanks for the update. Would you be able to rebase on master so we can integrate the changes from #296?

tillahoffmann avatar Apr 11 '23 21:04 tillahoffmann

@tillahoffmann @pffijt From my perspective this PR is done. Feel free to rerun the CI and merge on success (I can do neither of these things) 👍

Btw, while merging in master I stumbled across this issue: https://github.com/testcontainers/testcontainers-python/issues/335

pofl avatar Apr 13 '23 12:04 pofl

I just merged in master once more.

pofl avatar Apr 13 '23 13:04 pofl