testcontainers / testcontainers/testcontainers-java

`FAIL_FAST_ALWAYS` for selection of `DockerClientProviderStrategy` not reset in flaky environments when tests are retried

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

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

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

説明

Hello team!
Please provide ability to disable FAIL_FAST_ALWAYS usage for the selection of DockerClientProviderStrategy located here: https://github.com/testcontainers/testcontainers-java/blob/abf18468c2b3c8ec395f07fe91cd3afd449e28d2/core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java#L55

Our use case:

  • We have big mono repo which periodically execute "test all" kind of job
  • This job running gradle tests in parallel (via gradle settings) and a lot of projects using test containers to perform various tests
  • Possibly due to the high usage of docker (this part hard to investigate well for me) sometimes test containers will not be able to find docker environment even though it's present and will set flag FAIL_FAST_ALWAYS
  • As we use following plugin https://github.com/gradle/test-retry-gradle-plugin that retry tests as part of the same task I assume that initialized static field is not reset when it retry failed tests. So this plugin trying to retry test from the same task for test that uses test containers and it will fail due to FAIL_FAST_ALWAYS flag be set

Having ability to disable this flag on demand or being able to forcibly configure retries even if that flag is set would be helpful in our situation

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

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

はじめの一歩

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

調査の方向性

core/src/main/java/org/testcontainers/dockerclient/DockerClientProviderStrategy.java の 55 行目付近から始め、Docker 環境の選択中に FAIL_FAST_ALWAYS がどのように設定され、チェックされるかを追跡します。Gradle test-retry-gradle-plugin を使ってリトライのシナリオを再現します。呼び出し側がフラグを無効化するかリトライを強制でき、通常の fail-fast の動作を壊さないことが完了条件です。

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

評価

技術スタック
docker, java
領域
devops, testing-qa
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

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

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