Commit e213ad7
Two related fixes for issues introduced in apache#59604:
1. `are_dependencies_met()` mutated the caller's dep_context.deps set
in-place when adding ReadyToRescheduleDep for UP_FOR_RESCHEDULE TIs.
Since the scheduler shares one DepContext across all TIs in a loop,
this permanently leaked the dep into unrelated TIs.
Fix: use `attrs.evolve` to create a new DepContext instead.
2. `ReadyToRescheduleDep` lost its fast-exit guard for non-reschedule
tasks in NONE state. Without it, every task hit the `task_reschedule`
table on each scheduling loop.
Fix: restore the guard that short-circuits for non-reschedule,
non-mapped tasks in NONE state while still honoring reschedule_date
for tasks explicitly in UP_FOR_RESCHEDULE state.
1 parent f7daf7b commit e213ad7
4 files changed
Lines changed: 46 additions & 8 deletions
File tree
- airflow-core
- src/airflow
- models
- ti_deps/deps
- tests/unit
- models
- ti_deps/deps
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
942 | 942 | | |
943 | 943 | | |
944 | 944 | | |
945 | | - | |
946 | | - | |
947 | 945 | | |
948 | | - | |
949 | | - | |
| 946 | + | |
| 947 | + | |
950 | 948 | | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
955 | 954 | | |
956 | 955 | | |
957 | 956 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
61 | 69 | | |
62 | 70 | | |
63 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1337 | 1337 | | |
1338 | 1338 | | |
1339 | 1339 | | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
1340 | 1363 | | |
1341 | 1364 | | |
1342 | 1365 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
110 | 118 | | |
111 | 119 | | |
112 | 120 | | |
| |||
0 commit comments