Skip to content

Conversation

@rjernst
Copy link
Member

@rjernst rjernst commented Nov 9, 2020

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.
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Build)

@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Nov 9, 2020
Copy link
Contributor

@mark-vieira mark-vieira left a 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())));
Copy link
Contributor

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?

@rjernst rjernst merged commit f559847 into elastic:master Nov 9, 2020
@rjernst rjernst deleted the build_module_tests branch November 9, 2020 23:58
rjernst added a commit that referenced this pull request Nov 10, 2020
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.
@mark-vieira mark-vieira added Team:Delivery Meta label for Delivery team and removed Team:Core/Infra Meta label for core/infra team labels Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Delivery/Build Build or test infrastructure >refactoring Team:Delivery Meta label for Delivery team v7.11.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants