Skip to content

Conversation

@Lee-W
Copy link
Member

@Lee-W Lee-W commented Sep 22, 2025

Why

Closes: #54956

What

  • Add HITLDetailHistory model
  • Record a HITLDetailHistory if TaskInstance has a HITLDetail when recording a TaskInstanceHistory
  • Add hitl_detail to get task_instance try and get task_instance tries APIs

^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@Lee-W Lee-W force-pushed the hitl-history branch 3 times, most recently from f87df88 to 681b9e9 Compare September 23, 2025 14:47
@Lee-W Lee-W marked this pull request as ready for review September 23, 2025 23:37
@Lee-W Lee-W changed the title feat(hitl): hitl history feat(hitl): Add HITLDetailHistory Sep 24, 2025
@Lee-W Lee-W moved this to In review in AIP-90 - Human in the loop Sep 24, 2025
Copy link
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! LGTM overall.

@jason810496
Copy link
Member

jason810496 commented Sep 25, 2025

I found that the test cases for the whole TaskInstanceHistory model are missing. Maybe we should cover the test cases in further PR. Or maybe adding another test method for HITLDetailHistory like

def test_task_instance_history_is_created_when_ti_goes_for_retry(self, dag_maker, session):
with dag_maker(serialized=True):
would be enough.

@Lee-W Lee-W force-pushed the hitl-history branch 3 times, most recently from bbaa9e2 to 4940d6e Compare September 28, 2025 06:02
@Lee-W
Copy link
Member Author

Lee-W commented Sep 28, 2025

I found that the test cases for the whole TaskInstanceHistory model are missing. Maybe we should cover the test cases in further PR. Or maybe adding another test method for HITLDetailHistory like

def test_task_instance_history_is_created_when_ti_goes_for_retry(self, dag_maker, session):
with dag_maker(serialized=True):

would be enough.

Thanks! Just added

Copy link
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!

Copy link
Member

@jason810496 jason810496 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall, only a small final question

@ashb
Copy link
Member

ashb commented Oct 6, 2025

@Lee-W Please don't use "conventional commits" in PR titles (feat(hitl): etc) but instead either mark this with the label changelog-skip, or make the PR title a short readable sentence/statement.

@Lee-W Lee-W changed the title feat(hitl): Add HITLDetailHistory Add HITLDetailHistory Oct 8, 2025
@Lee-W Lee-W marked this pull request as draft October 8, 2025 19:24
@Lee-W Lee-W force-pushed the hitl-history branch 3 times, most recently from 7b7bcf7 to c5305ca Compare October 13, 2025 11:00
@Lee-W Lee-W marked this pull request as ready for review October 13, 2025 11:04
@Lee-W
Copy link
Member Author

Lee-W commented Oct 14, 2025

Hey @bbovenzi , would love to check with you before we merge this one. Thanks!

@Lee-W Lee-W merged commit b0421df into apache:main Oct 15, 2025
111 checks passed
@Lee-W Lee-W deleted the hitl-history branch October 15, 2025 09:15
@github-project-automation github-project-automation bot moved this from In review to Done in AIP-90 - Human in the loop Oct 15, 2025
Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

snreddygopu pushed a commit to Teradata/airflow that referenced this pull request Oct 16, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 17, 2025
@Lee-W Lee-W mentioned this pull request Oct 17, 2025
abdulrahman305 bot pushed a commit to abdulrahman305/airflow that referenced this pull request Oct 19, 2025
TyrellHaywood pushed a commit to TyrellHaywood/airflow that referenced this pull request Oct 22, 2025
@pierrejeambrun pierrejeambrun added this to the Airflow 3.2.0 milestone Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Missing review history when tasks are cleared (HITL)

5 participants