fix(test): unflake test_profile_linear_dag on Windows#18
Merged
Conversation
test_profile_linear_dag flaked on windows-latest because the per-node 10ms sleep is below the ~16ms granularity of Windows' time.monotonic. Nodes occasionally measured duration=0.0 and got excluded from the critical path. Bump the default to 50ms so every sleep crosses at least one timer tick.
uv.lock still pinned the editable dagron at 0.1.0 after #17 bumped pyproject.toml to 0.1.1. Refresh the lockfile so the working tree matches the published version.
GitHub deprecated Node 20 actions; v4 of pnpm/action-setup runs on Node 20. Bump to v6 which uses Node 24 natively. The remaining actions/cache@v4 warning is transitive from actions/setup-node and auto-resolves once @v6 picks up its v6.2+ patch (which already uses @actions/cache v5.0.1). The windows-latest notice is just informing about the May 12 default flip to windows-2025-vs2026.
Drop the v2.9.1 / v3.0.1 patch pins on Swatinem/rust-cache and pre-commit/action — major-only references auto-pick up bug fixes without manual bumps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test_profile_linear_dagflaked onwindows-latestrunners (e.g. PR #17 first attempt). Each node in the linear DAG sleeps for_delayed("a", seconds=0.01)— 10 ms. Windows'time.monotonic()has roughly 16 ms granularity, so a 10 ms sleep can register asduration=0.0, which excludes the node from the profile's critical path. The test then assertslen(report.critical_path) == 3and fails because only 2 nodes were on it.Bump the default sleep in
_delayedfrom 10 ms → 50 ms so every node's measured duration always crosses at least one Windows timer tick.Test plan
uv run pytest tests/python/execution/test_profiling.py -q— all 9 pass locally_delayedis only called bytest_profile_linear_dag, so the increase is bounded to ~120 ms total on this single test