pierrejeambrun commented on code in PR #45349:
URL: https://github.com/apache/airflow/pull/45349#discussion_r1922131854
##########
airflow/api_fastapi/core_api/datamodels/task_instances.py:
##########
@@ -168,7 +168,7 @@ class ClearTaskInstancesBody(BaseModel):
only_failed: bool = True
only_running: bool = False
reset_dag_runs: bool = True
- task_ids: list[str] | None = None
+ task_ids: list[str | list[str]] | None = None
Review Comment:
This will not work for clearing multiple map index. We are currently
receiving a 500 internal error.
`["task_id", "0", "1"]`, etc... I think we should limit this to a tuple of
`[string, int]` and let the user explode the call if he needs to clear multiple
mapped index. `[["task_id", 0], ["task_id", 1]]`
Or we can keep it like this, but we need to type it better, something like:
`tuple[str, Unpack[tuple[int, ...]]]` but we need to verify that the openapi
/ doc is correct and that the front-end generated code looks good.
--
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]