Skip to content

Conversation

@Lee-W
Copy link
Member

@Lee-W Lee-W commented Aug 11, 2025

Why

Adding a HITLDetail with options and updating a HITLDetail with empty chosen_options should not be allowed.

close: #54265

What

  1. Add validate_options method for HITLOperator to check options
  2. Add min_length=1 restriction to insert or update that contains chosen_options

^ 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.

@boring-cyborg boring-cyborg bot added area:airflow-ctl area:API Airflow's REST/HTTP API area:providers area:task-sdk area:UI Related to UI/UX. For Frontend Developers. provider:standard labels Aug 11, 2025
@Lee-W Lee-W force-pushed the guard-hitl-empty-option branch from 16e2c5b to d02b266 Compare August 11, 2025 13:07
@Lee-W Lee-W self-assigned this Aug 11, 2025
@Lee-W Lee-W marked this pull request as ready for review August 11, 2025 14:46
@Lee-W Lee-W force-pushed the guard-hitl-empty-option branch from d02b266 to 9d827f4 Compare August 11, 2025 15:20
@Lee-W Lee-W force-pushed the guard-hitl-empty-option branch from 9d827f4 to 470d5c5 Compare August 12, 2025 01:52
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.

Nice! LGTM, nice to see more validations at API data model level.

@Lee-W Lee-W merged commit 815e983 into apache:main Aug 12, 2025
105 checks passed
@Lee-W Lee-W deleted the guard-hitl-empty-option branch August 12, 2025 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl area:API Airflow's REST/HTTP API area:providers area:task-sdk area:UI Related to UI/UX. For Frontend Developers. provider:standard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Block empty "chosen_options" from API

2 participants