Skip to content

Commit

Permalink
Update slack op (#2025)
Browse files Browse the repository at this point in the history
  • Loading branch information
pankajastro authored Aug 30, 2023
1 parent c4bccf8 commit b655a6d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python-sdk/tests_integration/astro_deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV SETUPTOOLS_USE_DISTUTILS=stdlib

COPY python-sdk /tmp/python-sdk
RUN pip install /tmp/python-sdk[all]
RUN pip install apache-airflow[slack]
RUN pip install "apache-airflow-providers-slack>=8.0.0"

RUN mkdir -p ${AIRFLOW_HOME}/dags
RUN mkdir -p ${AIRFLOW_HOME}/tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ENV SETUPTOOLS_USE_DISTUTILS=stdlib

COPY python-sdk /tmp/python-sdk
RUN pip install /tmp/python-sdk[all]
RUN pip install apache-airflow[slack]
RUN pip install "apache-airflow-providers-slack>=8.0.0"

RUN mkdir -p ${AIRFLOW_HOME}/dags
RUN mkdir -p ${AIRFLOW_HOME}/tests
Expand Down
4 changes: 2 additions & 2 deletions python-sdk/tests_integration/astro_deploy/master_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from typing import Any, List

from airflow import DAG, settings
from airflow.contrib.operators.slack_webhook_operator import SlackWebhookOperator
from airflow.models import Connection, DagRun
from airflow.models.baseoperator import chain
from airflow.operators.bash import BashOperator
from airflow.operators.dummy import DummyOperator
from airflow.operators.python import PythonOperator, get_current_context
from airflow.operators.trigger_dagrun import TriggerDagRunOperator
from airflow.providers.slack.operators.slack_webhook import SlackWebhookOperator
from airflow.utils.session import create_session

SLACK_CHANNEL = os.getenv("SLACK_CHANNEL", "#provider-alert")
Expand Down Expand Up @@ -118,7 +118,7 @@ def get_report(dag_run_ids: List[str], **context: Any) -> None: # noqa: C901
try:
SlackWebhookOperator(
task_id="slack_alert",
http_conn_id=SLACK_WEBHOOK_CONN,
slack_webhook_conn_id=SLACK_WEBHOOK_CONN,
message="".join(output_list),
channel=SLACK_CHANNEL,
username=SLACK_USERNAME,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
from typing import Any, List

from airflow import DAG
from airflow.contrib.operators.slack_webhook_operator import SlackWebhookOperator
from airflow.models import DagRun
from airflow.models.baseoperator import chain
from airflow.operators.bash import BashOperator
from airflow.operators.dummy import DummyOperator
from airflow.operators.python import PythonOperator
from airflow.operators.trigger_dagrun import TriggerDagRunOperator
from airflow.providers.slack.operators.slack_webhook import SlackWebhookOperator
from airflow.utils.session import create_session

SLACK_CHANNEL = os.getenv("SLACK_CHANNEL", "#provider-alert")
Expand Down Expand Up @@ -49,7 +49,7 @@ def get_report(dag_run_ids: List[str], **context: Any) -> None: # noqa: C901
try:
SlackWebhookOperator(
task_id="slack_alert",
http_conn_id=SLACK_WEBHOOK_CONN,
slack_webhook_conn_id=SLACK_WEBHOOK_CONN,
message="".join(message_list),
channel=SLACK_CHANNEL,
username=SLACK_USERNAME,
Expand Down

0 comments on commit b655a6d

Please sign in to comment.