-
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
[opensearch-plugin] Cannot install old patch version of plugins on newer opensearch builds #1707
Comments
Is this intentional or accidental? i.e. would we want to at least allow for patch version variability and have plugins work with any 1.2.x version of core? |
Ah I see... I misunderstood, so this issue is to actually address this so that we can install old patch version of plugins 👍 |
A plugin version 2.1.0 will not start on OpenSearch 2.1.1 by design. Let's revisit this design during/at 2.0? |
Removing v1.2.1 tag, we had to do a full rebuild for 1.2.1 to work around this issue. |
@nknize can you please comment on what you think the intended design here is? Can we relax this limitation given semver? Could we do it in a patch release like 1.2.3? |
The inherited implementation is based on the inherited (legacy?) "requirement" that plugins are bundled in the monolithic repo and there's always a 1:1 core to plugin version relationship. In theory I agree it should not be a requirement OpenSearch wants/should carry forward and (on the surface) the project desires to move forward supporting something like semver range syntax (e.g., Thinking this through a little more, relaxing the strict full version check makes life easier where we can independently release patched plugins and/or min core. On the other hand it also introduces a many to many relationship between patched components. (e.g., a job-scheduler 1.2.3 can be installed alongside notifications v1.2.5 which is installed alongside knn v1.2.2). Having to check all patched versions is a difficult world for support engineers. This leniency also permits different patched plugins to run w/ a potentially CVE vulnerable core like v1.2.0. But as we've just seen, in a critical CVE apocalypse we should likely be more thoughtful about never allowing a current released plugin to be compatible w/ a vulnerable core release; we should probably bite the bullet and rebuild the entire stack w/ a one line |
@nknize so you don't recommend we make this change for 1.2.3 if I read this correctly? |
I don't recommend a change to introduce uncontrolled leniency on patched version checks, period. I'd be happy to discuss / review a change to introduce semver range checks on patched versions if someone wants to churn out that PR in time for 1.2.3. |
@nknize @dblock my five cents, given the recent issues with plugins and CVEs, all at the same time:
What do you think guys? |
This does make sense, but it also means we may not be able to make interface additions (e.g. new field) in minor releases, doesn't it? |
Not necessarily, introducing the default interface methods won't break it, but could be difficult to catch though. Along with warning the user, we highlight the version mismatch and consequences, but surely we cannot guarantee it is going to work. |
I think now we’ve got 2 proposals:
Looks like they either can resolve the issue. In my opinion, the only conflict is, the 1st proposal allows the plugin to choose the supported patch OpenSearch version, while the 2nd "introduce uncontrolled leniency on patched version checks". I’d like to hear more opinions on the solutions. I've got some opinions:
|
+1 for @nknize's suggestion. Version range makes things very clear and flexible. However, we should provide tooling to test the versions in the range in my opinion, to help plugin developers create a good CI. |
One reason why we were reluctant to relax the plugin version matrix fully by introducing a feature that lets plugins declare a compatible version range is precisely the amount of testing that would be required to release anything, and the exploding amount of potential combinations that administrators would be encountering. But I think we should still build this, and then start by using the feature to enable patch-level semver compatibility. |
The more I thought about this move the less I like the idea. Testing would be horrible in this situation, and I cant find a good way around it. I agree with the following statement the most as it is also this exact case that has brought this issue to light:
|
Security patches are common and requires a faster deployment cycle to mitigate the security threats. I wanted to gather thoughts on relaxing patch version compatibility checks across the board, so that deploying security patches become seamless. Thoughts? |
Yes, there shouldn't be any breaking changes in plugin interfaces in minor version releases. But there are lot of internal classes/ objects exposed through these interfaces e.g. DiscoveryPlugin which has bunch of methods and expose other internal classes like TransportService/ NetworkService etc. and similarly ClusterService is exposed in a different ClusterPlugin interface. These internal classes are not bound by any plugin interface contract. And, if a plugin depends on their methods (which in turn can return other internal classes) and these are changed, then it can cause potential incompatibility or failures. This can be obvious if there is a compile time failure or just a behavior change, would figure out during runtime testing. So providing configuration to users to specify the plugin version range compatibility is one but real responsibility lies with testing. |
Good point! The way forward I see with this is a clear documentation on Having these checks on the core and the plugin package can definitely help avoid surprises. |
@Bukhtawar The main reason to also include patch version is to avoid uncontrolled leniency as discussed in #1707 (comment) . However we probably just need min-bound for that scenario. I'm not able to think of reasons where a max-bound on patch version would be desirable. |
Consider the case where we have version 1.3.3 out there and mistakenly commit a (breaking) change in 1.3.4. Plugin update relies on that feature, which then gets reverted in 1.3.5. Plugin may choose to first lock down its max and quickly release, before addressing the problem at the root. What I am saying is that developers need control over compatibility from the plugin POV, leave it to them to figure out how they use it. We should introduce restrictions only where it's obviously harmful. |
As a first step towards supporting semVer range of compatible versions for plugins, we could start with relaxing the patch version check (for default compatibility range). This would require building the ability to test across patch versions of the core for every patch release of a plugin and vice versa. This would include testing a plugin with compiled version of newer patch of OpenSearch (and vice versa) along with running integration tests to catch runtime issues. |
+1 @abseth-amzn I like the proposal, it makes sense to relax patch versions for plugins and longer term extensions will support running across versions including major and minor. We have seen examples in the past where patch versions have caused problems:
As most of the comments here already put an outline, we'd like to see:
We'd like to start making changes to make this happen. |
…ver range (opensearch-project#1707) Signed-off-by: Abhilasha Seth <[email protected]>
…ver range (#11441) * Add support for dependencies in plugin descriptor properties with semver range (#1707) Signed-off-by: Abhilasha Seth <[email protected]> * Remove unused gson licenses Signed-off-by: Abhilasha Seth <[email protected]> * Maintain bwc in PluginInfo with addition of semver range Signed-off-by: Abhilasha Seth <[email protected]> * Added support for list of ranges Signed-off-by: Abhilasha Seth <[email protected]> * Add bwc tests and restrict range list size to 1 Signed-off-by: Abhilasha Seth <[email protected]> * Update SemverRange javadoc Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to trigger jenkins re-run Signed-off-by: Abhilasha Seth <[email protected]> * Use jackson instead of gson * Remove jackson databind and annotations dependency from server Signed-off-by: Abhilasha Seth <[email protected]> * nit fixes Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to re-run jenkins workflow Signed-off-by: Abhilasha Seth <[email protected]> --------- Signed-off-by: Abhilasha Seth <[email protected]>
…ver range (opensearch-project#11441) * Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707) Signed-off-by: Abhilasha Seth <[email protected]> * Remove unused gson licenses Signed-off-by: Abhilasha Seth <[email protected]> * Maintain bwc in PluginInfo with addition of semver range Signed-off-by: Abhilasha Seth <[email protected]> * Added support for list of ranges Signed-off-by: Abhilasha Seth <[email protected]> * Add bwc tests and restrict range list size to 1 Signed-off-by: Abhilasha Seth <[email protected]> * Update SemverRange javadoc Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to trigger jenkins re-run Signed-off-by: Abhilasha Seth <[email protected]> * Use jackson instead of gson * Remove jackson databind and annotations dependency from server Signed-off-by: Abhilasha Seth <[email protected]> * nit fixes Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to re-run jenkins workflow Signed-off-by: Abhilasha Seth <[email protected]> --------- Signed-off-by: Abhilasha Seth <[email protected]>
…ver range (opensearch-project#11441) * Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707) Signed-off-by: Abhilasha Seth <[email protected]> * Remove unused gson licenses Signed-off-by: Abhilasha Seth <[email protected]> * Maintain bwc in PluginInfo with addition of semver range Signed-off-by: Abhilasha Seth <[email protected]> * Added support for list of ranges Signed-off-by: Abhilasha Seth <[email protected]> * Add bwc tests and restrict range list size to 1 Signed-off-by: Abhilasha Seth <[email protected]> * Update SemverRange javadoc Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to trigger jenkins re-run Signed-off-by: Abhilasha Seth <[email protected]> * Use jackson instead of gson * Remove jackson databind and annotations dependency from server Signed-off-by: Abhilasha Seth <[email protected]> * nit fixes Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to re-run jenkins workflow Signed-off-by: Abhilasha Seth <[email protected]> --------- Signed-off-by: Abhilasha Seth <[email protected]>
…ver range (#11441) (#12271) * Add support for dependencies in plugin descriptor properties with semver range (#1707) * Remove unused gson licenses * Maintain bwc in PluginInfo with addition of semver range * Added support for list of ranges * Add bwc tests and restrict range list size to 1 * Update SemverRange javadoc * Minor change to trigger jenkins re-run * Use jackson instead of gson * Remove jackson databind and annotations dependency from server * nit fixes * Minor change to re-run jenkins workflow --------- Signed-off-by: Abhilasha Seth <[email protected]>
@abseth-amzn could you please create documentation issue here [1] for [1] https://github.com/opensearch-project/documentation-website |
…ver range (opensearch-project#11441) * Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707) Signed-off-by: Abhilasha Seth <[email protected]> * Remove unused gson licenses Signed-off-by: Abhilasha Seth <[email protected]> * Maintain bwc in PluginInfo with addition of semver range Signed-off-by: Abhilasha Seth <[email protected]> * Added support for list of ranges Signed-off-by: Abhilasha Seth <[email protected]> * Add bwc tests and restrict range list size to 1 Signed-off-by: Abhilasha Seth <[email protected]> * Update SemverRange javadoc Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to trigger jenkins re-run Signed-off-by: Abhilasha Seth <[email protected]> * Use jackson instead of gson * Remove jackson databind and annotations dependency from server Signed-off-by: Abhilasha Seth <[email protected]> * nit fixes Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to re-run jenkins workflow Signed-off-by: Abhilasha Seth <[email protected]> --------- Signed-off-by: Abhilasha Seth <[email protected]>
…ver range (opensearch-project#11441) * Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707) Signed-off-by: Abhilasha Seth <[email protected]> * Remove unused gson licenses Signed-off-by: Abhilasha Seth <[email protected]> * Maintain bwc in PluginInfo with addition of semver range Signed-off-by: Abhilasha Seth <[email protected]> * Added support for list of ranges Signed-off-by: Abhilasha Seth <[email protected]> * Add bwc tests and restrict range list size to 1 Signed-off-by: Abhilasha Seth <[email protected]> * Update SemverRange javadoc Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to trigger jenkins re-run Signed-off-by: Abhilasha Seth <[email protected]> * Use jackson instead of gson * Remove jackson databind and annotations dependency from server Signed-off-by: Abhilasha Seth <[email protected]> * nit fixes Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to re-run jenkins workflow Signed-off-by: Abhilasha Seth <[email protected]> --------- Signed-off-by: Abhilasha Seth <[email protected]>
…ver range (opensearch-project#11441) * Add support for dependencies in plugin descriptor properties with semver range (opensearch-project#1707) Signed-off-by: Abhilasha Seth <[email protected]> * Remove unused gson licenses Signed-off-by: Abhilasha Seth <[email protected]> * Maintain bwc in PluginInfo with addition of semver range Signed-off-by: Abhilasha Seth <[email protected]> * Added support for list of ranges Signed-off-by: Abhilasha Seth <[email protected]> * Add bwc tests and restrict range list size to 1 Signed-off-by: Abhilasha Seth <[email protected]> * Update SemverRange javadoc Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to trigger jenkins re-run Signed-off-by: Abhilasha Seth <[email protected]> * Use jackson instead of gson * Remove jackson databind and annotations dependency from server Signed-off-by: Abhilasha Seth <[email protected]> * nit fixes Signed-off-by: Abhilasha Seth <[email protected]> * Minor change to re-run jenkins workflow Signed-off-by: Abhilasha Seth <[email protected]> --------- Signed-off-by: Abhilasha Seth <[email protected]> Signed-off-by: Shivansh Arora <[email protected]>
This is blocking us from consuming the redistribution artifacts for patch releases.
The text was updated successfully, but these errors were encountered: