-
Notifications
You must be signed in to change notification settings - Fork 894
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
[RFC] Plugins Version Decoupling #5877
Comments
add original proposal as reference |
I love the idea of decoupling the versions. Right now, even with no code changes versions need bumped in each plugin as the core version increments. Is there anything we need to think about in regards to decoupling for OpenSearch Dashboards plugins versus OpenSearch core plugins? |
re: |
Yes, currently, we depend on Dashboards plugins to provide the supported version range of OpenSearch core plugins, which helps us decide whether to hide/show/disable the Dashboards plugins. If we can identify the API gaps for non-supported versions, we can either backport the API changes to unsupported OpenSearch core plugins or modify the current Dashboards plugins to conditionally choose the API based on the version. This approach aims to handle the decoupling in the future. |
I like the idea but I do think we may need a more granular capability detection. Using Index management dashboard plugin for example, we introduced |
That's a great call-out @SuZhou-Joe , in this case a more granular capability check is for sure needed. To simplify , as for the latest version of Index management dashboard plugin (2.14 as we type), the earliest OS version to support the full functionality would be OS 2.8, in another word [2.8, latest], which means the plugin would work as expected with any data source versions within the range and this already expand the support range of Index management dashboards plugin version 2.14 from one (2.14) to seven (2.8, 2.9, 2.10, 2.11, 2.12, 2.13, 2.14) !! Then with a second layer version filtering logic implemented on plugin side, we can make the plugin compatible with more legacy versions like 2.7 by hiding the notifications config menu in order to expand the compatibility matrix. So generally we will be dividing the versions into three group as :
Incrementally, to get the compatibility matrix for group 1 would be a good start towards final version decoupling goal. |
@SuZhou-Joe @ZilongX if I am not mistaken, since each page has to register the picker anyway (to support things like read only mode vs selectable), a more fine grained way we can deal with this is by changing the supported versions based on UI page. As long as the new feature has its own page which registers its own picker we can filter it differently? |
Does support for elasticsearch 7.10 mean we should use the legacy client? For example I see usage of non-legacy client here, but maybe this does not apply since ml-commons was introduced after? |
Overview
OpenSearch plugins currently tightly couple their versions with the underlying OpenSearch/OpenSearch Dashboards version. This tight coupling can lead to challenges in maintaining and upgrading plugins independently. This RFC proposes a solution to decouple the plugin versions from the OpenSearch versions, allowing for more flexibility in managing and updating plugins.
Motivation
The motivation behind decoupling OpenSearch plugin versions is to provide a more independent and flexible approach to plugin development and maintenance.
Problem Statement
In Elasticsearch version 7.8, users encounter issues when using the latest 2.11 Dashboards to connect to the 7.8 Elasticsearch cluster. Specifically, they are unable to create the required Index Pattern successfully when adding multiple data sources. The issue has occurred due to changes in the Index Pattern API in Elasticsearch Cluster versions above 7.8. While users can successfully connect to the 7.8 Elasticsearch cluster, they cannot create the necessary Index Pattern. This, in turn, affects the user experience when using several key plugins, especially the Discover plugin, as they cannot utilize the Index Pattern to display the required data on the Discover app. To address this situation, it is recommended to better showcase the supported versions on the Create Index Pattern page. For example, during the Index Pattern creation process, when clicking on "Use external data source connection," only display the versions supported by the current 2.11 version. If it is feasible to implement this functionality, we need to obtain the Manifest of the current connection version to support filtering and display only the versions that support Index Pattern creation.
In another example related to the map app, when users create map visualizations, they need to add multiple layers with existing datasources to Elasticsearch's index pattern. As the index pattern cannot be created during the OSD 2.11 index pattern page, it causes the map plugin to be unable to display content connected to the 7.8 cluster. Additionally, opensearch-geospatial was introduced in OpenSearch 2.3.0. When users use OSD 2.11.0 to connect to OpenSearch versions earlier than 2.3.0, the map app lacks the required functionality.
Proposed Solution
In order to run the plugins connected to different versions of the OpenSearch/Elasticsearch cluster functionally, we would like to propose the following solution to achieve the goal of plugin version decoupling.
Plugin Compatibility Matrix
Establish a compatibility matrix that clearly outlines which versions of the plugin are compatible with different versions of OpenSearch. By collecting plugin versions for selected OpenSearch versions and analyzing the compatibility matrix, we can identify potential issues and gaps. Based on the output of the matrix, we can implement a systematic approach to list the possible contents of each plugin, ensuring comprehensive coverage and documentation of compatibility scenarios. This process will not only aid in understanding the compatibility landscape but also guide developers in making informed decisions when selecting and updating plugins for specific OpenSearch versions.
Get Manifest information
The optimal approach is to obtain all the API information for each version of the plugin. However, gathering API details for every plugin version can be challenging. An alternative approach is to retrieve all plugin versions by calling the
_cat/plugins
or/_nodes/_local/plugins
API during the creation of multiple data sources. we will compare the connected cluster's plugin version with Plugin team's supported version range, to check plugin capabilities, and save those information to a saved object. This information can be leveraged by each plugin team to determine and create a rule to filter. If the customer's OpenSearch is updated, the manifest information could become outdated. We will leverage the multiple datasource update function to retrieve the latest manifest information and update the existing saved object.For instance, a data-source object may look like:
UI Changes
We propose adding capabilities checks on the "Create Multiple Datasource" page. This includes checkboxes for each plugin and either a dedicated "Check Capabilities" button or utilizing the existing "Test Connection" button. When users click the selected button, the system will retrieve the current cluster version and plugin version range, compare these two inputs, mark the checkboxes accordingly, and then save the multiple-datasource connection with additional information. For instance,
capabilities.discoveryEnabled:true
will be included. This information will be utilized for the plugin’s UI datasource filters/rules.Plugin Rule for Version Compatibility Check
After obtaining manifest information and storing it as a saved object, the plugin team could leverage the manifest information to create their rules for filtering supported versions based on their API under specific versions. For example, in the OpenSearch Dashboards discover application, the rule can be used to control how the compatible index pattern is rendered. If the current plugin version isn't compatible with the connected older OpenSearch version, it will filter out the incompatible OpenSearch index pattern and only render the compatible version of the index pattern on the discover page.
For the plugin version range, we can provide an interface for each plugin team to use and register. Each plugin team will use the provided interface, such as
datasource.registercompatibilities(versionrange)
. This way, we will have the support range for each plugin. By comparing the current cluster’s version with the registered version range, we can determine if a plugin is enabled. The current schema includes the addition of clusterVersion to accommodate this feature. Since most plugins currently follow an exact match for the OpenSearch/OpenSearch Dashboards version, having just one OpenSearch version allows us to determine the installed plugin version in most cases.Scope
In the scope of this proposal, we will focus on selected OpenSearch versions, specifically covering OpenSearch versions ('1.0.0,' '1.1.0,' '1.2.0,' '1.3.0,' '2.3.0,' '2.5.0,' '2.7.0,' '2.9.0', '2.11.0') and Elasticsearch ('7.10'). The plugins included in this analysis are 'alerting,' 'anomaly-detection,' 'index_management,' 'sql,' and 'Machinelearning.'
This focused approach will allow us to thoroughly assess the compatibility matrix for the specified OpenSearch versions and plugins. By concentrating on these specific OpenSearch versions and plugins, we aim to deeply understand how our proposed changes will affect and improve compatibility. The insights gained from this focused analysis will be the basis for developing broader strategies and documentation to ensure plugin compatibility in upcoming OpenSearch versions.
Execution
FAQ
The text was updated successfully, but these errors were encountered: