Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a830fc0
fix(hitl): rename respondants as assignees and user HITLUser to align…
Lee-W Sep 10, 2025
231a224
fixup! fix(hitl): rename respondants as assignees and user HITLUser t…
Lee-W Sep 10, 2025
2287d40
fixup! fixup! fix(hitl): rename respondants as assignees and user HIT…
Lee-W Sep 10, 2025
79e3dfd
fixup! fixup! fixup! fix(hitl): rename respondants as assignees and u…
Lee-W Sep 10, 2025
23d7478
fixup! fixup! fixup! fixup! fix(hitl): rename respondants as assignee…
Lee-W Sep 10, 2025
af475f1
fixup! fixup! fixup! fixup! fixup! fix(hitl): rename respondants as a…
Lee-W Sep 10, 2025
ccbccf6
fixup! fixup! fixup! fixup! fixup! fixup! fix(hitl): rename respondan…
Lee-W Sep 10, 2025
9faff50
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fix(hitl): rename re…
Lee-W Sep 10, 2025
2434492
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fix(hitl): re…
Lee-W Sep 10, 2025
d740171
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fix(hi…
Lee-W Sep 10, 2025
e83966a
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Lee-W Sep 10, 2025
132e80d
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Lee-W Sep 10, 2025
f9b1c98
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Lee-W Sep 10, 2025
510c86d
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Lee-W Sep 10, 2025
7c289ca
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Lee-W Sep 10, 2025
4e7e113
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Lee-W Sep 10, 2025
82a5a40
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Lee-W Sep 10, 2025
a11b3cb
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Lee-W Sep 11, 2025
d4f7d89
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup!…
Lee-W Sep 11, 2025
4f5d18f
feat(hitl): adding responded_by_user to HITLTriggerEventSuccessPayload
Lee-W Sep 11, 2025
d1688f5
fixup! fixup! fixup! fixup! docs(hitl): add assigned_user to example
Lee-W Sep 11, 2025
643a639
docs(hitl): add assigned_user to example
Lee-W Sep 11, 2025
16af873
fixup! docs(hitl): add assigned_user to example
Lee-W Sep 11, 2025
ec05e8a
fixup! fixup! docs(hitl): add assigned_user to example
Lee-W Sep 11, 2025
c1d0fd6
fixup! fixup! fixup! docs(hitl): add assigned_user to example
Lee-W Sep 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion airflow-core/docs/img/airflow_erd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c05cefbe080ed889ebe132a0285756db477ff28256bbc1e86da1e053873f6478
e491b0c58188f06ab4696cc09c765413065069f90d78e27eb53fdac5e2e92c82
120 changes: 58 additions & 62 deletions airflow-core/docs/img/airflow_erd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions airflow-core/docs/tutorial/hitl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ Approval or Rejection
---------------------

A specialized form of option selection, which has only 'Approval' and 'Rejection' as options.
You can also set the ``assigned_users`` to restrict the users allowed to respond for a HITL operator.
It should be a list of user ids and user names (both needed) (e.g., ``[{"id": "1", "name": "user1"}, {"id": "2", "name": "user2"}]``.
ONLY the users within this list will be allowed to respond.

.. exampleinclude:: /../../providers/standard/src/airflow/providers/standard/example_dags/example_hitl_operator.py
:language: python
Expand Down
9 changes: 5 additions & 4 deletions airflow-core/src/airflow/api_fastapi/common/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,27 +1022,28 @@ def _optional_boolean(value: bool | None) -> bool | None:
)
),
]

QueryHITLDetailRespondedUserIdFilter = Annotated[
FilterParam[list[str]],
Depends(
filter_param_factory(
HITLDetail.responded_user_id,
HITLDetail.responded_by_user_id,
list[str],
FilterOptionEnum.ANY_EQUAL,
default_factory=list,
filter_name="responded_user_id",
filter_name="responded_by_user_id",
)
),
]
QueryHITLDetailRespondedUserNameFilter = Annotated[
FilterParam[list[str]],
Depends(
filter_param_factory(
HITLDetail.responded_user_name,
HITLDetail.responded_by_user_name,
list[str],
FilterOptionEnum.ANY_EQUAL,
default_factory=list,
filter_name="responded_user_name",
filter_name="responded_by_user_name",
)
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,19 @@ class UpdateHITLDetailPayload(BaseModel):
class HITLDetailResponse(BaseModel):
"""Response of updating a Human-in-the-loop detail."""

responded_user_id: str
responded_user_name: str
responded_by: HITLUser
response_at: datetime
chosen_options: list[str] = Field(min_length=1)
params_input: Mapping = Field(default_factory=dict)


class HITLUser(BaseModel):
"""Schema for a Human-in-the-loop users."""

id: str
name: str


class HITLDetail(BaseModel):
"""Schema for Human-in-the-loop detail."""

Expand All @@ -56,11 +62,10 @@ class HITLDetail(BaseModel):
defaults: list[str] | None = None
multiple: bool = False
params: dict[str, Any] = Field(default_factory=dict)
respondents: list[str] | None = None
assigned_users: list[HITLUser] = Field(default_factory=list)

# Response Content Detail
responded_user_id: str | None = None
responded_user_name: str | None = None
responded_by_user: HITLUser | None = None
response_at: datetime | None = None
chosen_options: list[str] | None = None
params_input: dict[str, Any] = Field(default_factory=dict)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1994,23 +1994,15 @@ components:
additionalProperties: true
type: object
title: Params
respondents:
anyOf:
- items:
type: string
type: array
- type: 'null'
title: Respondents
responded_user_id:
anyOf:
- type: string
- type: 'null'
title: Responded User Id
responded_user_name:
assigned_users:
items:
$ref: '#/components/schemas/HITLUser'
type: array
title: Assigned Users
responded_by_user:
anyOf:
- type: string
- $ref: '#/components/schemas/HITLUser'
- type: 'null'
title: Responded User Name
response_at:
anyOf:
- type: string
Expand Down Expand Up @@ -2039,6 +2031,20 @@ components:
- subject
title: HITLDetail
description: Schema for Human-in-the-loop detail.
HITLUser:
properties:
id:
type: string
title: Id
name:
type: string
title: Name
type: object
required:
- id
- name
title: HITLUser
description: Schema for a Human-in-the-loop users.
HTTPExceptionResponse:
properties:
detail:
Expand Down
Loading