Keep old dependencies on run_spec collision#8512
Conversation
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 27 files ± 0 27 suites ±0 10h 10m 0s ⏱️ - 10m 1s For more details on these failures, see this check. Results for commit cd84237. ± Comparison against base commit 207bbad. This pull request removes 3 and adds 10 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
d95e33a to
4a9c188
Compare
4a9c188 to
8564cda
Compare
|
I'm a little concerned about the case where the tasks are not producing the same output. With this change there is a (very unlikely) chance to produce wrong results, isn't there? |
More or less like it was before. Legend✔️ produces correct output
|
|
Out of scope for this PR: I'm unsure why a task that's already in memory only emits a warning when there are less dependencies than before. |
fjetter
left a comment
There was a problem hiding this comment.
I guess this is the lesser evil 🙈
run_spec#8185While developing #8185, @fjetter and I discussed the option to simply retain the old run_spec in case of key collision. During that conversation, the prevailing opinion was that a hard crash was preferable.
Since then, we realised that a hard crash cannot be implemented as it would break many other use cases impacted by dask/dask#9888, where the run_spec changes and the dependencies are either the same or become a subset of the previous ones. The use cases where dask/dask#9888 causes the cluster crash is when there are added dependencies. So we fell back to just a warning in the scheduler log.
This one-liner PR ensures that, in case of run_spec collision, both run_spec and dependencies remain the same as in the old version (while still printing a warning). This should effectively sweep dask/dask#9888 under the carpet, i.e. whenever two task with different run_spec and possibly different dependencies produce the same output, and just leave the problem of manually crafted keys.