Flaky test: tunnel enabled_tunnel_starts_at_boot fails port_open on Linux CI
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず crates/atlas-cli/tests/tunnel.rs の240行目あたりから、fixture enabled_tunnel_starts_at_boot_with_expected_ssh_args_and_stops_on_exit を調べ、次に supervisor.rs の spawn_and_wait と ensure_up を読んでください。失敗する assertion に tunnel.log と f.invocations() を含め、次の失敗時にポートの衝突とそれ以外の原因を区別できるようにしてください。ログで衝突が確認できた場合は、並行テストが使用できないポートを fixture に割り当ててください。並列 Linux CI でテストが安定して成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
atlas-cli::tunnel enabled_tunnel_starts_at_boot_with_expected_ssh_args_and_stops_on_exit failed today on Rust (Linux) in three unrelated PR runs, both attempts each time (nextest retry), always at the same line:
panicked at crates/atlas-cli/tests/tunnel.rs:240:5:
assertion failed: port_open(f.local_port)
Runs: 43915049469 (fix/release-notes-github-limit), 43894385419 (perf/virtualize-large-lists), 43887797630 (feat/yank-list). None of them touch the tunnel code; the full CI of 20b14c8b (main) passed.
What is known:
- The test waits until the status file says the tunnel is
running, then checks the port once (200 ms connect). - The supervisor only reports
Runningafter its own port check succeeds (supervisor.rsspawn_and_wait/ensure_up), so the product does not claim a port it has not seen open. ensure_upalso reportsRunningwithout starting ssh when the port is already accepting connections ("already accepting connections; not starting ssh").common::free_port()binds127.0.0.1:0, drops the listener and returns the port, and nextest runs ~4000 tests in parallel processes.
Hypothesis (not proven): another test's listener briefly held the same port when atlas started, atlas adopted it as "already open" and never ran the fake ssh, then that listener went away before the assertion. If so, f.invocations() is empty in the failing runs, and .logs/tunnel.log holds the "already accepting connections" line.
To close: make the failing assertion print tunnel.log and f.invocations(), which tells the two cases apart on the next failure; if it is the collision, give each fixture a port that no other test can take (hold a listener until the fake ssh is about to bind, or pick from a range outside the ephemeral one).
- 主要言語
- Rust
- スター
- 3
- フォーク
- 1
- 平均マージ
- 9時間 51分
- マージ済み PR(30日)
- 310
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
codeatlasdev/atlas のほかの issue
-
type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
codeatlasdev/atlas#597 ·
メンテナーはふだん 1 日以内に返信
-
area: ci type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
codeatlasdev/atlas#596 ·
メンテナーはふだん 1 日以内に返信
-
os: linux type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
codeatlasdev/atlas#591 ·
メンテナーはふだん 1 日以内に返信
-
flaky: Windows scripts job hits test timeouts (check-dco, i18n runner/translate, check-changed)オープンarea: ci os: windows type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
codeatlasdev/atlas#550 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area: terminal os: linux type: bug
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
codeatlasdev/atlas#549 ·
メンテナーはふだん 1 日以内に返信
codeatlasdev/atlas の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
tinystream-dev/tinystream#132 ·
-
contract good first issue testing
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
Emmyt24/nova-launch#2436 ·
メンテナーはふだん 1 日以内に返信