Skip to content

Phase 4 (#1075): Migrate parallel.py + parallel_state.py #1093

@xbrianh

Description

@xbrianh

Part of #1075. Depends on #1092 (Phase 3).

What

parallel.py imports both State and StateData and constructs StateData() instances directly — more than any other stage file.

  • _ParallelExecutor.__init__ currently takes parent_data: StateData. Change to accept parent_state: State (use gremlin.state) and derive the same fields from parent_state.data.*.
  • Remove the two StateData() constructor calls in parallel.py.
  • Replace all state.X with gremlin.state.X in stage bodies.
  • Remove from gremlins.executor.state import State, StateData from parallel.py.
  • parallel_state.py imports StateData and resolve_state_file; audit whether those can be replaced by accessing fields through the Gremlin instance that ParallelStage already holds via self.gremlin.

Files

  • gremlins/stages/parallel.py
  • gremlins/executor/parallel_state.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions