Skip to content

Remove unused DatasetStatus.PENDING and DatasetStatus.STALE #1801

@ilongin

Description

@ilongin

Two values in DatasetStatus are defined but never written by any code in the repo:

  • PENDING = 2 (src/datachain/dataset.py:263)
  • STALE = 6 (src/datachain/dataset.py:266)

Grep shows only reads:

PENDING - appeared in a defensive guard list at catalog.complete_dataset_version ([CREATED, PENDING]) and in the wipe-routing list in catalog.remove_dataset_version. Both removed in the soft-delete PR.

STALE - read in:

  • DatasetVersion.is_final_status() (dataset.py)
  • get_dataset_versions_to_clean() cleanup query (metastore.py)
  • catalog.remove_dataset_version routing (removed in the soft-delete PR)

No production code sets either status. Dead branches in the state machine.

Tasks

  • Confirm no setter exists for either status
  • Remove PENDING and STALE from the DatasetStatus enum
  • Remove dead read paths that reference them
  • Update docstrings / status table to drop them

Metadata

Metadata

Assignees

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