kaxil commented on code in PR #74773:
URL: https://github.com/apache/airflow/pull/74773#discussion_r4319948298


##########
airflow-core/src/airflow/api_fastapi/core_api/datamodels/task_instances.py:
##########
@@ -54,7 +54,7 @@ class LoopIterationResponse(BaseModel):
     """A task execution's position in an enclosing loop."""
 
     loop_id: str
-    iteration: int
+    iteration: int = Field(ge=1, description="Position in the enclosing loop, 
counting from one.")

Review Comment:
   3.4.0b1 already created loop passes at index 0 and nothing renumbers them on 
upgrade, so on a DB carried over from b1 a pass-0 row fails `ge=1` when the 
response is serialized, and the TI list or gantt for that run returns a 500 
instead of rendering. `LoopContext.index` has the same issue for a cleared 
pass-0 TI at `ti_run`. Only beta users can hit this, but would it be simpler to 
keep the bound on the `?iteration=` query param and leave the response models 
unconstrained? Otherwise a line in the release notes for b1 testers.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to