Skip to content

Commit

Permalink
Remove backcompat code for stackdriver (#36442)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
potiuk committed Dec 28, 2023
1 parent 8fea49f commit 49ce3ed
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions airflow/providers/google/cloud/log/stackdriver_task_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,13 @@

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={})

Expand Down

0 comments on commit 49ce3ed

Please sign in to comment.