[
https://issues.apache.org/jira/browse/AIRFLOW-1303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yu Ishikawa updated AIRFLOW-1303:
---------------------------------
Description:
h2. Proposal
In my view, we would like to use the slack post operator to notify error
message when some tasks fail. Now, sending messages to slack is hacky a little
with {{on_failure_callback}}. I understand we want to make
`on_failure_callback` generic. However, we should write error handlings more
naturally.
1. Add a method to handle failure in the slack post operator
{noformat}
# For example
slack_post_operator = SlackPostOperator(....)
operator1.on_failure_callback(slack_post_operator.handle_failure())
{noformat}
2. {{on_failure_callback}} support operator argument
{noformat}
# For example,
slack_post_operator = SlackPostOperator(....)
operator.on_failure_operator(slack_post_operator)
{noformat}
Apart from that, we should have a good example to use {{on_failure_callback}}.
was:
h2. Suggestion
In my view, we would like to use the slack post operator to notify error
message when some tasks fail. Now, sending messages to slack is hacky a little
with {{on_failure_callback}}. I understand we want to make
`on_failure_callback` generic. However, we should write error handlings more
naturally.
1. Add a method to handle failure in the slack post operator
{noformat}
# For example
slack_post_operator = SlackPostOperator(....)
operator1.on_failure_callback(slack_post_operator.handle_failure())
{noformat}
2. {{on_failure_callback}} support operator argument
{noformat}
# For example,
slack_post_operator = SlackPostOperator(....)
operator.on_failure_operator(slack_post_operator)
{noformat}
Apart from that, we should have a good example to use {{on_failure_callback}}.
> Slack post operator should be friendly to `on_failure_callback`
> ---------------------------------------------------------------
>
> Key: AIRFLOW-1303
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1303
> Project: Apache Airflow
> Issue Type: Bug
> Components: operators
> Reporter: Yu Ishikawa
>
> h2. Proposal
> In my view, we would like to use the slack post operator to notify error
> message when some tasks fail. Now, sending messages to slack is hacky a
> little with {{on_failure_callback}}. I understand we want to make
> `on_failure_callback` generic. However, we should write error handlings more
> naturally.
> 1. Add a method to handle failure in the slack post operator
> {noformat}
> # For example
> slack_post_operator = SlackPostOperator(....)
> operator1.on_failure_callback(slack_post_operator.handle_failure())
> {noformat}
> 2. {{on_failure_callback}} support operator argument
> {noformat}
> # For example,
> slack_post_operator = SlackPostOperator(....)
> operator.on_failure_operator(slack_post_operator)
> {noformat}
> Apart from that, we should have a good example to use {{on_failure_callback}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)