Skip to content

Fix vaious test flakiness on Windows#21220

Open
ilevkivskyi wants to merge 16 commits intopython:masterfrom
ilevkivskyi:win-debug
Open

Fix vaious test flakiness on Windows#21220
ilevkivskyi wants to merge 16 commits intopython:masterfrom
ilevkivskyi:win-debug

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

@ilevkivskyi ilevkivskyi commented Apr 14, 2026

It looks like there were two sources of flakes:

  • In rare cases workers could connect to DB soon, before coordinator configured WAL. I fix this by starting workers after creating metastore. We will probably loose ~5-10ms on this, but I think it is worth it.
  • Windows is generally very slow with processes, startup/shutdown sometimes take few seconds. I therefore triple relevant timeouts on Windows.

In addition:

  • Handle more parallel workers startup failure scenarios ~gracefully.
  • Add a unique build ID to worker status files.
  • Add a bit more info in case of a failure.
  • Fix one test with unstable error message order.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@ilevkivskyi
Copy link
Copy Markdown
Member Author

OK, everything points to last flake is caused by Windows being actually slow with processes. Here for example https://github.com/python/mypy/actions/runs/24413561303/job/71326664884?pr=21220#logs the workers didn't print anything for ~3 seconds. I am going to simply scale up all process-related timeouts 3x on Windows.

@ilevkivskyi ilevkivskyi changed the title [WIP] Debug startup errors on Windows Debug startup errors on Windows Apr 14, 2026
@ilevkivskyi ilevkivskyi changed the title Debug startup errors on Windows Fix vaious test flakiness on Windows Apr 14, 2026
@ilevkivskyi
Copy link
Copy Markdown
Member Author

@JukkaL I think this should fix the rest of the test flakiness.

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant