https://dagster.io/ logo
#announcements
Title
# announcements
a

Andy H

04/14/2021, 2:38 PM
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

yuhan

04/14/2021, 3:42 PM
mocking the resource is the right way for testing
can you post the actual code by any chance?
a

Andy H

04/14/2021, 5:30 PM
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

yuhan

04/14/2021, 5:33 PM
ah i see. yes, you would need to do
raise_on_error=False
on execute_pipeline
a

Andy H

04/14/2021, 5:37 PM
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

yuhan

04/14/2021, 6:26 PM
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

Andy H

04/14/2021, 7:18 PM
Great, thanks so much, @yuhan!