Repository navigation
[airflow-ctl/v0-1-test] Add the awaiting_input task instance state (#68028) - #76118
Merged
shahar1 merged 1 commit intoOct 31, 2026
Merged
Conversation
Airflow 3.3.0+ servers emit the task-instance state awaiting_input for Human-in-the-loop tasks (upstream apache#68028, b64a0e6). airflowctl's TaskInstanceState lacked the value, so taskinstances list, tasks states-for-dag-run and the tasks clear preview crashed with a pydantic ValidationError whenever such a task instance existed on a 3.3.x or 3.4.0rc1 server. 3.2.x servers never emit the value, so the client is a strict superset there. Only the enum value and what the branch's generators derive from it are backported, following 290f022: core utils/state.py (IntermediateTIState and TaskInstanceState, needed so the generate-openapi-spec output and the test_state union invariant stay consistent), both OpenAPI yamls, the UI openapi-gen ts files and the task-sdk datamodels. Left out on purpose because airflow-core, task-sdk and the UI are not released from this branch: the State.AWAITING_INPUT alias, the state_color and State.unfinished entries, TaskInstanceStateCount.awaiting_input, the UI icon and theme entries, the scheduler and HITL routes, and the edge3 provider spec (providers/edge3/.../v2-edge-generated.yaml), whose hook only fires on edge worker_api changes. Widening IntermediateTIState also widens the execution API's TITargetStatePayload.state and the task-sdk model without a Cadwyn version bump, as upstream did; this has no runtime effect on this branch.
shahar1
requested review from
amoghrajesh,
ashb,
bbovenzi,
bugraoz93,
choo121600,
dheerajturaga,
ephraimbuddy,
guan404ming,
jason810496,
kaxil,
pierrejeambrun,
potiuk,
rawwar,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
October 31, 2026 07:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Partial backport of #68028 to
airflow-ctl/v0-1-test, following the precedent of #76076 (DagRunTypefor #63733): only the enum value and what is generated from it are backported, not the Human-in-the-loop feature itself.airflowctl 0.1.x is generated from the 3.2.1 API spec, so its
TaskInstanceStatehas noawaiting_input. Against an Airflow 3.3+ API server,taskinstances listandtasks states-for-dag-runcrash with a pydanticValidationErroras soon as a Dag run contains a HITL task waiting for input. Adding the member lets 0.1.6 read those task instances from 3.3.x and 3.4.x servers while still working against 3.2.x (the value is never sent by older servers).As in #76076, the core enum (
airflow-core/src/airflow/utils/state.py), both OpenAPI yamls, the generated UI types and the task-sdk mirror are updated soairflow-ctl/src/airflowctl/api/datamodels/generated.pystays regenerable from this branch; the upstreamStatehelper sets are intentionally not extended here (same choice as #76076).Tested:
breeze testing airflow-ctl-tests: 562 passed (new test:test_task_instance_state_accepts_awaiting_input, which fails without the change).apache/airflow:3.3.2-python3.12and3.4.0rc1-python3.12servers with a HITL task parked inawaiting_input:taskinstances listandtasks states-for-dag-runreturn the state instead of a traceback; against3.2.2-python3.12behaviour is unchanged.breeze testing airflow-ctl-integration-testsagainst 3.2.2, 3.3.2 and 3.4.0rc1 with the three 0.1.6 fixes combined: identical results to the unpatched branch (the suite has no HITL case).Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Fable 5.1) following the guidelines