Fixing RestIntegTestTask runtime configuration#1
Conversation
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
| } | ||
|
|
||
| tasks.withType(RestIntegTestTask)*.configure { | ||
| classpath += files(project.configurations.runtimeClasspath.findAll { it.name.contains("log4j-core") }) |
There was a problem hiding this comment.
Just to explain what I found out:
- the RestIntegTestTask needs log4j-core (it is used by test scaffolding)
- in OpenSearch core, log4j-core comes as part of
servermodule but this dependency isoptional - it seems like when dependencies are declared within the same multimodule build using
project, the optional dependencies are included, otherwise - they are not
There was a problem hiding this comment.
PS: For some reasons, just adding the log4j-core to dependencies section does not solve the problem, may be because RestIntegTestPlugin includes only org.opensearch:opensearch module dependencies? I did not fully understand that yet ...
There was a problem hiding this comment.
Great find. This is tricky
The way these dependencies are set is a pain point for plugin developers.
There was a problem hiding this comment.
Yeah, it took me a while to dig through classloaders & co to find out that :-(
There was a problem hiding this comment.
Daaam.... @reta Can you please open a bug in OpenSearch describing this mess and maybe suggesting how we can get out of it?
|
MUCH thanks! I couldn't figure this one out. |
Signed-off-by: Andriy Redko andriy.redko@aiven.io