-
-
Notifications
You must be signed in to change notification settings - Fork 748
Fix test_balance_expensive_tasks and improve helper functions in test_steal.py
#7253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
test_stealtest_steal.py
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 24 files ±0 24 suites ±0 10h 12m 11s ⏱️ + 20m 57s For more details on these failures, see this check. Results for commit c0a1abb. ± Comparison against base commit 6015a2c. ♻️ This comment has been updated with latest results. |
| config or {}, | ||
| { | ||
| "distributed.scheduler.unknown-task-duration": "1s", | ||
| "distributed.scheduler.default-task-durations": default_task_durations, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this change needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was changed to avoid the reliance on stealing tasks of unknown duration. Instead, we now provide default durations for all relevant tasks. This concern was initially voiced here:
The test implicitly relies on tasks of unknown duration to be stolen (#5572). It should be changed not to rely on this specific use case.
| list(key_split(key[5:])) # Remove "task-" prefix | ||
| for key in w.data.keys() | ||
| if key.startswith("task-") | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain the reasoning behind this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests should now check where the tasks have eventually been executed after stealing took place. This is the behavior we want to test here and relies less on internals as the previous version. The latter relied on checking the scheduler's worker state after stealing but during processing.
Co-authored-by: crusaderky <crusaderky@gmail.com>
|
CI seems to be broken, I'm not sure what's causing this. |
|
I fixed a trivial issue but |
Thanks for fixing the |
|
After |
|
...still investigating after CI keeps failing. |
test_steal.pytest_balance_expensive_tasks and improve helper functions in test_steal.py
This PR improves the helper functions used in a number of
test_balance*tests by simplifying the logic. Inspired by #7250.Might fix
test_balance_multiple_to_replica#7137cc @crusaderky
pre-commit run --all-files