Skip to content

Commit fe3bb2a

Browse files
fix: set depends on past value set by users in transformation task level (#488) (#509)
Co-authored-by: Arinda Arif <79823430+arinda-arif@users.noreply.github.com>
1 parent 11698cd commit fe3bb2a

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

ext/scheduler/airflow2/compiler/compiler_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestCompiler(t *testing.T) {
2424
Owner: "mee@mee",
2525
Behavior: models.JobSpecBehavior{
2626
CatchUp: true,
27-
DependsOnPast: false,
27+
DependsOnPast: true,
2828
Retry: models.JobSpecBehaviorRetry{
2929
Count: 2,
3030
Delay: time.Second * 2,

ext/scheduler/airflow2/compiler_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func TestCompilerIntegration(t *testing.T) {
7171
Owner: "mee@mee",
7272
Behavior: models.JobSpecBehavior{
7373
CatchUp: true,
74-
DependsOnPast: false,
74+
DependsOnPast: true,
7575
},
7676
Schedule: models.JobSpecSchedule{
7777
StartDate: time.Date(2000, 11, 11, 0, 0, 0, 0, time.UTC),
@@ -94,7 +94,7 @@ func TestCompilerIntegration(t *testing.T) {
9494
Owner: "mee@mee",
9595
Behavior: models.JobSpecBehavior{
9696
CatchUp: true,
97-
DependsOnPast: false,
97+
DependsOnPast: true,
9898
},
9999
Schedule: models.JobSpecSchedule{
100100
StartDate: time.Date(2000, 11, 11, 0, 0, 0, 0, time.UTC),
@@ -142,7 +142,7 @@ func TestCompilerIntegration(t *testing.T) {
142142
Owner: "mee@mee",
143143
Behavior: models.JobSpecBehavior{
144144
CatchUp: true,
145-
DependsOnPast: false,
145+
DependsOnPast: true,
146146
Retry: models.JobSpecBehaviorRetry{
147147
Count: 4,
148148
Delay: 0,

ext/scheduler/airflow2/resources/base_dag.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"queue": "{{ .Metadata.Airflow.Queue }}",
4444
{{- end }}
4545
"owner": {{.Job.Owner | quote}},
46-
"depends_on_past": {{ if .Job.Behavior.DependsOnPast }} True {{- else -}} False {{- end -}},
46+
"depends_on_past": False,
4747
"retries": {{ if gt .Job.Behavior.Retry.Count 0 -}} {{.Job.Behavior.Retry.Count}} {{- else -}} DAG_RETRIES {{- end}},
4848
"retry_delay": {{ if gt .Job.Behavior.Retry.Delay.Nanoseconds 0 -}} timedelta(seconds={{.Job.Behavior.Retry.Delay.Seconds}}) {{- else -}} timedelta(seconds=DAG_RETRY_DELAY) {{- end}},
4949
"retry_exponential_backoff": {{if .Job.Behavior.Retry.ExponentialBackoff -}}True{{- else -}}False{{- end -}},
@@ -135,6 +135,7 @@
135135
task_id={{$baseTaskSchema.Name | quote}},
136136
get_logs=True,
137137
dag=dag,
138+
depends_on_past={{ if .Job.Behavior.DependsOnPast }}True{{- else -}}False{{- end -}},
138139
in_cluster=True,
139140
is_delete_operator_pod=True,
140141
do_xcom_push=False,

ext/scheduler/airflow2/resources/expected_compiled_template.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
task_id="bq",
9494
get_logs=True,
9595
dag=dag,
96+
depends_on_past=True,
9697
in_cluster=True,
9798
is_delete_operator_pod=True,
9899
do_xcom_push=False,

0 commit comments

Comments
 (0)