This is an automated email from the ASF dual-hosted git repository.

weilee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 00b3b14f02a Fix typos in HITL-related code and comments (#54670)
00b3b14f02a is described below

commit 00b3b14f02af3acafc532f410f5c05d77b7efa58
Author: Guan Ming(Wesley) Chiu <[email protected]>
AuthorDate: Thu Aug 21 17:24:27 2025 +0800

    Fix typos in HITL-related code and comments (#54670)
---
 providers/standard/src/airflow/providers/standard/exceptions.py    | 2 +-
 providers/standard/src/airflow/providers/standard/triggers/hitl.py | 4 ++--
 providers/standard/tests/unit/standard/triggers/test_hitl.py       | 6 +++---
 task-sdk/src/airflow/sdk/execution_time/hitl.py                    | 2 +-
 task-sdk/tests/task_sdk/execution_time/test_hitl.py                | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/providers/standard/src/airflow/providers/standard/exceptions.py 
b/providers/standard/src/airflow/providers/standard/exceptions.py
index 6975e0afadf..f47e9f3896f 100644
--- a/providers/standard/src/airflow/providers/standard/exceptions.py
+++ b/providers/standard/src/airflow/providers/standard/exceptions.py
@@ -62,4 +62,4 @@ class HITLTriggerEventError(AirflowException):
 
 
 class HITLTimeoutError(HITLTriggerEventError):
-    """Raised when HILTOperator timeouts."""
+    """Raised when HITLOperator timeouts."""
diff --git a/providers/standard/src/airflow/providers/standard/triggers/hitl.py 
b/providers/standard/src/airflow/providers/standard/triggers/hitl.py
index e65e683b8ff..82ee829ac83 100644
--- a/providers/standard/src/airflow/providers/standard/triggers/hitl.py
+++ b/providers/standard/src/airflow/providers/standard/triggers/hitl.py
@@ -32,7 +32,7 @@ from asgiref.sync import sync_to_async
 
 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
@@ -107,7 +107,7 @@ class HITLTrigger(BaseTrigger):
                     )
                     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,
diff --git a/providers/standard/tests/unit/standard/triggers/test_hitl.py 
b/providers/standard/tests/unit/standard/triggers/test_hitl.py
index ad363a8f5b8..fe7900d3fbd 100644
--- a/providers/standard/tests/unit/standard/triggers/test_hitl.py
+++ b/providers/standard/tests/unit/standard/triggers/test_hitl.py
@@ -70,7 +70,7 @@ class TestHITLTrigger:
 
     @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),
@@ -99,7 +99,7 @@ class TestHITLTrigger:
     @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"],
@@ -131,7 +131,7 @@ class TestHITLTrigger:
     @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))
 
diff --git a/task-sdk/src/airflow/sdk/execution_time/hitl.py 
b/task-sdk/src/airflow/sdk/execution_time/hitl.py
index 8c7d45e6242..500be78ab4e 100644
--- a/task-sdk/src/airflow/sdk/execution_time/hitl.py
+++ b/task-sdk/src/airflow/sdk/execution_time/hitl.py
@@ -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],
diff --git a/task-sdk/tests/task_sdk/execution_time/test_hitl.py 
b/task-sdk/tests/task_sdk/execution_time/test_hitl.py
index a758507e1c8..5ad6733eb08 100644
--- a/task-sdk/tests/task_sdk/execution_time/test_hitl.py
+++ b/task-sdk/tests/task_sdk/execution_time/test_hitl.py
@@ -24,7 +24,7 @@ from airflow.sdk.api.datamodels._generated import 
HITLDetailResponse
 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,
 )
 
@@ -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,
@@ -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},

Reply via email to