-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Treat all xpack as modules #64832
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
Treat all xpack as modules #64832
Conversation
When rest tests install plugins, they currently treat xpack as plugins instead of modules. This was a side effect of splitting the rest test plugin out from PluginBuildPlugin. However, that means xpack modules are being run through the elasticsearch plugin installer, which is not guaranteed to work. This commit reworks rest tests to treat anything under xpack as a module. A side effect of this is that QA plugins under xpack get treated as modules. This is ok because they are just for testing, we don't need to validate them in the same way we do actual plugins. Additionally, this commit relaxes the expection that modules are only added for the integ test distribution. There is already a check to not overwrite an existing module, so this wasn't a useful optimization anyways.
|
Pinging @elastic/es-core-infra (:Core/Infra/Build) |
mark-vieira
left a comment
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.
One comment for some bonus cleanup but otherwise LGTM.
| if (project.getPath().contains("modules:") || project.getPath().startsWith(":x-pack:plugin")) { | ||
| testTask.getClusters().forEach(c -> c.module(bundle.getArchiveFile())); | ||
| } else { | ||
| testTask.getClusters().forEach(c -> c.plugin(project.getObjects().fileProperty().value(bundle.getArchiveFile()))); |
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.
Can we simplify this nested provider while we're here?
When rest tests install plugins, they currently treat xpack as plugins instead of modules. This was a side effect of splitting the rest test plugin out from PluginBuildPlugin. However, that means xpack modules are being run through the elasticsearch plugin installer, which is not guaranteed to work. This commit reworks rest tests to treat anything under xpack as a module. A side effect of this is that QA plugins under xpack get treated as modules. This is ok because they are just for testing, we don't need to validate them in the same way we do actual plugins. Additionally, this commit relaxes the expection that modules are only added for the integ test distribution. There is already a check to not overwrite an existing module, so this wasn't a useful optimization anyways.
When rest tests install plugins, they currently treat xpack as plugins
instead of modules. This was a side effect of splitting the rest test
plugin out from PluginBuildPlugin. However, that means xpack modules are
being run through the elasticsearch plugin installer, which is not
guaranteed to work. This commit reworks rest tests to treat anything
under xpack as a module. A side effect of this is that QA plugins under
xpack get treated as modules. This is ok because they are just for
testing, we don't need to validate them in the same way we do actual
plugins. Additionally, this commit relaxes the expection that modules
are only added for the integ test distribution. There is already a check
to not overwrite an existing module, so this wasn't a useful
optimization anyways.