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

eladkal 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 8ff744f7e4a Fix opensearch provider to use SDK imports for Airflow 
3.2+ (#65076)
8ff744f7e4a is described below

commit 8ff744f7e4a13d8277fbfea3795015df7bf992e1
Author: Jeongwoo Do <[email protected]>
AuthorDate: Sun Apr 12 17:28:14 2026 +0900

    Fix opensearch provider to use SDK imports for Airflow 3.2+ (#65076)
---
 .../src/airflow/providers/opensearch/log/os_task_handler.py          | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py 
b/providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py
index 300739b52e5..f3b921b78b2 100644
--- 
a/providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py
+++ 
b/providers/opensearch/src/airflow/providers/opensearch/log/os_task_handler.py
@@ -44,7 +44,6 @@ from airflow.providers.common.compat.sdk import 
AirflowException, conf
 from airflow.providers.opensearch.log.os_json_formatter import 
OpensearchJSONFormatter
 from airflow.providers.opensearch.log.os_response import Hit, 
OpensearchResponse
 from airflow.providers.opensearch.version_compat import AIRFLOW_V_3_0_PLUS, 
AIRFLOW_V_3_2_PLUS
-from airflow.utils import timezone
 from airflow.utils.log.file_task_handler import FileTaskHandler
 from airflow.utils.log.logging_mixin import ExternalLoggingMixin, LoggingMixin
 from airflow.utils.session import create_session
@@ -61,6 +60,10 @@ if AIRFLOW_V_3_0_PLUS:
 else:
     OsLogMsgType = list[tuple[str, str]]  # type: ignore[assignment,misc]
 
+if AIRFLOW_V_3_2_PLUS:
+    from airflow.sdk import timezone
+else:
+    from airflow.utils import timezone  # type: ignore[attr-defined,no-redef]
 
 USE_PER_RUN_LOG_ID = hasattr(DagRun, "get_log_template")
 LOG_LINE_DEFAULTS = {"exc_text": "", "stack_info": ""}

Reply via email to