Only close scheduler in SpecCluster if it exists#6888
Merged
Conversation
In failure cases the scheduler may not have been created but close is
still called, providing a traceback like the following:
```python-traceback
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mrocklin/workspace/distributed/distributed/deploy/spec.py", line 275, in __init__
self.sync(self._start)
File "/home/mrocklin/workspace/distributed/distributed/utils.py", line 338, in sync
return sync(
File "/home/mrocklin/workspace/distributed/distributed/utils.py", line 405, in sync
raise exc.with_traceback(tb)
File "/home/mrocklin/workspace/distributed/distributed/utils.py", line 378, in f
result = yield future
File "/home/mrocklin/mambaforge/lib/python3.9/site-packages/tornado/gen.py", line 762, in run
value = future.result()
File "/home/mrocklin/workspace/distributed/distributed/deploy/spec.py", line 318, in _start
await self._close()
File "/home/mrocklin/workspace/distributed/distributed/deploy/spec.py", line 434, in _close
await self.scheduler.close()
AttributeError: 'NoneType' object has no attribute 'close'
```
This wasn't really an issue (things were already broken) but makes
tracking down the real issue more of a pain.
Contributor
Unit Test ResultsSee test report for an extended history of previous test failures. This is useful for diagnosing flaky tests. 15 files + 3 15 suites +3 6h 24m 14s ⏱️ + 1h 25m 38s For more details on these failures, see this check. Results for commit 88a6f5e. ± Comparison against base commit 3647cfe. |
fjetter
approved these changes
Aug 17, 2022
gjoseph92
pushed a commit
to gjoseph92/distributed
that referenced
this pull request
Oct 31, 2022
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.
In failure cases the scheduler may not have been created but close is
still called, providing a traceback like the following:
This wasn't really an issue (things were already broken) but makes
tracking down the real issue more of a pain.
Closes #xxxx
pre-commit run --all-files