Commit 5ed0b48
authored
Ensure
Summary
This PR updates DAG Factory’s handling of the schedule argument to
ensure, by adding tests, that when no schedule is provided, we do not
explicitly set it to None (or any default). Instead, we allow Airflow’s
own initialisation logic to apply its built-in defaults.
Background & Motivation
1. Airflow 2 behavior:
Omitting the schedule arg leaves it at the sentinel NOTSET, which
Airflow treats as a daily schedule (timedelta(days=1)).
Explicitly setting `schedule=None` is redundant/inaccurate and overrides
intended defaults.
2. Airflow 3 behavior:
Omitting the schedule arg leaves it at `None`, matching the core SDK
default. The PR also fixes a bug by removing an unneeded conditional
wherein when schedule arg in not passed, DAG Factory injected
schedule_interval arg leaving the generated DAG incompatible with
Airflow 3
Desired outcome:
- DAG Factory should never inject its own default for schedule (or any
other optional argument).
- Let Airflow core apply the correct behaviour per its version and
configuration.
closes: #467dag_params contain schedule before operating on it (#488)1 parent f35955f commit 5ed0b48
3 files changed
Lines changed: 76 additions & 5 deletions
File tree
- dagfactory
- tests
- fixtures
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
820 | | - | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
821 | 825 | | |
822 | 826 | | |
823 | 827 | | |
| |||
921 | 925 | | |
922 | 926 | | |
923 | 927 | | |
924 | | - | |
925 | | - | |
926 | | - | |
927 | 928 | | |
928 | 929 | | |
929 | 930 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
422 | 423 | | |
423 | 424 | | |
424 | 425 | | |
| 426 | + | |
425 | 427 | | |
426 | 428 | | |
427 | | - | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
428 | 455 | | |
429 | 456 | | |
430 | 457 | | |
| |||
0 commit comments