dabla commented on code in PR #59876:
URL: https://github.com/apache/airflow/pull/59876#discussion_r2804305565
##########
airflow-core/src/airflow/models/variable.py:
##########
@@ -148,13 +147,7 @@ def get(
:param deserialize_json: Deserialize the value to a Python dict
:param team_name: Team name associated to the task trying to access
the variable (if any)
"""
- # TODO: This is not the best way of having compat, but it's "better
than erroring" for now. This still
- # means SQLA etc is loaded, but we can't avoid that unless/until we
add import shims as a big
- # back-compat layer
-
- # If this is set it means we are in some kind of execution context
(Task, Dag Parse or Triggerer perhaps)
- # and should use the Task SDK API server path
- if hasattr(sys.modules.get("airflow.sdk.execution_time.task_runner"),
"SUPERVISOR_COMMS"):
+ if is_client_process_context():
Review Comment:
Nice how you applied DRY-principle here nice clean code!
--
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]