https://dagster.io/ logo
Title
j

Josh Lloyd

07/15/2021, 9:08 PM
Trying to test a schedule following the example here, but getting:
dagster.core.errors.DagsterInvalidInvocationError: Schedule decorated function has context argument, but no context argument was provided when invoking.
Here’s the code. I know that
validate_run_config
is currently experimental. So maybe this is just a bug that needs some work.
@schedule(
    pipeline_name="collective_pipeline",
    cron_schedule="0 7 * * *",
    execution_timezone="UTC",
    mode='prod'
)
def coll_daily_schedule():
    return {}


def test_coll_daily_schedule():
    run_config = coll_daily_schedule()
    assert validate_run_config(collective_pipeline, run_config)
1
a

alex

07/15/2021, 9:10 PM
thats a bug - thanks for the report edit: actually just something thats fixed in current version
j

Josh Lloyd

07/15/2021, 9:10 PM
np
c

chris

07/15/2021, 9:12 PM
surprised this wasn't caught under test tho hm
a

alex

07/15/2021, 9:14 PM
what version are you on? not able to repro this actually
j

Josh Lloyd

07/15/2021, 9:15 PM
0.11.15
should I upgrade?
a

alex

07/15/2021, 9:15 PM
I expect it will work if you do
j

Josh Lloyd

07/15/2021, 9:16 PM
k, give me a sec
c

chris

07/15/2021, 9:17 PM
yea schedule-context-optional landed in 0.12.0
👍 1
j

Josh Lloyd

07/15/2021, 9:19 PM
yup, that did the trick. thanks!!