Is there a way to run a pipeline with hooks applie...
# announcements
p
Is there a way to run a pipeline with hooks applied as reconstructable? When attempting to do so I see
dagster.core.errors.DagsterInvariantViolationError: Reconstructable target should be a function or definition produced by a decorated function, got <class 'dagster.core.definitions.pipeline.PipelineDefinition'>
The use case is writing tests for hook-decorated pipelines. Another potentially workable solution would be if hooks could be applied as part of an
execute_pipeline
call.
a
hmm this seems like a bug
easiest workaround is probably just adding a plain function that returns the pipeline and point reconstructable at that
Copy code
def get_pipeline():
  return my_pipeline
...
reconstructable(get_pipeline)
p
thanks. I'd like to actually run the test with the hooks applied. I have a workaround for the time being but I'll be watching the issue 😄
a
you should be able to run the test with the hooks applied with the approach described above