Skip to content

[v3-3-test] Make airflow dags test wait for Human-in-the-loop input instead of hanging (#68492)#69104

Merged
shahar1 merged 2 commits into
v3-3-testfrom
backport-63cee22-v3-3-test
Jun 28, 2026
Merged

[v3-3-test] Make airflow dags test wait for Human-in-the-loop input instead of hanging (#68492)#69104
shahar1 merged 2 commits into
v3-3-testfrom
backport-63cee22-v3-3-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor
  • Make airflow dags test wait for Human-in-the-loop input instead of hanging

Previously a HITL task that parked in awaiting_input made airflow dags test loop "No tasks to run. unrunnable tasks: ..." once per second
forever, with no way to make progress (the in-process runner also
swallows SIGTERM, so even timeout could not stop it).

dag.test() now treats parked HITL tasks as waiting rather than
unrunnable, and never resolves them itself: the run stays alive, logging
which tasks await input, until a response recorded from outside flips
them back to SCHEDULED -- at which point the existing loop resumes them.
This matches how a parked task behaves on a real deployment, and the
existing response channels work unchanged: the Required Actions UI or
the HITL REST API (PATCH .../hitlDetails) of an api-server sharing the
metadata database (e.g. airflow standalone). Humans and AI agents can
drive HITL pipelines locally by running dags test and submitting the
response through that API.

Interactive console prompting in the dags test CLI is left for a
follow-up.

  • Document the HITL REST API calls for responding during dags test
    (cherry picked from commit 63cee22)

Co-authored-by: Kaxil Naik kaxilnaik@gmail.com

…nstead of hanging (#68492)

* Make airflow dags test wait for Human-in-the-loop input instead of hanging

Previously a HITL task that parked in awaiting_input made `airflow dags
test` loop "No tasks to run. unrunnable tasks: ..." once per second
forever, with no way to make progress (the in-process runner also
swallows SIGTERM, so even `timeout` could not stop it).

dag.test() now treats parked HITL tasks as waiting rather than
unrunnable, and never resolves them itself: the run stays alive, logging
which tasks await input, until a response recorded from outside flips
them back to SCHEDULED -- at which point the existing loop resumes them.
This matches how a parked task behaves on a real deployment, and the
existing response channels work unchanged: the Required Actions UI or
the HITL REST API (PATCH .../hitlDetails) of an api-server sharing the
metadata database (e.g. airflow standalone). Humans and AI agents can
drive HITL pipelines locally by running dags test and submitting the
response through that API.

Interactive console prompting in the dags test CLI is left for a
follow-up.

* Document the HITL REST API calls for responding during dags test
(cherry picked from commit 63cee22)

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
@github-actions github-actions Bot added this to the Airflow 3.3.1 milestone Jun 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.1 based on: merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@shahar1 shahar1 merged commit 2a6d16c into v3-3-test Jun 28, 2026
92 checks passed
@shahar1 shahar1 deleted the backport-63cee22-v3-3-test branch June 28, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants