Skip to content

Deliberately un-pin and upgrade dask/distributed (long-frozen at <2023.0) #393

@wshlavacek

Description

@wshlavacek

Background

pyproject.toml currently caps:

dask>=2021.5.0,<2023.0
distributed>=2021.6.2,<2023.0
tornado>=6.1,<7

We are effectively frozen on dask/distributed ~2022.12.1 — roughly three years behind upstream. This freeze just produced a real bug: #388, where custom_as_completed subclassed as_completed and reimplemented a dask internal method (track_future) by copying its body. dask later renamed that method to _track_future (the tornado→asyncio migration), the override silently became dead code, and errored futures leaked into the run loop as raw (type, exc, traceback) tuples — crashing fits with AttributeError: 'tuple' object has no attribute 'score'.

That specific coupling is now removed (PR for #388 + follow-up cleanup), but the frozen pin itself is unaddressed technical debt. The longer we stay pinned, the larger and riskier the eventual jump (Python-version compatibility, security fixes, and API drift all accumulate).

Why this is its own effort (not part of the #388 fix)

Un-pinning is a substantial, risky change touching the distributed-execution core:

  • The tornado coupling (tornado<7) likely needs to go; modern dask is asyncio-native.
  • as_completed semantics, Client/Future behavior, scatter/gather, and serialization have all evolved across ~10 releases.
  • cluster.py (SSH/paramiko cluster bring-up) and the scheduler/worker lifecycle need revalidation against a current distributed.
  • Needs validation across the cluster/HPC execution paths, not just local runs.

Scope / acceptance criteria

Reference

See #388 for the failure this freeze caused and the post-mortem reasoning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions