Page MenuHomeElementl

RFC: add pipeline_selection to @pipeline_failure_sensor
ClosedPublic

Authored by yuhan on Jul 2 2021, 10:27 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 15, 12:49 AM
Unknown Object (File)
Thu, May 11, 5:26 AM
Unknown Object (File)
Sat, Apr 29, 11:43 AM
Unknown Object (File)
Fri, Apr 28, 12:45 PM
Unknown Object (File)
Apr 26 2023, 1:26 AM
Unknown Object (File)
Apr 25 2023, 10:52 PM
Unknown Object (File)
Apr 25 2023, 7:31 PM
Unknown Object (File)
Apr 25 2023, 4:39 AM
Subscribers
None

Details

Summary

allow users to specify a list of pipeline names that they want to alert on

besides, make_slack_on_pipeline_failure_sensor takes text_fn and blocks_fn and follow the same fallback as stated in slack's doc - this is so users who want fancy slack msg can use the built in without rewriting the same logic: e.g. D8700

my_slack_on_failure_sensor = make_slack_on_pipeline_failure_sensor(
    channel="#alert",
    slack_token=os.environ["SLACK_TOKEN"],
    blocks_fn=lambda context: slack_message_blocks_fn(context, base_url),
    pipeline_selection=[
        "download_pipeline",
    ],
)
Test Plan

the one in toy pipeline only alerts on error_monster

Diff Detail

Repository
R1 dagster
Branch
yuhan/pipeline-sensor
Lint
Lint Errors
SeverityLocationCodeMessage
Errorpython_modules/dagster/dagster/core/definitions/pipeline_sensor.py:76E0602Undefined Variable
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jul 2 2021, 10:49 PM
Harbormaster failed remote builds in B33171: Diff 40889!
yuhan retitled this revision from add pipeline_selection to @pipeline_failure_sensor to RFC: add pipeline_selection to @pipeline_failure_sensor.Jul 2 2021, 10:55 PM
yuhan edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jul 6 2021, 7:54 PM
yuhan added a child revision: Restricted Differential Revision.Jul 6 2021, 8:29 PM