Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ class HITLTriggerEventError(AirflowException):


class HITLTimeoutError(HITLTriggerEventError):
"""Raised when HILTOperator timeouts."""
"""Raised when HITLOperator timeouts."""
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

from airflow.sdk.execution_time.hitl import (
get_hitl_detail_content_detail,
update_htil_detail_response,
update_hitl_detail_response,
)
from airflow.sdk.timezone import utcnow
from airflow.triggers.base import BaseTrigger, TriggerEvent
Expand Down Expand Up @@ -107,7 +107,7 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
)
return

await sync_to_async(update_htil_detail_response)(
await sync_to_async(update_hitl_detail_response)(
ti_id=self.ti_id,
chosen_options=self.defaults,
params_input=self.params,
Expand Down
6 changes: 3 additions & 3 deletions providers/standard/tests/unit/standard/triggers/test_hitl.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_serialization(self):

@pytest.mark.db_test
@pytest.mark.asyncio
@mock.patch("airflow.sdk.execution_time.hitl.update_htil_detail_response")
@mock.patch("airflow.sdk.execution_time.hitl.update_hitl_detail_response")
async def test_run_failed_due_to_timeout(self, mock_update, mock_supervisor_comms):
trigger = HITLTrigger(
timeout_datetime=utcnow() + timedelta(seconds=0.1),
Expand Down Expand Up @@ -99,7 +99,7 @@ async def test_run_failed_due_to_timeout(self, mock_update, mock_supervisor_comm
@pytest.mark.db_test
@pytest.mark.asyncio
@mock.patch.object(HITLTrigger, "log")
@mock.patch("airflow.sdk.execution_time.hitl.update_htil_detail_response")
@mock.patch("airflow.sdk.execution_time.hitl.update_hitl_detail_response")
async def test_run_fallback_to_default_due_to_timeout(self, mock_update, mock_log, mock_supervisor_comms):
trigger = HITLTrigger(
defaults=["1"],
Expand Down Expand Up @@ -131,7 +131,7 @@ async def test_run_fallback_to_default_due_to_timeout(self, mock_update, mock_lo
@pytest.mark.db_test
@pytest.mark.asyncio
@mock.patch.object(HITLTrigger, "log")
@mock.patch("airflow.sdk.execution_time.hitl.update_htil_detail_response")
@mock.patch("airflow.sdk.execution_time.hitl.update_hitl_detail_response")
async def test_run(self, mock_update, mock_log, mock_supervisor_comms, time_machine):
time_machine.move_to(datetime(2025, 7, 29, 2, 0, 0))

Expand Down
2 changes: 1 addition & 1 deletion task-sdk/src/airflow/sdk/execution_time/hitl.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def upsert_hitl_detail(
)


def update_htil_detail_response(
def update_hitl_detail_response(
ti_id: UUID,
chosen_options: list[str],
params_input: dict[str, Any],
Expand Down
6 changes: 3 additions & 3 deletions task-sdk/tests/task_sdk/execution_time/test_hitl.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from airflow.sdk.execution_time.comms import CreateHITLDetailPayload
from airflow.sdk.execution_time.hitl import (
get_hitl_detail_content_detail,
update_htil_detail_response,
update_hitl_detail_response,
upsert_hitl_detail,
)

Expand Down Expand Up @@ -56,7 +56,7 @@ def test_upsert_hitl_detail(mock_supervisor_comms) -> None:
)


def test_update_htil_detail_response(mock_supervisor_comms) -> None:
def test_update_hitl_detail_response(mock_supervisor_comms) -> None:
timestamp = timezone.utcnow()
mock_supervisor_comms.send.return_value = HITLDetailResponse(
response_received=True,
Expand All @@ -65,7 +65,7 @@ def test_update_htil_detail_response(mock_supervisor_comms) -> None:
user_id="admin",
params_input={"input_1": 1},
)
resp = update_htil_detail_response(
resp = update_hitl_detail_response(
ti_id=TI_ID,
chosen_options=["Approve"],
params_input={"input_1": 1},
Expand Down
Loading