Skip to content

Commit

Permalink
Upgrade airflow WTMO to 1.10.12
Browse files Browse the repository at this point in the history
  • Loading branch information
haroldwoo committed Nov 9, 2020
1 parent eabe3b6 commit e6456b0
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 676 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ venv

logs
unittests.cfg
airflow-webserver.pid
.config
.credentials

/dags/bigquery-etl-dags
/dags/bigquery-etl-dags/*
Expand Down
24 changes: 19 additions & 5 deletions dags/clean_gke_pods.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@

from airflow.contrib.hooks.gcp_api_base_hook import GoogleCloudBaseHook

docs = """
### Clean GKE Pods
Built from cloudops-infra repo, projects/airflow/pod-clean
#### Purpose
This DAG executes a GKEPodOperator to clean out old completed pods
on the shared derived-datasets gke cluster. We need to do this periodically
because GCP has a 1500 object limit quota.
#### Owner
[email protected]
"""


default_args = {
'owner': '[email protected]',
'depends_on_past': False,
Expand All @@ -14,11 +31,9 @@
'retry_delay': timedelta(minutes=30),
}

dag = DAG("clean-gke-pods", default_args=default_args, schedule_interval="@daily")

# Built from cloudops-infra repo, projects/airflow/pod-clean
docker_image='gcr.io/moz-fx-data-airflow-prod-88e0/gke-pod-clean:1.0'
dag = DAG("clean-gke-pods", default_args=default_args, schedule_interval="@daily", doc_md = docs)

docker_image='gcr.io/moz-fx-data-airflow-prod-88e0/gke-pod-clean:1.3'
gke_cluster_name='bq-load-gke-1'
gke_location='us-central1-a'

Expand All @@ -35,4 +50,3 @@
image=docker_image,
arguments=docker_args,
dag=dag)

5 changes: 4 additions & 1 deletion dags/operators/backport/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
### Using kube_client.py from 1.10.2
We include the airflow/contrib/kubernetes/kube_client.py from 1.10.2
We used to include the airflow/contrib/kubernetes/kube_client.py from 1.10.2
because the 1.10.7 kube_client.py has some configuration issues when
trying to push xcom from gkepodoperator. if do_push_xcom is set to False,
the upstream GkePodOperator works fine.

### As of 1.10.12 I've removed the backported 1.10.7 gcp_container_operator,
kubernetes_pod_operator, and the 1.10.2 kube_client
327 changes: 0 additions & 327 deletions dags/operators/backport/gcp_container_operator_1_10_7.py

This file was deleted.

Loading

0 comments on commit e6456b0

Please sign in to comment.