testcontainers / testcontainers/testcontainers-python
Clickhouse container exposing ports setup is strange
オープン
まだ誰も着手していません。
✅ close on merge
📦 package: clickhouse
- 主要言語
- Python
- スター
- 2.3k
- フォーク
- 386
- 平均マージ
- 4時間 40分
- マージ済み PR(30日)
- 1
説明
When we use Clickhouse, we can use 2 kind of ports: 9000 and 8123.
Also different awesome libs work
- with just 9000
- with just 8123
- with both 8123 and 9000 ports
Problem in that: i can use 8123 port or 9000, but can't proper expose it (for example outside port must be 66612) because exposing port seted auto and than no overrided by with_bind_ports(). Also it can be needed to expose 1823 and 9000 together.
ch_container = ClickHouseContainer(image='clickhouse/clickhouse-server:22.6.4', port=8123)
ch_container.with_bind_ports(8123, 66612)
db = ch_container.start() <- started and expose 8123 port to random port 69112 (not 66612)
print(ch.get_connection_url()) <- gives url with port 69112 (not 66612)
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue に記載されている ClickHouseContainer のポート設定と with_bind_ports() の動作を追跡します。ポート 8123、ポート 9000、またはその両方に対する明示的なバインディングが、起動したコンテナと get_connection_url() にどのような影響を与えるかを確認します。要求されたホストポートが使用され、URL が正しくマッピングされたポートを報告すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- clickhouse, docker, python
- 領域
- database
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 40/100