pierrejeambrun opened a new pull request, #66146:
URL: https://github.com/apache/airflow/pull/66146

   ## Summary
   
   Wires the API endpoint added in #62812 (`PATCH 
/dags/{dag_id}/dagRuns/{dag_run_id}/taskGroupInstances/{group_id}`) into the UI 
so users can mark a whole task group as `success` / `failed` from the group's 
header card — same surface as today's Clear button on the task group page, and 
same UX as the existing per-task-instance / per-DAG-run "Mark as" actions.
   
   related: #62812
   
   ## What changed
   
   - New components mirroring the existing pattern under 
`src/components/MarkAs/`:
     - `MarkAs/TaskGroup/MarkTaskGroupAsButton.tsx` — menu trigger with 
`success` / `failed` items, `shift+s` / `shift+f` hotkeys (matches 
`MarkTaskInstanceAsButton`).
     - `MarkAs/TaskGroup/MarkTaskGroupAsDialog.tsx` — confirmation dialog with 
`past` / `future` / `upstream` / `downstream` segmented control + 
affected-tasks accordion + note (matches `MarkTaskInstanceAsDialog`).
   - New React Query hooks:
     - `queries/usePatchTaskGroup.ts` — mutation; on success invalidates grid + 
TIs + dry-run query keys.
     - `queries/usePatchTaskGroupDryRun.ts` — query feeding the affected-tasks 
preview.
   - Wired the new button alongside `ClearTaskInstanceButton` in 
`pages/GroupTaskInstance/Header.tsx`.
   - Translation: added `taskGroup_one` / `taskGroup_other` in `en/common.json` 
so the existing `markAs.button` / `markAs.title` keys (which take a `{{type}}` 
placeholder) work.
   
   ## Screenshots
   
   <!-- TODO: drop screenshots here showing:
        1. Task group header with the new mark-as menu open
        2. Mark as Failed dialog with affected tasks + note -->
   
   ## Test plan
   
   - [ ] Navigate to a DAG run with a task group, click the group node in the 
grid, open the group's task instance page header.
   - [ ] Click the new "Mark as..." button — verify the dropdown shows 
`success` / `failed` and the current state's option is disabled.
   - [ ] Pick `success` — dialog opens with affected-tasks preview (downstream 
selected by default), note field, and a confirm button.
   - [ ] Toggle `past` / `future` / `upstream` — affected-tasks preview updates.
   - [ ] Add a note, confirm — group's TIs flip to `success`, note is set on 
each, grid refreshes.
   - [ ] Repeat with `failed`. Verify `shift+s` / `shift+f` hotkeys open the 
dialog with the right state preselected.
   - [ ] Try on a group whose TIs are already in the target state — confirm 
errors with 409.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.7)
   
   Generated-by: Claude Code (Opus 4.7) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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