Reject zero step in mapped XCom slices#70124
Conversation
|
cc @jason810496, @henry3260. 🙌 |
There was a problem hiding this comment.
Thanks for the fix!
IMO, I don't think this needs a new API version migration though. The old behavior (silently treating step=0 as step=1) is exactly the bug being fixed — preserving it for clients declaring older API versions means their malformed requests keep being silently misinterpreted, which is what #70123 wants to surface.
A zero slice step is invalid sequence semantics, but the endpoint silently treated it as one and hid malformed client requests. Signed-off-by: viiccwen <vicwen@apache.org>
67ace09 to
2cdaadd
Compare
Sure, that makes sense. I just updated. |
closes #70123
A mapped XCom slice with
step=0is invalid, but the endpoint silently treated it asstep=1, hiding malformed client requests.This change returns HTTP 422 with an
invalid_stepresponse for every Execution API version. The default step of1is now applied only when the parameter is omitted, preserving positive and negative step behavior.Was generative AI tooling used to co-author this PR?
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.