testcontainers / testcontainers/testcontainers-java

getContainerByServiceName expects an instance name

オープン
#4,281 コメント 1 件 リアクション 4 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Java
スター
8.7k
フォーク
1.9k
平均マージ
2日 17時間
マージ済み PR(30日)
9

説明

#2314 brought support for selecting a container based on the service name when using docker-compose (thanks 🙌 !). However, the value it expects contains the "container number" (e.g. service_1), instead of just the service name, e.g. just service.

This does not match the behaviour of using docker-compose directly:

$ docker-compose ps agent
      Name             Command       State   Ports
--------------------------------------------------
myapp_agent_1   /bin/k3s agent   Up
$ docker-compose ps agent_1
ERROR: No such service: agent_1

According to this test, it looks like the expected behavior, or maybe was incorrectly modeled.

Maybe using getServiceInstanceName from getContainerByServiceName would provide compatibility for both cases?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず getContainerByServiceName と、pull request #2314 で参照されている test を読み、現在の lookup と docker-compose ps service-name の動作を比較します。lookup が service name を一貫して受け付け、意図された instance-name 互換性を維持したうえで、関連する test が更新または追加されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
docker, docker-compose, java
領域
devops, testing
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。