Under which category would you file this issue?
Airflow Core
Apache Airflow version
main
What happened and how to reproduce it?
The Execution API endpoint for reading a mapped XCom sequence slice accepts step=0 and silently treats it as step=1. A zero slice step is invalid sequence semantics, so this hides malformed requests from Task SDK clients.
Steps to reproduce:
-
Start the Airflow development environment from the main branch.
-
Send the following request through an authenticated Execution API client:
GET /execution/xcoms/dag/runid/task/xcom_1/slice?step=0
-
Observe that the endpoint responds with HTTP 200 instead of rejecting the invalid step:
The behavior comes from using params.step or 1, which converts the valid integer value 0 to the default step of 1.
What you think should happen instead?
The current Execution API version should reject step=0 with HTTP 422 before querying XCom data. Older
released API versions should retain their existing behavior through the Execution API versioning layer.
Omitted, positive, and negative step values should remain unchanged.
Operating System
No response
Deployment
None
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Under which category would you file this issue?
Airflow Core
Apache Airflow version
mainWhat happened and how to reproduce it?
The Execution API endpoint for reading a mapped XCom sequence slice accepts
step=0and silently treats it asstep=1. A zero slice step is invalid sequence semantics, so this hides malformed requests from Task SDK clients.Steps to reproduce:
Start the Airflow development environment from the
mainbranch.Send the following request through an authenticated Execution API client:
Observe that the endpoint responds with HTTP 200 instead of rejecting the invalid step:
The behavior comes from using
params.step or 1, which converts the valid integer value0to the default step of1.What you think should happen instead?
The current Execution API version should reject
step=0with HTTP 422 before querying XCom data. Olderreleased API versions should retain their existing behavior through the Execution API versioning layer.
Omitted, positive, and negative step values should remain unchanged.
Operating System
No response
Deployment
None
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct