Fix cursor encoding for column-form SortParam to_replace#67973
Fix cursor encoding for column-form SortParam to_replace#67973GayathriSrividya wants to merge 2 commits into
Conversation
pierrejeambrun
left a comment
There was a problem hiding this comment.
Thanks for tracking this down and following the issue's analysis — the run_after 500 is real and this is close.
One thing I'd change before merge: returning getattr(row, name, None) for column-form to_replace fixes run_after/logical_date (those are association_proxy on TaskInstance), but data_interval_start/data_interval_end aren't attributes on TaskInstance, so they resolve to None. A None cursor value becomes the pagination anchor, so the next-page WHERE compares against NULL, matches nothing, and the next page comes back empty with a 200 — arguably worse than the current 500, since it silently drops rows instead of erroring. The original NotImplementedError was guarding exactly this.
Could we keep the loud failure for keys the model doesn't expose, while resolving the ones it does (see the inline suggestion)? Also looks like it needs a rebase — it's currently conflicting with main.
|
@GayathriSrividya A few things need addressing before review — see our Pull Request quality criteria.
No rush. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
ef4fc13 to
9c26850
Compare
7ab6f8a to
8d94ea7
Compare
@potiuk Resolved — rebased on latest main, all reviewer suggestions applied. |
3b80ece to
e4f2159
Compare
e4f2159 to
061ebcd
Compare
closes #67970
Summary
Why
Task Instances sorting by run_after/logical_date/data_interval_* uses column-form to_replace mappings. Cursor encoding previously raised NotImplementedError when has_next=true, causing HTTP 500.
Validation