pierrejeambrun commented on code in PR #45349:
URL: https://github.com/apache/airflow/pull/45349#discussion_r1924070209
##########
airflow/ui/src/queries/useClearTaskInstances.ts:
##########
@@ -60,13 +60,21 @@ export const useClearTaskInstances = ({
onSuccessDryRun(data);
} else {
const taskInstanceKeys = (variables.requestBody.task_ids ?? [])
+ .filter(
+ (taskId): taskId is string | [string, number] =>
+ typeof taskId === "string" || Array.isArray(taskId),
+ )
.map((taskId) => {
+ // Determine the actual task_id
+ const actualTaskId = Array.isArray(taskId) ? taskId[0] : taskId;
Review Comment:
Also we need to adapt the front-end code to support a single map-index
clearing. That can be a follow up PR though.
--
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]