Hi all! I think I might have found a small bug - o...
# ask-community
e
Hi all! I think I might have found a small bug - or I need some help - when applying a success hook to a pipeline I lose my pipeline's description! 😱 I think this is new/different behaviour with 0.12.1. Code to reproduce in thread.
Copy code
from dagster import pipeline, success_hook
@success_hook
def much_success(context):
    print("hello")

@pipeline(name="test", description="foo")
def my_pipeline():
   print("bonjour")

my_pipeline.description

@much_success
@pipeline(name="test", description="foo")
def my_pipeline():
    print("bonjour")

my_pipeline.description
p
Thanks for the report! Looks like this has been broken in this way for a while…
@Dagster Bot issue Solid hooks strip description from pipeline definition
👍 1
thankyou 2
d
e
thank you @prha!
p
@esztermarton We’ll get this fixed for this Thursday’s release. In the meantime, you can work around this using the following:
Copy code
@success_hook
def much_success(context):
    print("hello")

@pipeline(name="test", description="foo", hook_defs={much_success})
def my_pipeline():
   print("bonjour")
e
wonderful, thanks again 🎉