IKholopov commented on code in PR #27576:
URL: https://github.com/apache/airflow/pull/27576#discussion_r1018555185
##########
airflow/www/extensions/init_appbuilder.py:
##########
@@ -215,13 +215,25 @@ def init_app(self, app, session):
else:
self.post_init()
self._init_extension(app)
+ self._swap_url_filter()
def _init_extension(self, app):
app.appbuilder = self
if not hasattr(app, "extensions"):
app.extensions = {}
app.extensions["appbuilder"] = self
+ def _swap_url_filter(self):
Review Comment:
A side comment (not related to the test failure):
why is the private method of a class altering the global object? The content
of this method doesn't use the actual object it is called upon (self) and yet
this method is called as part of initialization of the AirflowAppBuilder object.
Does the builder *depends* on the old behavior of
`fab_sec_views.get_safe_redirect` before initialization complete? If so, could
you please leave a comment about that? If not, is the AppBuilder (which focuses
on building "app" object) the right place to perform this substitution? Maybe
it would be better to put static part of the initialization in a new dedicated
file?
--
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]