Matt Inwood created AIRFLOW-884:
-----------------------------------
Summary: SlackAPIPostOperator works inconsistently across two DAGs
/ Python scripts.
Key: AIRFLOW-884
URL: https://issues.apache.org/jira/browse/AIRFLOW-884
Project: Apache Airflow
Issue Type: Bug
Components: api
Affects Versions: Airflow 1.7.1.3
Reporter: Matt Inwood
Attachments: airflow_error.PNG
Wrote a DAG file where the script executes and then sends a message to slack.
The code at the bottom is used to implement that.
I used the same code in another DAG file. The upstream task completes
successfully, but the slack_success task does not. If I force an error into my
script, it does return the slack_fail task.
On success, both Slack operators indicate Operater Undefined, per attached
screenshot
slack_success = SlackAPIPostOperator(
task_id='slack_success',
token=TOKEN,
channel='#airflow',
username='airflow',
text="job {{ dag }} finished at {{ ts }} successfully 8)",
dag=dag
)
slack_fail = SlackAPIPostOperator(
task_id='slack_fail',
token=TOKEN,
channel='#airflow',
username='airflow',
text="job '{{ dag }}' finished at {{ ts }} in disgrace >:(",
dag=dag,
trigger_rule=TriggerRule.ONE_FAILED
)
slack_success.set_upstream(sample_task)
slack_fail.set_upstream(sample_task)
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)