vincbeck commented on code in PR #58905:
URL: https://github.com/apache/airflow/pull/58905#discussion_r2581593475


##########
airflow-core/src/airflow/models/variable.py:
##########
@@ -456,25 +473,28 @@ def check_for_write_conflict(key: str) -> None:
             return None
 
     @staticmethod
-    def get_variable_from_secrets(key: str) -> str | None:
+    def get_variable_from_secrets(key: str, team_id: str | None = None) -> str 
| None:
         """
         Get Airflow Variable by iterating over all Secret Backends.
 
         :param key: Variable Key
+        :param team_id: ID of the team associated to the task trying to access 
the variable (if any)
         :return: Variable Value
         """
-        # check cache first
-        # enabled only if SecretCache.init() has been called first
-        try:
-            return SecretCache.get_variable(key)
-        except SecretCache.NotPresentException:
-            pass  # continue business
+        # Disable cache if the variable belongs to a team. We might enable it 
later
+        if not team_id:

Review Comment:
   I agree but I'll do it in a separate PR



-- 
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]

Reply via email to