我正在尝试通过Slack实现Airflow集成, 已收到webhook URL,并按如下所示创建连接。为什么显示google.com?
为什么使用默认的http_conn_id并连接到Google?
但是出现如下错误
错误-向Slack频道#airflow-alerts发送消息时出错 通过气流:404:未找到
{base_hook.py:83} INFO - Using connection to: id: http_default. Host: https://www.google.com/, Port: None, Schema: None, Login: None, Password: None, extra: {}
{logging_mixin.py:95} INFO - [2020-05-29 12:43:21,374] {http_hook.py:128} INFO - Sending 'POST' to url: https://www.google.com//T00A6ASFHD8S/G1FDF4K/a3zfKsadfsrScxgadfsdafOIgIvgW
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://www.google.com//T00A6ASFHD8S/G1FDF4K/a3zfKsadfsrScxgadfsdafOIgIvgW
但是我收到以下错误,无法弄清
答案 0 :(得分:0)
您的连接未正确建立,您需要选择def InputPath(type_name):
return type(
'InputPath_' + type_name,
(str,),
{'type_name': type_name},
)
作为HTTP
,将Conn Type
字段留空,然后将Webhook令牌放入(格式为Extra
)在/STRING/STRING/STRING
字段中。然后,您可以使用Password
operator来设置频道和用户名。
答案 1 :(得分:0)
经过漫长的奋斗,我终于明白了...
SlackWebhookOperator的Airflow≤1.10.3中存在错误(错误Jira问题)。此PR(修复提交)已在1.10.4中修复。