potiuk commented on a change in pull request #13501:
URL: https://github.com/apache/airflow/pull/13501#discussion_r552841054



##########
File path: airflow/models/variable.py
##########
@@ -143,6 +147,14 @@ def set(cls, key: str, value: Any, serialize_json: bool = 
False, session: Sessio
         :param serialize_json: Serialize the value to a JSON string
         :param session: SQL Alchemy Sessions
         """
+        env_var_name = "AIRFLOW_VAR_" + key.upper()

Review comment:
       Yep. I realize this is more complex. So it should be part of separate 
PR. And rather than querying the backend, I'd rather add somewhere an info like 
"origin" of a variable, so when it is read, we'd now it comes from secret 
backend rather than db or something like that - so that we do not increase 
number of queries to the DB. This should pretty simple to implement and fairly 
robust (I believe in all cases the variable should be read before it is written 
to - we might want to check all places, but it should be the case already).




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to