Partial review of task streams#9230
Conversation
|
|
||
|
|
||
| @gen_cluster(client=True) | ||
| async def test_no_startstops(c, s, a, b): |
There was a problem hiding this comment.
This is a completely artificial situation. worker_state_machine.TaskFinishedMsg and TaskErredMsg ensure that there are always startstops.
| # Other methods require `kwargs` to have a non-empty list of `startstops` | ||
| return | ||
| if start == "processing" and finish in ("memory", "erred"): | ||
| assert kwargs["startstops"] |
There was a problem hiding this comment.
worker_state_machine.TaskFinishedMsg and TaskErredMsg ensure that there are always startstops.
| left = mid + 1 | ||
| else: | ||
| right = mid | ||
| return left |
There was a problem hiding this comment.
functionally identical to before but marginally faster
| # Smooth over time differences of client vs. workers | ||
| # FIXME this is very crude. We should query TaskStreamPlugin.index instead. | ||
| self.start = time() - 0.1 |
There was a problem hiding this comment.
This is ugly and bug prone. It should be fixed properly by parsing the index but that would be a much more invasive change, so I skipped it.
| self._filename = filename | ||
| self.figure = None | ||
| self.client = client or default_client() | ||
| self.client.get_task_stream(start=0, stop=0) # ensure plugin |
There was a problem hiding this comment.
This was doing nothing in the async client.
|
|
||
| # Smooth over time differences of client vs. workers | ||
| # FIXME this is very crude. We should query TaskStreamPlugin.index instead. | ||
| self.start = time() - 0.1 |
There was a problem hiding this comment.
This was completely missing, making the async context manager broken.
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 31 files ± 0 31 suites ±0 11h 8m 2s ⏱️ - 6m 1s For more details on these failures, see this check. Results for commit 6afdcb1. ± Comparison against base commit f431280. This pull request removes 1 and adds 2 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
Quick and dirty cleanup of the taskstream functionality.
test_get_task_stream_save, which was caused by using the context manager without the 0.1s offset.