Repository navigation
Commit 3d8e2a3
committed
Let the HITL review plugin address one loop pass or mapped slot
The plugin located a task instance by (task_id, map_index) and stored its review
state as XCom under that address. With loop passes sharing a task id and map
index that picks an arbitrary pass, so approving or rejecting could resolve
another pass's session and write the human action to it.
The plugin endpoints now take region_id and region_index and resolve them by
the same live-producer rules as the public API, so an ambiguous selection is
rejected instead of guessed. Reading, writing and checking completion all use
that exact attempt. The review UI forwards the selected task instance's region
coordinates when the host provides them. The plugin also runs on hosts that
predate regions, where an unknown region_id would break the request, so a host
without task instance context keeps the map-only request shape. A modern host
that has not resolved a selection renders no session rather than opening another
task's.
Tests that re-fetch a task instance to run it need the region too, otherwise
they run another pass's row.1 parent 6adc196 commit 3d8e2a3
13 files changed
Lines changed: 745 additions & 43 deletions
File tree
- devel-common/src/tests_common/test_utils
- providers/common/ai
- docs
- src/airflow/providers/common/ai/plugins
- www
- src
- components
- hooks
- tests
- tests/unit/common/ai/plugins
- scripts/ci/prek
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
| 157 | + | |
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
170 | 175 | | |
171 | 176 | | |
172 | 177 | | |
| |||
0 commit comments