Flaky test: tunnel enabled_tunnel_starts_at_boot fails port_open on Linux CI
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 78/100
Rechercherichtung
Beginne in crates/atlas-cli/tests/tunnel.rs ungefähr bei Zeile 240 und untersuche das Fixture enabled_tunnel_starts_at_boot_with_expected_ssh_args_and_stops_on_exit, lies dann in supervisor.rs spawn_and_wait und ensure_up. Ergänze die fehlschlagende Assertion um tunnel.log und f.invocations(), damit sich beim nächsten Fehler eine Portkollision von einer anderen Ursache unterscheiden lässt. Wenn die Logs eine Kollision bestätigen, gib dem Fixture einen Port, den parallele Tests nicht belegen können; fertig ist die Änderung, wenn der Test unter paralleler Linux-CI zuverlässig besteht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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).
- Vorherrschende Sprache
- Rust
- Sterne
- 3
- Forks
- 1
- Ø Merge
- 9 Std. 51 Min.
- Gemergte PRs (30 T.)
- 310
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus codeatlasdev/atlas
-
type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
codeatlasdev/atlas#597 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: ci type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
codeatlasdev/atlas#596 ·
Maintainer antworten meist innerhalb von 1 Tag
-
os: linux type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
codeatlasdev/atlas#591 ·
Maintainer antworten meist innerhalb von 1 Tag
-
flaky: Windows scripts job hits test timeouts (check-dco, i18n runner/translate, check-changed)Offenarea: ci os: windows type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 56/100
codeatlasdev/atlas#550 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: terminal os: linux type: bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
codeatlasdev/atlas#549 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in codeatlasdev/atlas
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
tinystream-dev/tinystream#132 ·
-
contract good first issue testing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Emmyt24/nova-launch#2436 ·
Maintainer antworten meist innerhalb von 1 Tag