Skip to content

Handle empty MultiProgressWidget shutdown#9271

Open
peter941221 wants to merge 2 commits into
dask:mainfrom
peter941221:fix/issue-3007-empty-multiprogress-widget
Open

Handle empty MultiProgressWidget shutdown#9271
peter941221 wants to merge 2 commits into
dask:mainfrom
peter941221:fix/issue-3007-empty-multiprogress-widget

Conversation

@peter941221
Copy link
Copy Markdown
Contributor

Closes #3007

MultiProgressWidget only initialized �lapsed_time inside make_widget(). When progress tracking finished without ever creating any bars, _draw_stop() could still run and access self.elapsed_time, raising AttributeError.

This change initializes �lapsed_time during widget construction so shutdown paths stay safe even when there are no task groups to render.

It also adds a focused regression test covering the empty-keys shutdown path.

Validation:

  • python -m py_compile distributed/diagnostics/progressbar.py distributed/diagnostics/tests/test_progress_widgets.py
  • python -m black --check distributed/diagnostics/progressbar.py distributed/diagnostics/tests/test_progress_widgets.py
  • Local pytest could not run in this environment because dask is not installed and pytest fails during initial config import

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

Unit Test Results

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

    31 files  +    1      31 suites  +1   10h 36m 51s ⏱️ +26s
 4 081 tests +    1   3 969 ✅ +    5    112 💤  -  1  0 ❌  - 2 
59 230 runs  +1 410  56 628 ✅ +1 347  2 602 💤 +66  0 ❌  - 2 

Results for commit 28cd49f. ± Comparison against base commit c9ef602.

♻️ This comment has been updated with latest results.

@peter941221 peter941221 marked this pull request as ready for review May 29, 2026 10:17
@peter941221 peter941221 force-pushed the fix/issue-3007-empty-multiprogress-widget branch from 3ab7019 to 28cd49f Compare June 1, 2026 22:55
@peter941221
Copy link
Copy Markdown
Contributor Author

Rebased on current main and pushed 28cd49f. CI is running again.

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.

AttributeError: 'MultiProgressWidget' object has no attribute 'elapsed_time'

1 participant