vincbeck commented on code in PR #71968:
URL: https://github.com/apache/airflow/pull/71968#discussion_r3844734215
##########
airflow-core/src/airflow/models/variable.py:
##########
@@ -487,7 +509,16 @@ def get_variable_from_secrets(key: str, team_name: str |
None = None) -> str | N
for secrets_backend in ensure_secrets_loaded():
try:
var_val = call_secrets_backend_method(
- secrets_backend.get_variable, team_name=team_name, key=key
+ secrets_backend.get_variable,
+ team_name=team_name,
+ key=key,
+ # Only the metastore backend touches the metadata
database, and it is the only
+ # one whose signature accepts a session.
+ **(
+ {"session": session}
+ if session is not None and isinstance(secrets_backend,
MetastoreBackend)
+ else {}
+ ),
Review Comment:
For readability purposes I would probably create a variable for that
--
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]