Skip to content

Commit

Permalink
Chore: fix DAG linter issues (#1495)
Browse files Browse the repository at this point in the history
  • Loading branch information
ifoukarakis authored Apr 29, 2024
1 parent 1b4a833 commit 4bc9743
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions airflow/dags/mattermost_dags/extract/push_proxy_new.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import pendulum
from airflow.decorators import dag
from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import (
KubernetesPodOperator,
)

from mattermost_dags.airflow_utils import MATTERMOST_DATAWAREHOUSE_IMAGE, pod_defaults, send_alert
from mattermost_dags.kube_secrets import (
SNOWFLAKE_LOAD_USER,
SNOWFLAKE_LOAD_PASSWORD,
SNOWFLAKE_ACCOUNT,
SNOWFLAKE_LOAD_DATABASE,
SNOWFLAKE_LOAD_WAREHOUSE,
SNOWFLAKE_LOAD_PASSWORD,
SNOWFLAKE_LOAD_ROLE,
SNOWFLAKE_LOAD_USER,
SNOWFLAKE_LOAD_WAREHOUSE,
)

from airflow.decorators import dag
from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator


@dag(
schedule="0 3 * * *",
Expand All @@ -32,7 +30,7 @@ def push_proxy_loader():
**pod_defaults,
image=MATTERMOST_DATAWAREHOUSE_IMAGE, # Uses latest build from master
task_id="task-push-proxy-us",
name=f"push-proxy-us",
name="push-proxy-us",
secrets=[
SNOWFLAKE_LOAD_USER,
SNOWFLAKE_LOAD_PASSWORD,
Expand All @@ -44,7 +42,7 @@ def push_proxy_loader():
env_vars={},
arguments=[
"push_proxy PUSH_PROXY_LOGS_US_NEW LOGS_US_NEW "
" --prefix /AWSLogs/{{ var.value.push_proxy_aws_account_id }}/elasticloadbalancing/{{ var.value.push_proxy_aws_region }}"
" --prefix /AWSLogs/{{ var.value.push_proxy_aws_account_id }}/elasticloadbalancing/{{ var.value.push_proxy_aws_region }}" # noqa: E501
" -s {{ var.value.push_proxy_target_schema }}"
" -a ${SNOWFLAKE_ACCOUNT}"
" -d ${SNOWFLAKE_LOAD_DATABASE}"
Expand All @@ -59,7 +57,7 @@ def push_proxy_loader():
**pod_defaults,
image=MATTERMOST_DATAWAREHOUSE_IMAGE, # Uses latest build from master
task_id="task-push-proxy-tests",
name=f"push-proxy-test",
name="push-proxy-test",
secrets=[
SNOWFLAKE_LOAD_USER,
SNOWFLAKE_LOAD_PASSWORD,
Expand All @@ -71,7 +69,7 @@ def push_proxy_loader():
env_vars={},
arguments=[
"push_proxy PUSH_PROXY_LOGS_TEST_NEW LOGS_TEST_NEW "
" --prefix /AWSLogs/{{ var.value.push_proxy_aws_account_id }}/elasticloadbalancing/{{ var.value.push_proxy_aws_region }}"
" --prefix /AWSLogs/{{ var.value.push_proxy_aws_account_id }}/elasticloadbalancing/{{ var.value.push_proxy_aws_region }}" # noqa: E501
" -s {{ var.value.push_proxy_target_schema }}"
" -a ${SNOWFLAKE_ACCOUNT}"
" -d ${SNOWFLAKE_LOAD_DATABASE}"
Expand All @@ -86,7 +84,7 @@ def push_proxy_loader():
**pod_defaults,
image=MATTERMOST_DATAWAREHOUSE_IMAGE, # Uses latest build from master
task_id="task-push-proxy-eu",
name=f"push-proxy-eu",
name="push-proxy-eu",
secrets=[
SNOWFLAKE_LOAD_USER,
SNOWFLAKE_LOAD_PASSWORD,
Expand All @@ -98,7 +96,7 @@ def push_proxy_loader():
env_vars={},
arguments=[
"push_proxy PUSH_PROXY_LOGS_EU_NEW LOGS_EU_NEW "
" --prefix /AWSLogs/{{ var.value.push_proxy_aws_account_id }}/elasticloadbalancing/{{ var.value.push_proxy_aws_region_eu }}"
" --prefix /AWSLogs/{{ var.value.push_proxy_aws_account_id }}/elasticloadbalancing/{{ var.value.push_proxy_aws_region_eu }}" # noqa: E501
" -s {{ var.value.push_proxy_target_schema }}"
" -a ${SNOWFLAKE_ACCOUNT}"
" -d ${SNOWFLAKE_LOAD_DATABASE}"
Expand Down

0 comments on commit 4bc9743

Please sign in to comment.