Charlie Bini
04/06/2023, 7:38 PMrun_request_for_partition
is deprecated, so I switched to yielding a RunRequest
but now I get this:
dagster._core.errors.DagsterInvariantViolationError: Attempted to access repository_def, but no repository_def was provided.
File "/usr/local/lib/python3.10/site-packages/dagster/_grpc/impl.py", line 329, in get_external_schedule_execution
return schedule_def.evaluate_tick(schedule_context)
File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/schedule_definition.py", line 774, in evaluate_tick
if context.repository_def is None:
File "/usr/local/lib/python3.10/site-packages/dagster/_core/definitions/schedule_definition.py", line 305, in repository_def
raise DagsterInvariantViolationError(
sandy
04/06/2023, 8:50 PMclaire
04/06/2023, 8:50 PMCharlie Bini
04/06/2023, 8:54 PMclaire
04/06/2023, 8:54 PMrepository_def
to build_schedule_context
. This is because we now allow defining a schedule with just the job name, and yielding a run request for that job, which means that we have to load the repository to validate the partition when only the job name is providedCharlie Bini
04/06/2023, 8:55 PMclaire
04/06/2023, 8:55 PMclaire
04/06/2023, 8:56 PMwith build_schedule_context(...) as context:
result = my_schedule(context)
...
so if you wanted to fix this now you would specify build_schedule_context(repository_def=...)
which should fix the issueCharlie Bini
04/06/2023, 8:59 PMclaire
04/06/2023, 8:59 PMCharlie Bini
04/06/2023, 9:00 PMclaire
04/06/2023, 9:20 PM