ashb commented on code in PR #23592:
URL: https://github.com/apache/airflow/pull/23592#discussion_r964884461
##########
airflow/models/dagbag.py:
##########
@@ -306,6 +314,8 @@ def _load_modules_from_file(self, filepath, safe_mode):
if mod_name in sys.modules:
del sys.modules[mod_name]
+ DagContext.current_autoregister_module_name = mod_name
Review Comment:
Yeah, I agree, This is essentially used as a global variable.
It's not very easy to refactor given it's use across three or so different
functions, so a context manager would be tricky. (I.e. I can't see an easy
refactor to make it work right now)
--
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]