You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Dmytro Kulyk (Jira)" <ji...@apache.org> on 2019/12/28 22:26:00 UTC

[jira] [Created] (AIRFLOW-6385) SlackAPIPostOperator fails when blocks not set

Dmytro Kulyk created AIRFLOW-6385:
-------------------------------------

             Summary: SlackAPIPostOperator fails when blocks not set
                 Key: AIRFLOW-6385
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6385
             Project: Apache Airflow
          Issue Type: Bug
          Components: worker
    Affects Versions: 1.10.7
            Reporter: Dmytro Kulyk


After upgrade to 1.10.7 all slack notifications became faulty
SlackAPIPostOperator fails when blocks not set
{code}
    t_slack_ok = SlackAPIPostOperator(
        task_id = 'notify_ok',
        token = Variable.get('slack.token'),
        channel = Variable.get('slack.channel'),
        text = ':rocket: {{ dag.dag_id }} for {{ ds }} has succeeded',
        dag = dag)
{code}
Causing an operator error:
{code}
[2019-12-28 21:55:14,668] {taskinstance.py:1088} ERROR - Slack API call failed (invalid_blocks_format)
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/airflow/models/taskinstance.py", line 955, in _run_raw_task
    result = task_copy.execute(context=context)
  File "/usr/local/lib/python3.6/dist-packages/airflow/operators/slack_operator.py", line 85, in execute
    slack.call(self.method, self.api_params)
  File "/usr/local/lib/python3.6/dist-packages/airflow/hooks/slack_hook.py", line 62, in call
    raise AirflowException(msg)
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)