-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace FAB url filtering function with Airflows #27576
Conversation
Use our url filtering util function so there is consistency between FAB and Airflow routes.
Use our url filtering util function so there is consistency between FAB and Airflow routes. (cherry picked from commit b33d22c)
This broke API unit tests, e.g.
|
Thanks @IKholopov, looking now. |
|
||
def _init_extension(self, app): | ||
app.appbuilder = self | ||
if not hasattr(app, "extensions"): | ||
app.extensions = {} | ||
app.extensions["appbuilder"] = self | ||
|
||
def _swap_url_filter(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
Fix in #27586. |
Use our url filtering util function so there is consistency between FAB and Airflow routes.
Use our url filtering util function so there is consistency between FAB and Airflow routes.