-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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] Decoupling OpenSearch Distribution, Server and Plugin versioning #17127
Comments
@pgtgrly thanks for this proposal For the plugins that are outside the OpenSearch core repository, this is a solved problem with semver, as you mentioned. From the other side, I think it is going to be exceptionally difficult to manage (and release) the components within the same monolithic repository independently. Also, it RFC does not capture the complexity of the OpenSearch managed plugins, which are further separated into regular plugins and modules (mandatory preinstalled plugins that cannot be removed). Q. How managed Plugin zip be installed for same OpenSearch Versions? At the moment, with CLI tooling the managed plugins are installed by name (from known location) with the same version that matches the distribution version. How it is going to work if managed plugins are released independently? Q. How one should know a new Plugin version is available? As of today, the users do not expect new versions for managed plugins (and I suspect for any plugins at all) that could be dropped independently of OpenSearch release cycle. How such notifications could be delivered? |
thanks for this proposal! i think it'd be great if this could be achieved with 3.0.0. i think the RFC should also explicitly state which combinations are officially supported: i.e. if a user has a problem with a server+plugin version combination which isn't in an official distribution does that user still get support or is the first order of business "just update to a version combination which we released as a distribution and report back if it's still not working"? admittedly this could already happen now (since technically plugins can use semver ranges for their server dependency) but i have never seen a plugin use the semver ranges so it's not really happening in 2.x.
IMHO this needs to be supported. say if OpenSearch 3.1.0 introduces a new API which a plugin wants to use then that plugin must have the possibility to state that it's compatible with OpenSearch >= 3.1.0. this is also how package managers (cargo, npm, etc.) work. after all, that's a big part of the fun of SemVer: you get to specify quite exactly what you're depending on in a way a package manager can calculate a valid tree for you.
it might make sense to extend the this might be a bit orthogonal to this, but did you consider releasing the server and (core) plugins on package managers (apt, yum, winget, homebrew, etc.) rather than just the distributions? in that case you could also, if i recall correctly, there was an RFC somewhere about versioning different APIs in the core used by plugins separately so that plugins could specify their dependency on those APIs rather than specifying a dependency on the whole server. IIRC @dblock was involved with that RFC? though i can't seem to find it anymore... i found #1632 and #1422 which are probably related, though. |
Thanks for the proposal @pgtgrly ! quick one- Can you also review opensearch-project/.github#251 and align with branching strategy proposed in the other proposal? cc: @andrross @pgtgrly what are you thoughts on management of plugins dependent on each other? For e.g. If a plugin relies on functionality provided by another plugin, how will the compatibility and versioning of those dependencies be handled?
What would this look like, have you tried a POC ? Maybe the RFC should cover changes required in build/CICD processes for plugin owners.
I am not 100% sure we can leave out dashboards out of this RFC discussion - plugins that offer a frontend plugin introducing a new feature mostly require tight coupling with the same minimum version of backend plugin. If we don't want to include OSD & plugins completely, should this RFC at least cover potential impact or what the integration between frontend + backend plugin looks like post this change? While this covers build aspects, to answer more questions around availability/notification of newer version, installation, etc - maybe you can consider and write what user experience looks like today v/s what it would look like post this change. That should help gain insights into tooling, documentation, etc updates required to support this change. Similarly, plugin owner experience can be compared. Can you also add what would release and default distribution look like? For e.g. today if the bundle is on vX, it moves to vY together. Post decoupling, if the plugin runs an independent release, will the bundle be updated as vX' or the bundle be not updated at all? |
Love the initiative and it is aligned with how we vision the future decoupling for OpenSearch Dashboards and its plugin in build, Distribution |
In this model, it leaves it up to the plugin's discretion when a release needs to take place. Will there be continuous integration amongst the latest released plugin versions to ensure they integrate together for plugins in the default distribution? How will release testing work when a plugin is requesting a release? With the current release model, all plugins are integrated together at release time in the Release Candidate and tests across all plugins are performed. For the compatibility matrix, do you propose that it matches major version only or can it go down to minor version? i.e. The plugin version 2.0.0 is compatible with OpenSearch 2.0-2.5, then plugin version 2.1 is compatible with 2.6-2.10, etc. With the extensions project one of the goals was version decoupling a separating out the release process between opensearch and an extension |
What if Plugin A, version 3.1 requires Plugin B, version 2.6 or better? |
Nice initiative and thanks for the detailed proposal @pgtgrly ! Also nice to see similar thinking (OSD#9192) in OSD . Lots of good questions from everyone. Overall I see good coverage on OpenSearch and plugins perspective in the RFC and this is a large change. This idea of decoupling release in the world of 50+ plugins helps in transforming to good scaleable model. Like @cwperks pointed out, it was one of extensions' core idea. However taking a step back, I think we need to draw the consequence and experience of users in detail first. In the RFC, we address plugin/build/distribution problems in general, but the impact is also largely to users/consumers. Directionally it is similar to external non-OpenSearch plugins, however the convenience of simpler installation of OpenSearch with plugins is lost.
|
i don't think that this is a valid constellation: if plugin version 2.0.0 is compatible with core 2.0 then semver dictates that it is compatible with any core >=2.0,<3.0. so you could use plugin 2.0.0 with core 2.99 just fine. but it's correct that plugin 2.1 could only be compatible with core >=2.6 (again leading to >=2.6,<3.0). otherwise core would've broken semver if the plugin 2.0 suddenly became incompatible with core 2.6. |
Hey folks! thanks for prompt feedback on this RFC, I am really grateful for your comments and quesions. I think we need to add two more terms to the glossary
Currently none of the plugins in core repository are default plugins.
By Modules, do we mean sub projects such as
This might require a bit of design and implementation change on cli and release process end. One solution can be The artifact download URL can be restructured to
For the default plugins this can be done by packaging them in a new release, for the other managed plugins this can be done by adding an update command as suggested by @rursprung .
I think we should support Plugin versions that are included in distribution release. Prehaps individual plugins can add on LTS
We can have two versions 1.4.0 >3.0.0 and 1.5.0 >3.1.0. Since it is SemVer, both will support uptill 4.0.0
This is a good proposal and can leverage the dependency management they provide out of the box. That can be picked as a follow up to this
Excellent question, the way the SemVer dependency management notation in plugins have been implemented, can be expanded to define multiple dependencies. Currently it only supports opensearch. We can work on implementing such multi dependency management in plugin loader. @smacrakis I think this functionailty is what allows us to determine dependencies between multiple plugins.
Will do so and update here.
This should be feasible, but we will need to look into the scalablity. @peterzhuamazon any thoughts on this?
As @seraphjiang called out, Dashboards are planned to be decoupled from Opensearch.
This will be a great section to add. I will add this to RFC (by EOD 30 January IST). Will consider customers who are: consuming distributed versions and customers who will install minimal distribution and install plugins separately.
The releases of default distribution will be the same. Have covered it in the question
Yes we need to have a CI system that will run plugin integration tests for all the OpenSearch versions that the SemVer range supports.
This should not impact the release of the standard distribution. Just the versioning name change. It will be upon release team to decide when a release needs to be made and that release candidate would be tested.
As @rursprung pointed out. SemVer ensures backward compatibility across minor version so a posstible matrix can be Plugin version 1.4 - OpenSearch version ^2.5.0 , ^3.0.0
Agreed, However Until plugin functionality is migrated into extension (or core OpenSeach) we can use this approach for decoupling releases. What will standard distribution look like once we migrate them to extensions?
We currently have 21 default plugins that come bundled as part of the standard distribution . In addition to this we have an additional 22 plugins that are offered by OpenSearch organisation. The feature set consistency of the standard plugin release can be maintained via the standard distribution release. The rest of managed plugins are installed by users as per their requirements, so they can look into the changeset and install the plugin version as per their needs.
I think standard distributions should still be offered regardless of separate plugin artifact distribution. We currently publish the managed plugins (except those in core repo) to maven, As suggested by you, we can start by just decoupling plugin version from OpenSearch Server version and keep the OpenSearch Server and Distribution version coupled. For someone consuming the standard distribution of the plugin, there will be no noticable changes. Note: I am working on creating another RFC to move the core repository plugins outside the core repo. However that does not need to be coupled with 3.0 release. I will publish that RFC soon (aiming for EOD 30 January IST ) and ping the link here. Side note: we cannot browse the directory in |
yes, please! currently it's unusable since (a) it's undocumented (needs opensearch-project/documentation-website#8763) and (b) not browsable (thus finding URLs is just guesswork) |
A few quick points from my side:
These are just initial thoughts and we would need more discussion on this. Thanks. |
Thanks @pgtgrly
No, modules are 100% plugins which:
|
Decoupling the distribution from its plugins is an important and ambitious idea. This was a stated goal of the Extensions Project as @rursprung calls out correctly and it's still an option to revive that. We also intended to do this migration entirely incrementally as proposed in this RFC, but we chose to create a new SDK (new interface in the middle between core and plugins), rather than using the existing plugins interface, to solve a number of other challenges (transitive dependencies, isolation, remote-ability). The RFC could call out the key tenets:
The proposed incremental path should work, don't make any changes to the current distribution except that it packages binary plugins, as opposed to rebuilding them from source. This is already supported by declarative semver in plugins/core and the tooling in https://github.com/opensearch-project/opensearch-build. I would not do this all at once for all plugins, just ship some plugins independently. Despite semver features existing for many versions, there are currently none AFAIK. Start with the simplest, job scheduler. I expect you're going to run into all the problems we tried to solve with extensions like transitive dependencies that will create jar hell. Make sure it works well, and package those plugins in the 3.x distribution instead of building them from source. Then I'd migrate plugins 1-by-1 over to (1) over the duration of 3.0. This is least disruptive to users and most developer-friendly to plugin authors. PS: Note that you still have the option of reusing https://github.com/opensearch-project/opensearch-sdk-java, downscope Extensions a bit and make that the plugin v2 interface. A plugin that depends on core instead of a lightweight SDK is still very painful to work with. |
Executive Summary
This RFC proposes decoupling the versioning of OpenSearch Server, plugins, and distributions to address challenges in the current tightly coupled system. The proposal suggests implementing independent versioning for plugins starting from OpenSearch 3.0.0, using SemVer for plugin versions and SemVer range support for compatibility with OpenSearch Server versions. Key changes include plugins maintaining their own version numbers, defining compatibility for entire major versions of OpenSearch Server, and adopting a four-part versioning system for distributions. This approach aims to increase flexibility in plugin development and releases, reduce unnecessary version bumps, simplify backporting of features and bug fixes, and provide clearer tracking of changes specific to individual components. The proposed implementation involves new branching and release strategies for plugins, updated CICD processes, and revised distribution versioning and release notes structure, ultimately streamlining the development and release process for the entire OpenSearch ecosystem.
Glossary
Motivation
This document aims to highlight the need for decoupling versioning across OpenSearch Server, Plugins and distributions.
Background
Before diving into the problem statement, let us set up the background on a few topics
OpenSearch Versioning
OpenSearch follows SemVer versioning. According to SemVer convention, given a version number MAJOR.MINOR.PATCH, increment the:
OpenSearch Plugin versions
Properties of an OpenSearch Plugin is defined in
plugin-descriptor.properties
file. For the sake of this discussion we will focus on two fields within the file;version
andopensearch.version
.version
defines the release version of a plugin, it can follow any versioning convention that the maintainer decides.opensearch.version
defines the opensearch server version that the plugin is compatible with. When OpenSearch server loads a plugin, it validates if the server version matches the opensearch.version in the properties file.Previously, for a plugin the opensearch.version and server version had to be an exact match for the plugin to load.
Now, plugins support SemVer range support for
opensearch.version
. Which means that a plugin can be compiled for an entire major version. for example, A plugin released for OpenSearch server 3.0.0 can be compatible with all the minor and patch releases up-til the next major version release (ie 4.0.0)OpenSearch Distributions
OpenSearch Server is currently released in two distributions:
Plugin Installation
Simply put, OpenSearch plugins can be installed by putting the compiled plugin zip in the plugins directory and restarting the cluster nodes.
However this is automated by the opensearch plugin cli which does some prevalidations. This CLI can take links from maven or any zip.
Additionally it can also install plugins maintained by OpenSearch org by name. (These plugins are hosted in the core repository). The build zip are hosted in “
https://artifacts.opensearch.org/releases/plugins/...
"Current State of OpenSearch Server, Plugins and Distribution versioning
If a critical bug fix is required for the ML Commons plugin:
Backporting Plugin fixes
Any critical plugin fixes need to be backported to plugin releases corresponding to all OpenSearch branches.
Previous discussion
This issue (opensearch-project/OpenSearch-Dashboards#5877) previously started this discussion in OpenSearch Dashboards repo. This was a precursor to Dashboards maintaining a separate versioning from OpenSearch Server (opensearch-project/OpenSearch-Dashboards#9192). This document is focused on plugins for OpenSearch server only
Assumptions
This RFC assumes that no breaking changes will be introduced in minor version release for OpenSearch Server.
Problem Statement
The current versioning strategy for OpenSearch, which tightly couples the versions of the OpenSearch Distribution, plugins, and server, presents several challenges:
These issues can collectively lead to inefficient development cycles, potential delays in releasing critical updates, and difficulties in maintaining clear version histories for individual components. A more flexible and decoupled versioning approach is needed to address these challenges and improve the overall development and release process for OpenSearch and its ecosystem.
Proposed Solution
We propose maintaining an independent versioning for plugins from 3.0.0.
With the release of OpenSearch 3.0.0, all the plugins will be moved to version 3.0.0 (To avoid confusion with previous plugin versions).
Post that, the plugin version will be kept independent of the server version, instead it will depend on the features of a plugin. The plugin versioning would be implemented using SemVer. [example]. The release notes would be maintained as such.
The
opensearch.version
for the plugin will use the SemVer range support (^3.0.0
) to ensure compatibility across the entire major version for OpenSearch Server.We can also maintain a compatibility matrix for the plugin version and server version.
For Example:
Q. How will Plugin branching work?
A. The
main
branch would always track the active development and whenever a release is made a new branch would be created for the release as an archive.Q. How will Plugin zip be released for different OpenSearch Versions?
A. Since a plugin zip can be compatible with a major version, CICD will compile and release one zip per major version.
The naming for the released artifact can be
<plugin-name>-<plugin-version>-<opensearch-server-version>.zip
.example:
analysis-sindarin-3.4.2-OS_3.x.zip
andanalysis-sindarin-3.4.2-OS_4.x.zip
Q. How will we ensure that a plugin is functioning across all OpenSearch Server minor versions in a OpenSearch Server major version?
The CICD process will run plugin integration tests across all the semver ranges mentioned in the build gradle. This can either be in form of a list maintained and populated by the maintainers or be extracted by some central source via network call (Maybe get versions from Maven?)
Q. How will features be back ported across OpenSearch Versions?
No need to backport the features across OpenSearch Versions as the plugin versioning is independent of OpenSearch version.
**Q. What if a Plugin is not compatible across all OpenSearch Server minor versions in a OpenSearch Server major version?
**
A. As per definition of SemVer, the changes across minor should be backward compatible. However if we forsee that not being the case, we can modify the SemVer range support in plugins to have lower and upper bounds.
Q. How will OpenSearch standard distribution be impacted by this?
The distribution versioning will need to change to accommodate independent plugin versions. We propose using a four-part version number for distributions: Major.Minor.Patch.Release, where:
Here's an example sequence of releases:
Each distribution release will maintain its own release notes, documenting which components were updated and linking to their respective detailed release notes.
FAQs
Will populate it as per discussion on the thread
Supporting References
The text was updated successfully, but these errors were encountered: