You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "sophie (Jira)" <ji...@apache.org> on 2020/01/05 06:07:00 UTC
[jira] [Commented] (AIRFLOW-884) SlackAPIPostOperator works
inconsistently across two DAGs / Python scripts.
[ https://issues.apache.org/jira/browse/AIRFLOW-884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17008240#comment-17008240 ]
sophie commented on AIRFLOW-884:
--------------------------------
excuse me , have u found the cause ? And where is your workaround or any other solution ? can u share it here ? Thx
> 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: 1.7.1.3
> Reporter: Matt Inwood
> Priority: Major
> 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
(v8.3.4#803005)