Commit 9c03d440 authored by Siarhei Khaletski (EPAM)'s avatar Siarhei Khaletski (EPAM) 🚩 Committed by YanSushchynski
Browse files

GONRG-2972: Added support Airflow 2.0 with backward compatibility

parent 6ecff632
Pipeline #61987 failed with stages
in 78 minutes and 48 seconds
from datetime import timedelta
from json import dumps, loads
import airflow
from airflow import DAG
from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator
from json import dumps, loads
from datetime import timedelta
from osdu_airflow.backward_compatibility.default_args import update_default_args
# default args for airflow
default_args = {
......@@ -16,6 +18,8 @@ default_args = {
'retry_delay': timedelta(minutes=5),
}
default_args = update_default_args(default_args)
# Get values from dag run configuration
record_id = "{{ dag_run.conf['execution_context']['id'] }}"
authorization = "{{ dag_run.conf['authToken'] }}"
......
......@@ -3,6 +3,7 @@ from airflow import DAG
from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator
from json import dumps, loads
from datetime import timedelta
from osdu_airflow.backward_compatibility.default_args import update_default_args
# default args for airflow
default_args = {
......@@ -16,6 +17,8 @@ default_args = {
'retry_delay': timedelta(minutes=5),
}
default_args = update_default_args(default_args)
# Get values from dag run configuration
record_id = "{{ dag_run.conf['execution_context']['id'] }}"
authorization = "{{ dag_run.conf['authToken'] }}"
......
--extra-index-url=https://community.opengroup.org/api/v4/projects/668/packages/pypi/simple/
osdu-airflow==0.0.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment