Repository navigation
UI: Add 'Mark as Skipped' option to Task Instance actions - #72425
Conversation
The previous prettier auto-fix collapsed the translate() call but also dropped the blank line before return, tripping padding-line-between-statements.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
This PR has been open for a bit and all CI checks are now green (Static checks, and Chromium/Firefox/WebKit UI e2e tests). It's a small, self-contained UI addition — exposing the existing "skipped" state (already supported by the backend API) as a "Mark as Skipped" option for Task Instances, matching the existing "Mark as Success/Failed" pattern. Would appreciate a review when anyone has a moment! cc @bbovenzi @pierrejeambrun (saw you both active on related MarkAs/multi-team UI work recently) |
|
Sorry, I think this feature request needed more of a discussion before a code review. I am not sure if Mark as skipped is something we want to allow. |
|
Thanks for taking a look, and no problem — agreed it makes sense to settle the behavior first. I'll convert this to a draft and follow the discussion on #72386. For context, the public API's PATCH task instance endpoint already accepts skipped as new_state (see PatchTaskInstanceBody.validate_new_state), so this PR only exposes that existing capability in the UI. If the consensus is to restrict it — e.g. only for task instances that haven't started yet — I'm happy to adjust the PR accordingly, or close it if it's not something we want. |
There was a problem hiding this comment.
Following the discussion on the linked issue do you mind updating the doc as well to highlight the common pitfall / nuances.
Also we might want to add an "info" text in the modal to highlight what 'mark as skip' is doing and also explain the gotchas there.
Also need gate on the tasks states we're setting to 'pending' (as mentioned in the discussion)
|
Thanks for the review and the discussion on #72386! Before updating the PR, I'd like to confirm two details:
I'd also suggest limiting this PR to single task instances (dropping skipped from the task group and bulk actions) to keep the scope manageable, unless you'd prefer otherwise. Then I'll add the info text in the modal and a docs note on the cascade-skip behavior with the default |
|
|
Thanks @bbovenzi and @pierrejeambrun! Updated following the discussion:
I kept the gate in the UI for now; enforcing it in the PATCH endpoint could be a follow-up PR if you'd like. Verified locally with a Dag mirroring the use case from #72386 (
After confirming, |




closes: #72386
Description
Currently, the Airflow 3 UI only allows operators to manually mark a Task Instance as Success or Failed, but does not expose the option to mark it as Skipped.
However, the backend API (
PatchTaskInstanceBody.validate_new_state) already acceptsTaskInstanceState.SKIPPEDas a valid target state. Marking a task asSUCCESSvsSKIPPEDhas distinct semantics in execution history, audit logs, and downstream trigger rule evaluation (e.g.,none_failedvsnone_skipped).This PR:
allowedStatesinsrc/components/MarkAs/utils.tsinto:allowedRunStates:["success", "failed"](maintaining the existing constraint that Dag Runs cannot be marked skipped)allowedTaskStates:["success", "failed", "skipped"](enabling skipped for task instances and task groups)MarkTaskInstanceAsButton,MarkTaskGroupAsButton, andBulkMarkTaskInstancesAsButtonto useallowedTaskStates.skippedinen/dags.json.Screenshots
Was generative AI tooling used to co-author this PR?
Generated-by: Antigravity IDE following the guidelines