You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/13 23:44:58 UTC
[GitHub] [airflow] kaxil opened a new pull request #11515: Remove flask-admin based Plugins
kaxil opened a new pull request #11515:
URL: https://github.com/apache/airflow/pull/11515
`admin_views` & `menu_links` were used for non-rbac UI.For FAB we use
`flask_appbuilder_views` & `flask_appbuilder_menu_links`
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on a change in pull request #11515: Remove flask-admin based Plugins
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #11515:
URL: https://github.com/apache/airflow/pull/11515#discussion_r504565118
##########
File path: airflow/plugins_manager.py
##########
@@ -256,29 +248,18 @@ def initialize_web_ui_plugins():
log.debug("Initialize Web UI plugin")
- admin_views = []
flask_blueprints = []
- menu_links = []
flask_appbuilder_views = []
flask_appbuilder_menu_links = []
for plugin in plugins:
- admin_views.extend(plugin.admin_views)
- menu_links.extend(plugin.menu_links)
flask_appbuilder_views.extend(plugin.appbuilder_views)
flask_appbuilder_menu_links.extend(plugin.appbuilder_menu_items)
flask_blueprints.extend([{
'name': plugin.name,
'blueprint': bp
} for bp in plugin.flask_blueprints])
- if (admin_views and not flask_appbuilder_views) or (menu_links and not flask_appbuilder_menu_links):
Review comment:
Done in https://github.com/apache/airflow/pull/11515/commits/0af388dfb6f95dd9d5b894ec13f7589459a1806f @mik-laj
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] mik-laj commented on a change in pull request #11515: Remove flask-admin based Plugins
Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #11515:
URL: https://github.com/apache/airflow/pull/11515#discussion_r504335879
##########
File path: airflow/plugins_manager.py
##########
@@ -256,29 +248,18 @@ def initialize_web_ui_plugins():
log.debug("Initialize Web UI plugin")
- admin_views = []
flask_blueprints = []
- menu_links = []
flask_appbuilder_views = []
flask_appbuilder_menu_links = []
for plugin in plugins:
- admin_views.extend(plugin.admin_views)
- menu_links.extend(plugin.menu_links)
flask_appbuilder_views.extend(plugin.appbuilder_views)
flask_appbuilder_menu_links.extend(plugin.appbuilder_menu_items)
flask_blueprints.extend([{
'name': plugin.name,
'blueprint': bp
} for bp in plugin.flask_blueprints])
- if (admin_views and not flask_appbuilder_views) or (menu_links and not flask_appbuilder_menu_links):
Review comment:
```
if (plugin.admin_views and not plugin.appbuilder_views) or (plugin.menu_links and not plugin.flask_appbuilder_menu_links):
```
In my opinion, this message may remain, but it seems to me that the global variable can be deleted completely. Users who migrate to RBAC proposed by airflow upgrade-check may not be aware of the consequences.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil merged pull request #11515: Remove flask-admin based Plugins
Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #11515:
URL: https://github.com/apache/airflow/pull/11515
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] kaxil commented on a change in pull request #11515: Remove flask-admin based Plugins
Posted by GitBox <gi...@apache.org>.
kaxil commented on a change in pull request #11515:
URL: https://github.com/apache/airflow/pull/11515#discussion_r504565118
##########
File path: airflow/plugins_manager.py
##########
@@ -256,29 +248,18 @@ def initialize_web_ui_plugins():
log.debug("Initialize Web UI plugin")
- admin_views = []
flask_blueprints = []
- menu_links = []
flask_appbuilder_views = []
flask_appbuilder_menu_links = []
for plugin in plugins:
- admin_views.extend(plugin.admin_views)
- menu_links.extend(plugin.menu_links)
flask_appbuilder_views.extend(plugin.appbuilder_views)
flask_appbuilder_menu_links.extend(plugin.appbuilder_menu_items)
flask_blueprints.extend([{
'name': plugin.name,
'blueprint': bp
} for bp in plugin.flask_blueprints])
- if (admin_views and not flask_appbuilder_views) or (menu_links and not flask_appbuilder_menu_links):
Review comment:
Done @mik-laj
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org