ferruzzi commented on code in PR #71968:
URL: https://github.com/apache/airflow/pull/71968#discussion_r3867423327


##########
airflow-core/src/airflow/models/variable.py:
##########
@@ -138,13 +146,20 @@ def setdefault(cls, key, default, description=None, 
deserialize_json=False):
         :param description: Default value to set Description of the Variable
         :param deserialize_json: Store this as a JSON encoded value in the DB
             and un-encode it when retrieving a value
-        :param session: Session
+        :param session: Existing session to reuse for the metadata database 
read and write.
+            Callers holding an open transaction must pass it.

Review Comment:
   On hold until #71802 merges.  That PR adds 
`SerializedVariableInterval.resolve()`, which reads a Variable while the 
scheduler is already holding a session, so it becomes the first real caller for
     this parameter.  Once it lands I'll add `session` to `resolve()` and pass 
it through to `Variable.get()` here, rather than merging a parameter with no 
consumers.
   



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