Skip to content

Handle empty MultiProgressWidget shutdown#9271

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

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

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  ± 0      31 suites  ±0   10h 28m 20s ⏱️ - 4m 22s
 4 075 tests + 1   3 969 ✅  -  1    104 💤 ±0  1 ❌ +1  1 🔥 +1 
59 143 runs  +12  56 708 ✅ +10  2 433 💤 ±0  1 ❌ +1  1 🔥 +1 

For more details on these failures and errors, see this check.

Results for commit 3ab7019. ± Comparison against base commit d8fabe2.

♻️ This comment has been updated with latest results.

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