Skip to content
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

Only close scheduler in SpecCluster if it exists #6888

Merged
merged 1 commit into from
Aug 17, 2022

Conversation

mrocklin
Copy link
Member

In failure cases the scheduler may not have been created but close is
still called, providing a traceback like the following:

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.

Closes #xxxx

  • Tests added / passed
  • Passes pre-commit run --all-files

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.
@github-actions
Copy link
Contributor

Unit Test Results

See 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
  3 000 tests ±       0    2 911 ✔️ +     12       88 💤  -   13  1 +1 
22 246 runs  +4 204  21 195 ✔️ +4 077  1 050 💤 +126  1 +1 

For more details on these failures, see this check.

Results for commit 88a6f5e. ± Comparison against base commit 3647cfe.

@fjetter fjetter merged commit 1d0701b into dask:main Aug 17, 2022
gjoseph92 pushed a commit to gjoseph92/distributed that referenced this pull request Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants