OpenSearch: [BUG] Unable to install lang-painless module when testDistribution is set to INTEG_TEST for k-NN
What is the bug? For k-NN, I am trying to run integ tests on Mac. To do this, I first switched testDistribution from ARCHIVE to INTEG_TEST. Otherwise, it cannot find the OpenSearch artifact:
Execution failed for task ':run'.
> Could not resolve all files for configuration ':opensearch_distro_extracted_testclusters--integTest-0-1.3.0-SNAPSHOT-'.
> Could not resolve opensearch-distribution-snapshot:opensearch:1.3.0-SNAPSHOT.
Required by:
project :
> Could not resolve opensearch-distribution-snapshot:opensearch:1.3.0-SNAPSHOT.
> Could not get resource 'https://artifacts.opensearch.org/snapshots/core/opensearch/1.3.0-SNAPSHOT/opensearch-min-1.3.0-SNAPSHOT-darwin-x64-latest.tar.gz'.
> Could not HEAD 'https://artifacts.opensearch.org/snapshots/core/opensearch/1.3.0-SNAPSHOT/opensearch-min-1.3.0-SNAPSHOT-darwin-x64-latest.tar.gz'. Received status code 403 from server: Forbidden
After making the above switch, it is able to download, but fails with the following error (k-NN has a dependency on lang-painless):
| Exception in thread "main" java.lang.IllegalArgumentException: Missing plugin [lang-painless], dependency of [opensearch-knn]
| at org.opensearch.plugins.PluginsService.addSortedBundle(PluginsService.java:512)
| at org.opensearch.plugins.PluginsService.sortBundles(PluginsService.java:480)
| at org.opensearch.plugins.InstallPluginCommand.jarHellCheck(InstallPluginCommand.java:839)
| at org.opensearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:813)
| at org.opensearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:858)
| at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:263)
| at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:237)
| at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:100)
| at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
| at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
| at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
| at org.opensearch.cli.Command.main(Command.java:101)
| at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)
This is because the modules do not come with the INTEG_TEST distribution.
So, I create the lang painless module from source and placed it in test resources. Then, I add it as a plugin. However, this then fails with this error:
| ERROR: plugin 'lang-painless' cannot be installed as a plugin, it is a system module
So, I switch this line from plugin to module. However, this then produces the missing plugin error again:
| Exception in thread "main" java.lang.IllegalArgumentException: Missing plugin [lang-painless], dependency of [opensearch-knn]
| at org.opensearch.plugins.PluginsService.addSortedBundle(PluginsService.java:512)
| at org.opensearch.plugins.PluginsService.sortBundles(PluginsService.java:480)
| at org.opensearch.plugins.InstallPluginCommand.jarHellCheck(InstallPluginCommand.java:839)
| at org.opensearch.plugins.InstallPluginCommand.loadPluginInfo(InstallPluginCommand.java:813)
| at org.opensearch.plugins.InstallPluginCommand.installPlugin(InstallPluginCommand.java:858)
| at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:263)
| at org.opensearch.plugins.InstallPluginCommand.execute(InstallPluginCommand.java:237)
| at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:100)
| at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
| at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)
| at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138)
| at org.opensearch.cli.Command.main(Command.java:101)
| at org.opensearch.plugins.PluginCli.main(PluginCli.java:60)
I was wondering if there is any way to prevent gradle from attempting to install an extended plugin as a plugin when it is a module.
How can one reproduce the bug? Steps to reproduce the behavior:
- Clone the repo
git clone https://github.com/jmazanec15/k-NN-1.git
cd k-NN-1
git checkout build-on-mac
- Install dependencies
brew install openblas
- Run build
./gradlew build
What is the expected behavior? Expect to be able to add lang-painless as a module.
What is your host/environment?
- OS: Mac Big Sur
- Version 1.3
- Plugins k-NN, lang-painless
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 25 (25 by maintainers)
Closing this. Thanks for all the work @prudhvigodithi.
We are currently exploring this option. We will update this thread soon with our findings.
CC: @prudhvigodithi @saratvemulapalli @jmazanec15 @dblock
@prudhvigodithi Thanks for the work. This was really a blocker for the development on mac.
Absolutely, I feel the pain as well 😃.
Yeah that would be a nice intermediate step which unblocks this, I love this idea. Which is btw already available from OpenSearch, its just that opensearch-build has to publish the artifact.
Is this something your team could consider ? @bbarani @peterzhuamazon