This is an automated email from the ASF dual-hosted git repository.
potiuk 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 49ce3ed006 Remove backcompat code for stackdriver (#36442)
49ce3ed006 is described below
commit 49ce3ed00677d899e3f7d62ce82577882feeb42e
Author: Jarek Potiuk <[email protected]>
AuthorDate: Thu Dec 28 02:46:20 2023 +0100
Remove backcompat code for stackdriver (#36442)
Remove back-compatibility code for stackdriver now that we are
at >= 2.6.0.
This caused problems recently with flaky / leaking tests but
hopefully #36455 fixed the triggering mechanism for that flaky
test and this one should succeed now.
---
airflow/providers/google/cloud/log/stackdriver_task_handler.py | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/airflow/providers/google/cloud/log/stackdriver_task_handler.py
b/airflow/providers/google/cloud/log/stackdriver_task_handler.py
index bf0e3bf4fb..0a473c3b02 100644
--- a/airflow/providers/google/cloud/log/stackdriver_task_handler.py
+++ b/airflow/providers/google/cloud/log/stackdriver_task_handler.py
@@ -30,21 +30,13 @@ from google.cloud.logging_v2.types import
ListLogEntriesRequest, ListLogEntriesR
from airflow.providers.google.cloud.utils.credentials_provider import
get_credentials_and_project_id
from airflow.providers.google.common.consts import CLIENT_INFO
+from airflow.utils.log.trigger_handler import ctx_indiv_trigger
if TYPE_CHECKING:
- from contextvars import ContextVar
-
from google.auth.credentials import Credentials
from airflow.models import TaskInstance
-try:
- # todo: remove this conditional import when min airflow version >= 2.6
- ctx_indiv_trigger: ContextVar | None
- from airflow.utils.log.trigger_handler import ctx_indiv_trigger
-except ImportError:
- ctx_indiv_trigger = None
-
DEFAULT_LOGGER_NAME = "airflow"
_GLOBAL_RESOURCE = Resource(type="global", labels={})