vandonr-amz commented on code in PR #30259:
URL: https://github.com/apache/airflow/pull/30259#discussion_r1152554225


##########
airflow/secrets/cache.py:
##########
@@ -82,8 +82,7 @@ def get_variable(cls, key: str) -> str | None:
 
     @classmethod
     def save_variable(cls, key: str, value: str | None):
-        """saves the value for that key in the cache, if enabled"""
-        cls.init()  # ensure initialization has been done

Review Comment:
   not doing the init automatically when a value is saved means we control when 
the cache is enabled.
   In this case, it's only called in 
https://github.com/apache/airflow/pull/30259/files#diff-827b7a469438ffd1b172ae295134a84c8a914c9ea4c9ea2a7d3de1f1d5aa6bb6R1071
   so it's only active when parsing dags.



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