Fix map_index_template not rendered for sensors in reschedule mode#67867
Fix map_index_template not rendered for sensors in reschedule mode#67867GayathriSrividya wants to merge 1 commit into
Conversation
b606b2d to
7cd80e8
Compare
|
Did you check #67521 (comment) ? Were you able to reproduce the behaviour? Could you post screenshots and/or videos of before/after |
When a sensor is rescheduled, the rendered_map_index was not being persisted to the database. The TIRescheduleStatePayload was missing the rendered_map_index field that all other terminal state payloads have (retry, succeed, skip). The reschedule route handler creates a brand-new UPDATE query for the reschedule-specific columns, discarding the initial one — so the field had to be explicitly added to that new query as well. Changes: - Add rendered_map_index to TIRescheduleStatePayload server-side datamodel - Update reschedule route handler to write rendered_map_index to the DB - Add Cadwyn version migration AddRenderedMapIndexToReschedulePayload - Update _generated.py (task-sdk client model) to include the field - Pass rendered_map_index in RescheduleTask message from task runner - Save _rendered_map_index from RescheduleTask in supervisor - Add test for rendered_map_index in reschedule mode closes: apache#67521
7cd80e8 to
d9ef5af
Compare
I checked that comment and re-verified the behavior. Yes, I was able to reproduce the issue on an affected release ref: Fresh clone at main Main includes rendered_map_index in the reschedule path and does not show the same issue. If you want, I can also push a short reproduction note to the PR description with exact commands used. |
closes: #67521
When a sensor is configured with `map_index_template` and runs in reschedule mode, the rendered label was not being persisted to the database on each reschedule. As a result, the task instance's `rendered_map_index` column was left NULL, causing the UI to display the raw numeric `map_index` (e.g. "0", "1") instead of the human-readable rendered label.
Root cause: `TIRescheduleStatePayload` was missing the `rendered_map_index` field that all other terminal/retry state payloads have (`TIRetryStatePayload`, `TaskState`). The reschedule route handler builds a brand-new `UPDATE` query for the reschedule-specific columns (discarding the initial shared one), so the field had to be explicitly included in that new query as well.
Changes: