testcontainers / testcontainers/testcontainers-python
Bug: Running `.exec` on `SqlServerContainer` instance hangs indefinitely
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 2.3k
- フォーク
- 386
- 平均マージ
- 4時間 40分
- マージ済み PR(30日)
- 1
説明
Describe the bug
I am trying to create a table within a SqlServer container during start up. I am running the necessary command via the exec method, but said method just hangs and never exits.
Additional info: When bashing into the container and running the command, it works just fine and the process does not hang. Furthermore, running a different SQL query via the exec method such as SELECT 1 works as well.
To Reproduce
with SqlServerContainer(image="mcr.microsoft.com/mssql/server:2022-CU12-ubuntu-22.04") as container:
container.exec(
"/opt/mssql-tools/bin/sqlcmd -U SA -P 1Secure*Password1 -d tempdb -Q 'CREATE TABLE test_table (id INT PRIMARY KEY)'"
)
Runtime environment
OS: Windows 11
Python version: 3.12.10
Docker version: 28.4.0, build d8eb465
Testcontainers version: 4.13.2
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
SqlServerContainer の exec エントリポイントから開始し、issue にある正確な sqlcmd CREATE TABLE コマンドを再現して、動作する SELECT 1 の例と比較します。CREATE TABLE コマンドが、コンテナ内で実行した場合と同様に、exec を通じて正常に終了すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- docker, python, sql
- 領域
- databases, devops
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100