-
-
Notifications
You must be signed in to change notification settings - Fork 719
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
Refactor gather_dep #6388
Refactor gather_dep #6388
Conversation
8a3d7d9
to
270cb82
Compare
Unit Test Results 15 files + 15 15 suites +15 6h 54m 37s ⏱️ + 6h 54m 37s For more details on these failures and errors, see this check. Results for commit d985e6b. ± Comparison against base commit bde90af. ♻️ This comment has been updated with latest results. |
270cb82
to
d988cbe
Compare
d988cbe
to
43fef59
Compare
43fef59
to
6e7281c
Compare
6e7281c
to
08debe9
Compare
08debe9
to
5246162
Compare
5246162
to
442bf17
Compare
7df31ed
to
d985e6b
Compare
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 15 files + 15 15 suites +15 6h 32m 18s ⏱️ + 6h 32m 18s For more details on these failures, see this check. Results for commit de0adb0. ± Comparison against base commit bde90af. |
7b7024f
to
146467b
Compare
146467b
to
9128b8e
Compare
|
@fjetter Ready for review! |
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.
Overall I'm excited about this, and it seems good to me. I'm excited to see that finally clause gone finally.
else: | ||
refetch.add(ts) | ||
|
||
return merge_recs_instructions( |
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.
Do you think we'll eventually be able to refactor all these merge_recs_instructions
out, or is this here to stay because of the pattern of using the helper functions and ensure_communicating
?
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.
It's here to stay. The alternative would be to pass recommendations, transitions
to the helper functions and let them write back into them.
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 15 files + 15 15 suites +15 6h 27m 52s ⏱️ + 6h 27m 52s For more details on these failures and errors, see this check. Results for commit b31c3fc. ± Comparison against base commit 059798a. ♻️ This comment has been updated with latest results. |
Co-authored-by: Gabe Joseph <gjoseph92@gmail.com>
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.
I do not like us reusing code in the different handlers. I think we can simplify this significantly, see #6544
distributed/worker.py
Outdated
def _refetch_missing_data( | ||
self, worker: str, tasks: Iterable[TaskState], stimulus_id: str | ||
) -> RecsInstrs: |
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.
I strongly dislike the idea of reusing this code. This "helper" already shows signs of too much complexity, we're dealing with many individual ts.state
values to make a decision. If we restrict ourselves to the specialized invocation this should be much less complex.
Reusing code was one of the major reasons why the except/except/finally block caused so many problems.
Particularly with the MissingDataMsg
singal in here (#6445) I do not trust this to be the correct answer for both success-but-missing and network-failure responses, see also #6112 (comment)
distributed/worker.py
Outdated
refetch = set(self._gather_dep_done_common(ev)) | ||
refetch |= {self.tasks[key] for key in self.has_what[ev.worker]} |
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.
I don't think these two sets should be mixed, see my earlier comment about the shared "helper" function.
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.
❤️
ensure_communicating
transitions to new WorkerState event mechanism #5896Changes in transition logic
Simplify transitions both in case of missing keys in a successful response and in case of network failure.
This will slightly delay transitions to missing, but it allows for much cleaner and simpler code.