Skip to content

Refuse Human-in-the-loop responses once the task stopped waiting (#75645) - #75706

Merged
vatsrahul1001 merged 1 commit into
apache:v3-4-testfrom
astronomer:backport-d1491b8-v3-4-test
Oct 27, 2026
Merged

vatsrahul1001 merged 1 commit into
apache:v3-4-testfrom
astronomer:backport-d1491b8-v3-4-test

Conversation

@Lee-W

@Lee-W Lee-W commented Oct 27, 2026

Copy link
Copy Markdown
Member
  • Refuse Human-in-the-loop responses once the task stopped waiting

The hitlDetails PATCH recorded a response whenever none existed yet and only resumed the task if it was still awaiting input or deferred. After a response_timeout without defaults, an answer was stored and returned 200 although nothing resumed, so the UI reported success for a decision that never took effect.

Return 409 before writing when the task instance is in any other state. The check runs under the existing task instance lock, after the authorization and option validation, and looks at the state only: a request whose timeout has passed but that the scheduler has not yet processed is still accepted.

  • Show why the backend refused a Human-in-the-loop response

The error toast showed only the HTTP status text ("Conflict") when a response was refused. Show the detail the backend returns, such as that the task is no longer waiting for a response, and fall back to the previous message when there is none.

  • Cover the refusal toast for validation, mapping, missing and forbidden details

(cherry picked from commit d1491b8)


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

…che#75645)

* Refuse Human-in-the-loop responses once the task stopped waiting

The hitlDetails PATCH recorded a response whenever none existed yet and
only resumed the task if it was still awaiting input or deferred. After
a response_timeout without defaults, an answer was stored and returned
200 although nothing resumed, so the UI reported success for a decision
that never took effect.

Return 409 before writing when the task instance is in any other state.
The check runs under the existing task instance lock, after the
authorization and option validation, and looks at the state only: a
request whose timeout has passed but that the scheduler has not yet
processed is still accepted.

* Show why the backend refused a Human-in-the-loop response

The error toast showed only the HTTP status text ("Conflict") when a
response was refused. Show the detail the backend returns, such as that
the task is no longer waiting for a response, and fall back to the
previous message when there is none.

* Cover the refusal toast for validation, mapping, missing and forbidden details

(cherry picked from commit d1491b8)
@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. labels Oct 27, 2026
@vatsrahul1001
vatsrahul1001 merged commit b85a3e6 into apache:v3-4-test Oct 27, 2026
83 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-d1491b8-v3-4-test branch October 27, 2026 05:40
@github-actions github-actions Bot added this to the Airflow 3.4.1 milestone Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.4.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.

@Lee-W Lee-W modified the milestones: Airflow 3.4.1, Airflow 3.4.0 Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants