Page MenuHomeElementl

Change ScheduleDefinition.get_execution_data to return a structured namedtuple data class
ClosedPublic

Authored by prha on May 25 2021, 5:56 PM.

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

prha requested review of this revision.May 25 2021, 6:19 PM

@dgibson this will probably break old user code deployments in the same way that https://dagster.phacility.com/D7613 did...

sandyryza added inline comments.
python_modules/dagster/dagster/core/definitions/schedule.py
107

Thoughts on:

class ScheduleExecutionData(NamedTuple):
    run_requests: Optional[List[RunRequest]]
    skip_message", Optional[str]

We lose the checks, but I think those are only important for types that we expect users to instantiate.

This revision is now accepted and ready to land.May 25 2021, 6:27 PM
python_modules/dagster/dagster/core/definitions/schedule.py
107

What's the benefit?

python_modules/dagster/dagster/core/definitions/schedule.py
107

Easier to read and less error-prone to add attributes. 3 lines of code instead of 15 and no duplication of information.

switch to more terse internal namedtuple representation (thanks @sandyryza)