-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Add modules to distributions, and move lang-expression and lang-groovy to them #15233
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
Conversation
modules to integ test cluster
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But quite a funny one :)
|
I gave a first look and it looks really great. Some thoughts:
|
|
Thanks for looking @dadoonet.
This is not true. We did not move groovy to a plugin until after 2.1. There has not been any release of 2.0 or 2.1 that did not include groovy and expressions. |
You are 100% right! |
|
However, we can and should improve the error messaging. In 3.0 (this change) we won't be publishing zips for modules. But with the backport to 2.x, we have no choice with maven (I think?). So for 2.x, we should look at having probably a static list to throw an error on if the user tries installing the plugin. |
|
There is already a check in PluginManager in this PR for that case. |
Ah yes I forgot! |
I was wrong. You can totally ignore my comment apart |
|
I also want to mention the downsides of this approach (versus just preinstalling plugins):
IMO these are minor compared to the advantages we get of better packaging and upgrade behavior. |
|
Thanks @rmuir . I was thinking about those downsides as well. Another use case which I thing is valid, is something wanting to have no groovy installed at all. Just doesn't need scripting and doesn't want to have any overhead/potential security risk. If understand things correctly, this will be impossible with the current suggestion. What are the downsides of the "just preinstalled plugins" approach? |
It is possible, just not using bin/plugin. The user just deletes the directory from modules. But this is a super advanced use case, so I think having to manually remove a directory (like manually removing an optional dependency in lib that ES includes) is fine. |
I think this was already mentioned in comments above?
|
its not impossible, they have to use
As mentioned above, IMO the biggest problem is that upgrades would be rocky with our packaging. That is because plugins are "under the users control". So we want clear separation: |
Ok, so I read this to say - once we're ready, we will move groovy to a plugin. If so, I'm fine. Thanks.
I see the added value of being to just override directories when upgrading, without worrying too much about what's in them. Thanks for clarifying. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd do it as String packaging = ['tar': 'tar.gz', 'integ-test-zip': 'zip'][distro] ?: distro.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what is here is much more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
|
\o/ Left minor comment buts it looks good to me. I wonder if we should poke anyone else who might have an opinion on this? |
for limiting configuration to certain distributions prettier
Add modules to distributions, and move lang-expression and lang-groovy to them
With the work to lock down permissions of scripts, we removed expressions and groovy from core, into plugins. However, we would still like the ability to include these languages, and future extractions of features to plugins, in distributions of elasticsearch.
This change adds the concept of a "module" to the elasticsearch repository. These are simply plugins that come included with distributions, but in a way that does not affect plugin management. They cannot be removed, or even show up, with bin/plugin. Also added here is a new distribution, integ-test-zip. This is the minimal distribution that includes no modules, which plugins use for their integ tests. QA tests use the full zip as their distribution.
Note that we will attempt to backport this to 2.x, but it will be done in a separate PR.
closes #15233