Skip to content

Commit 6c885cd

Browse files
RulerCheneladkal
andauthored
Fix discord and slack provider icon url (apache#48680)
* fix provider icon url --------- Co-authored-by: Elad Kalif <[email protected]>
1 parent adbb062 commit 6c885cd

File tree

7 files changed

+22
-14
lines changed

7 files changed

+22
-14
lines changed

providers/discord/src/airflow/providers/discord/notifications/discord.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
from airflow.providers.common.compat.notifier import BaseNotifier
2323
from airflow.providers.discord.hooks.discord_webhook import DiscordWebhookHook
2424

25-
ICON_URL: str = "https://raw.githubusercontent.com/apache/airflow/main/airflow/www/static/pin_100.png"
25+
ICON_URL: str = (
26+
"https://raw.githubusercontent.com/apache/airflow/main/airflow-core/src/airflow/ui/public/pin_100.png"
27+
)
2628

2729

2830
class DiscordNotifier(BaseNotifier):

providers/slack/src/airflow/providers/slack/notifications/slack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
if TYPE_CHECKING:
2929
from slack_sdk.http_retry import RetryHandler
3030

31-
ICON_URL: str = "https://raw.githubusercontent.com/apache/airflow/2.5.0/airflow/www/static/pin_100.png"
31+
ICON_URL: str = (
32+
"https://raw.githubusercontent.com/apache/airflow/main/airflow-core/src/airflow/ui/public/pin_100.png"
33+
)
3234

3335

3436
class SlackNotifier(BaseNotifier):

providers/slack/src/airflow/providers/slack/operators/slack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def __init__(
145145
"https://www.youtube.com/watch?v=J---aiyznGQ"
146146
),
147147
icon_url: str = (
148-
"https://raw.githubusercontent.com/apache/airflow/main/airflow/www/static/pin_100.png"
148+
"https://raw.githubusercontent.com/apache/airflow/main/airflow-core/src/airflow/ui/public/pin_100.png"
149149
),
150150
blocks: list | None = None,
151151
attachments: list | None = None,

providers/slack/tests/system/slack/example_slack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
DAG_ID = "slack_api_example_dag"
2727
SLACK_API_CONN_ID = os.environ.get("SLACK_API_CONN_ID", "slack_conn_id")
2828
SLACK_CHANNEL = os.environ.get("SLACK_CHANNEL", "#general")
29-
IMAGE_URL = "https://raw.githubusercontent.com/apache/airflow/main/airflow/www/static/pin_100.png"
29+
IMAGE_URL = (
30+
"https://raw.githubusercontent.com/apache/airflow/main/airflow-core/src/airflow/ui/public/pin_100.png"
31+
)
3032

3133
with DAG(
3234
dag_id=DAG_ID,

providers/slack/tests/system/slack/example_slack_webhook.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
2626
DAG_ID = "slack_webhook_example_dag"
2727
SLACK_WEBHOOK_CONN_ID = os.environ.get("SLACK_WEBHOOK_CONN_ID", "slack_default")
28-
IMAGE_URL = "https://raw.githubusercontent.com/apache/airflow/main/airflow/www/static/pin_100.png"
28+
IMAGE_URL = (
29+
"https://raw.githubusercontent.com/apache/airflow/main/airflow-core/src/airflow/ui/public/pin_100.png"
30+
)
2931

3032
with DAG(
3133
dag_id=DAG_ID,

providers/slack/tests/unit/slack/notifications/test_slack.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ def test_slack_notifier(self, mock_slack_hook, dag_maker, extra_kwargs, hook_ext
6464
"channel": "#general",
6565
"username": "Airflow",
6666
"text": "test",
67-
"icon_url": "https://raw.githubusercontent.com/apache/airflow/2.5.0/airflow/www/static"
68-
"/pin_100.png",
67+
"icon_url": "https://raw.githubusercontent.com/apache/airflow/main/airflow-core"
68+
"/src/airflow/ui/public/pin_100.png",
6969
"attachments": "[]",
7070
"blocks": "[]",
7171
"unfurl_links": True,
@@ -87,8 +87,8 @@ def test_slack_notifier_with_notifier_class(self, mock_slack_hook, dag_maker):
8787
"channel": "#general",
8888
"username": "Airflow",
8989
"text": "test",
90-
"icon_url": "https://raw.githubusercontent.com/apache/airflow/2.5.0/airflow/www/static"
91-
"/pin_100.png",
90+
"icon_url": "https://raw.githubusercontent.com/apache/airflow/main/airflow-core"
91+
"/src/airflow/ui/public/pin_100.png",
9292
"attachments": "[]",
9393
"blocks": "[]",
9494
"unfurl_links": True,
@@ -114,8 +114,8 @@ def test_slack_notifier_templated(self, mock_slack_hook, dag_maker):
114114
"channel": "#test-test_slack_notifier",
115115
"username": "Airflow",
116116
"text": "test Airflow",
117-
"icon_url": "https://raw.githubusercontent.com/apache/airflow/2.5.0/airflow/www/static"
118-
"/pin_100.png",
117+
"icon_url": "https://raw.githubusercontent.com/apache/airflow/main/airflow-core"
118+
"/src/airflow/ui/public/pin_100.png",
119119
"attachments": '[{"image_url": "test_slack_notifier.png"}]',
120120
"blocks": "[]",
121121
"unfurl_links": True,
@@ -140,8 +140,8 @@ def test_slack_notifier_unfurl_options(self, mock_slack_hook, dag_maker):
140140
"channel": "#general",
141141
"username": "Airflow",
142142
"text": "test",
143-
"icon_url": "https://raw.githubusercontent.com/apache/airflow/2.5.0/airflow/www/static"
144-
"/pin_100.png",
143+
"icon_url": "https://raw.githubusercontent.com/apache/airflow/main/airflow-core"
144+
"/src/airflow/ui/public/pin_100.png",
145145
"attachments": "[]",
146146
"blocks": "[]",
147147
"unfurl_links": False,

providers/slack/tests/unit/slack/operators/test_slack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def test_api_call_params_with_default_args(self, mock_hook):
168168
"Here is a cat video instead\n"
169169
"https://www.youtube.com/watch?v=J---aiyznGQ",
170170
"icon_url": "https://raw.githubusercontent.com/apache/"
171-
"airflow/main/airflow/www/static/pin_100.png",
171+
"airflow/main/airflow-core/src/airflow/ui/public/pin_100.png",
172172
"attachments": "[]",
173173
"blocks": "[]",
174174
}

0 commit comments

Comments
 (0)