Repository navigation
Commit 05981d3
authored
Fix task Clear and callback bundles after code-only Dag changes (#73915)
* Fix task Clear bundle selection after code-only Dag changes
A deployed callable fix can leave serialization unchanged while an existing
run stays pinned to an older bundle. Users need the latest-version clear
option to remain available and an explicit selection to take effect for
active runs. Scheduler callbacks also need to resolve the same bundle as
task execution.
* Pair task callback bundle manifest with the run's pinned version
Callbacks and failure emails resolve their bundle version from the Dag run,
but the manifest still came from the task instance's Dag version. When that
version differs from the one the run was created with, a manifest-based
bundle would initialize the run's bundle version from another version's
manifest. Task execution and Dag-run callbacks already take both from the
run's pinned version.
* Run triggerer task callbacks on the run's pinned bundle
A deferred task that finishes in the triggerer has its callback sent from
there, and that path still took the bundle from the task instance's Dag
version. A code-only update advances that version's bundle in place while
the run stays pinned, so the callback would run newer code than the task
did. Scheduler callbacks already resolve the bundle from the run.
* Stop pairing a pinned bundle with an overwritten manifest
A code-only update reuses the Dag version and overwrites its bundle version
and manifest in place, while existing runs stay pinned to the older bundle
version. Task execution and callbacks then shipped the run's older version
with the newer manifest, so a manifest-based bundle would materialize code
the run was never pinned to. Once the original manifest is gone, sending
none is safer than sending one for a different version.1 parent a8c55b7 commit 05981d3
10 files changed
Lines changed: 308 additions & 112 deletions
File tree
- airflow-core
- src/airflow
- jobs
- models
- ui/src/components/Clear/TaskInstance
- tests/unit
- executors
- jobs
- models
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | 203 | | |
224 | 204 | | |
225 | 205 | | |
| |||
1733 | 1713 | | |
1734 | 1714 | | |
1735 | 1715 | | |
1736 | | - | |
1737 | | - | |
1738 | | - | |
1739 | | - | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
1744 | | - | |
1745 | | - | |
1746 | | - | |
1747 | | - | |
| 1716 | + | |
1748 | 1717 | | |
1749 | 1718 | | |
1750 | 1719 | | |
| |||
1778 | 1747 | | |
1779 | 1748 | | |
1780 | 1749 | | |
1781 | | - | |
1782 | | - | |
1783 | | - | |
1784 | | - | |
1785 | | - | |
1786 | | - | |
1787 | | - | |
| 1750 | + | |
| 1751 | + | |
1788 | 1752 | | |
1789 | | - | |
1790 | 1753 | | |
1791 | 1754 | | |
1792 | 1755 | | |
| |||
3496 | 3459 | | |
3497 | 3460 | | |
3498 | 3461 | | |
3499 | | - | |
3500 | | - | |
3501 | | - | |
3502 | | - | |
| 3462 | + | |
| 3463 | + | |
3503 | 3464 | | |
3504 | | - | |
3505 | | - | |
3506 | | - | |
3507 | | - | |
3508 | | - | |
3509 | | - | |
3510 | | - | |
3511 | | - | |
3512 | 3465 | | |
3513 | 3466 | | |
3514 | 3467 | | |
| |||
3980 | 3933 | | |
3981 | 3934 | | |
3982 | 3935 | | |
| 3936 | + | |
3983 | 3937 | | |
3984 | 3938 | | |
3985 | 3939 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
416 | 417 | | |
417 | 418 | | |
418 | 419 | | |
419 | | - | |
420 | | - | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
421 | 428 | | |
422 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
| 708 | + | |
| 709 | + | |
712 | 710 | | |
713 | 711 | | |
714 | 712 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
725 | | - | |
726 | | - | |
727 | | - | |
728 | | - | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
743 | 728 | | |
744 | 729 | | |
745 | 730 | | |
| |||
0 commit comments