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

Avoid spurious error log in Adaptive #8887

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

hendrikmakait
Copy link
Member

Due to a timing issue in a synchronous environment, it was possible for Adaptive to log an error (while staying functional) during its startup:

import time
from distributed import LocalCluster

if __name__ == "__main__":
    cluster = LocalCluster()
    for _ in range(100):
        cluster.adapt(minimum=1, maximum=2)
        time.sleep(1)

logs

2024-10-09 07:25:24,947 - tornado.application - ERROR - Exception in callback functools.partial(<bound method Adaptive._start of <distributed.deploy.adaptive.Adaptive object at 0x14e4d56d0>>)
Traceback (most recent call last):
  File "/opt/homebrew/Caskroom/mambaforge/base/envs/dask-distributed/lib/python3.11/site-packages/tornado/ioloop.py", line 750, in _run_callback
    ret = callback()
          ^^^^^^^^^^
  File "/Users/hendrikmakait/projects/dask/distributed/distributed/deploy/adaptive.py", line 177, in _start
    self.minimum,
    ^^^^^^^^^^^^
AttributeError: 'Adaptive' object has no attribute 'minimum'

This PR fixes that.

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

Copy link
Contributor

github-actions bot commented Oct 9, 2024

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

    24 files   -     1      24 suites   - 1   9h 53m 58s ⏱️ - 32m 20s
 4 130 tests ±    0   4 015 ✅ +    2    110 💤 ± 0  5 ❌  - 2 
45 028 runs   - 2 680  42 988 ✅  - 2 617  2 034 💤  - 61  6 ❌  - 2 

For more details on these failures, see this check.

Results for commit 115eb95. ± Comparison against base commit 004fafb.

@phofl phofl merged commit ecee9e8 into dask:main Oct 10, 2024
22 of 31 checks passed
@phofl
Copy link
Collaborator

phofl commented Oct 10, 2024

thx

@hendrikmakait hendrikmakait deleted the avoid-spurious-adaptive-error-log branch October 10, 2024 12:10
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