https://dagster.io/ logo
#dagster-feedback
Title
# dagster-feedback
a

Alfie Johnson

07/28/2023, 12:12 PM
Hi, I think there is a small typo in the sensor documentation for run status sensors. In particular, the sensor examples for slack messages on job success and job failure. The current code example for job success is shown below:
Copy code
from dagster import run_status_sensor, RunStatusSensorContext, DagsterRunStatus


@run_status_sensor(run_status=DagsterRunStatus.SUCCESS)
def my_slack_on_run_success(context: RunStatusSensorContext):
    slack_client = WebClient(token=os.environ["SLACK_DAGSTER_ETL_BOT_TOKEN"])

    slack_client.chat_postMessage(
        channel="#alert-channel",
        message=f'Job "{context.dagster_run.job_name}" succeeded.',
    )
I think that the second argument for the chat_postMessage method should be
text
rather than
message
. I have checked the arguments used for
make_slack_on_run_failure_sensor
here, and that also uses
text
.
s

sandy

07/28/2023, 11:14 PM
thanks for reporting! I'll post a fix
👍 1