Page MenuHomeElementl

RFC: add pipeline_selection to @pipeline_failure_sensor
ClosedPublic

Authored by yuhan on Jul 2 2021, 10:27 PM.

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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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 published this revision for review.Jul 2 2021, 10:58 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