Skip to content

Commit

Permalink
Don't cache Google Secret Manager client (#17539)
Browse files Browse the repository at this point in the history
Caching the Google Secret Manager client doesn't work in all cases, so
create it fresh each time.
  • Loading branch information
jedcunningham authored Aug 11, 2021
1 parent 8bd748d commit b06d528
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions airflow/providers/google/cloud/secrets/secret_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
import logging
from typing import Optional

try:
from functools import cached_property
except ImportError:
from cached_property import cached_property

from google.auth.exceptions import DefaultCredentialsError

from airflow.exceptions import AirflowException
Expand Down Expand Up @@ -121,10 +116,10 @@ def __init__(
if project_id:
self.project_id = project_id

@cached_property
@property
def client(self) -> _SecretManagerClient:
"""
Cached property returning secret client.
Property returning secret client.
:return: Secrets client
"""
Expand Down

0 comments on commit b06d528

Please sign in to comment.