jscheffl commented on code in PR #60532:
URL: https://github.com/apache/airflow/pull/60532#discussion_r2724162642
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/hooks/kubernetes.py:
##########
@@ -816,48 +816,54 @@ def __init__(
self.config_dict = config_dict
self._extras: dict | None = connection_extras
self._event_polling_fallback = False
+ self._config_loaded = False
async def _load_config(self):
- """Return Kubernetes API session for use with requests."""
+ """Load Kubernetes configuration once per hook instance."""
+ if self._config_loaded:
+ return
Review Comment:
Ah, that is a good reason. Did not consider the `async`dependency. Yes and
before adding the complexity of `aiocache` I assume another attribute is
reasonable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]