Repository navigation
Commit 84fca1f
committed
Pass the scheduler's session to set_state when processing executor events
process_executor_events calls ti.set_state() without a session when the
Dag of a finished task instance cannot be loaded. set_state is
@provide_session and settings.Session is scoped, so create_session()
returned the scheduler's own session and committed and closed it on
exit, in the middle of the batch.
A second call site with the same bug (a cleared task instance reported
terminated) was superseded by #73554, which replaced that whole code
path with TaskInstance.complete_restart(), already passing the
scheduler's session correctly.1 parent 28e7c89 commit 84fca1f
2 files changed
Lines changed: 34 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1671 | 1671 | | |
1672 | 1672 | | |
1673 | 1673 | | |
1674 | | - | |
| 1674 | + | |
1675 | 1675 | | |
1676 | 1676 | | |
1677 | 1677 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
762 | 795 | | |
763 | 796 | | |
764 | 797 | | |
| |||
0 commit comments