[horizon] code that depends on openstack_dashboard in Horizon plugins
There has been recently some discussion, in the context of Horizon releases, about the dependencies Horizon's plugins have on different part of Horizon [1]. It was mentioned there that some plugins import from the openstack_dashboard python package, not just from the openstack_auth and horizon libraries. This is a bit worrying, because as far as I can remember, the idea behind splitting the code into several python packages was to allow the libraries to use the common code that is supposed to be reused, and keep the application-specific code that can change at any moment separate from that. So I went ahead and looked at all the plugins and at what exactly they import from openstack_dashboard: * openstack_dashboard.urls, openstack_dashboard.utils.settings, openstack_dashboard.test.helpers, openstack_dashboard.enabled: tests in almost all plugins * openstack_dashboard.exceptions: mistral-dashboard, charm-openstack-dashboard, watcher-dashboard, openstack-helm, openstack-ansible-os_horizon * openstack_dashboard.api: networking-bgpvpn, tacker-horizon, heat-dashboard, manila-ui, cloudkitty-dashboard, magnum-ui, heat-dashboard, neutron-vpnaas-dashboard, adjutant-ui * openstack_dashboard.policy: tacker-horizon, neutron-fwaas-dashboard, heat-dashboard, blazar-dashboard, trove-dashboard * openstack_dashboard.dashboards.project.instances.utils: trove-dashboard Looking at this list, we can see a few obvious candidates to be moved to either the openstack_auth or the horizon package. The dependency on openstack_dashboard.api is worrying, especially since we are going to rewrite that part entirely to use openstack_sdk and not the deprecated python-openstack-*-client libraries. Perhaps it would not hurt to have the plugins duplicate some of that code, to avoid breaking when we do that. The last one is an outlier, and I'm sure it could be fixed. The test dependencies are a little bit more tricky, because they are mostly copy-pasted code from Horizon's own tests. Some of that code is already deprecated and scheduled for removal in Horizon, the rest should be probably either moved to the horizon package or duplicated. I would be interested to hear from the plugin developers about their opinions on this. Note that my search only included python code. It would be a bit more work to also find any javascript, scss, and template dependencies, if they exist. [1] https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack....
участники (1)
-
Radomir Dopieralski