I have a new question up on the Q&A board, can...
# announcements
a
I have a new question up on the Q&A board, can’t tell if I’m being bone-headed in my approach or if there is a problem with
failure_hook
in testing. https://github.com/dagster-io/dagster/discussions/4046
y
mocking the resource is the right way for testing
can you post the actual code by any chance?
a
I am not able to do that, as it belongs to our client under NDA. The interesting thing is that the testing for the success_hook passes just fine and is mocked in similar fashion. It almost seems that when an exception is raised in the solid then the failure hook is not called and execution stops. Is it possible that we need to raise failure from a try block in the solid? My assumption was that if a solid fails for any reason (including exception raise) that the failure hook would be called.
y
ah i see. yes, you would need to do
raise_on_error=False
on execute_pipeline
a
Oh my, thank you! So, in production should we do the same as to allow the failure_hook to be called?
Sorry, I’m a bit scattered this morning. My question is specifically that if we are using
execute_launch_command
in production to launch the pipeline run, is there a need or way to somehow set
raise_on_error=False
?
y
no raise_on_error=true is only default and available to set when you are using the execute_pipeline api. the behavior through the system otherwise is raise_on_error false
a
Great, thanks so much, @yuhan!