Skip to content
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

Elasticsearch maven/gradle plugin #21119

Closed
nik9000 opened this issue Oct 25, 2016 · 12 comments
Closed

Elasticsearch maven/gradle plugin #21119

nik9000 opened this issue Oct 25, 2016 · 12 comments
Labels
:Delivery/Build Build or test infrastructure help wanted adoptme Team:Delivery Meta label for Delivery team

Comments

@nik9000
Copy link
Member

nik9000 commented Oct 25, 2016

Now that we're quite explicit about not supporting embedded Elasticsearch, maybe we can made a maven and a gradle plugin to that jvm projects can use to start Elasticsearch before running their integration tests?

It'd certainly be nice to have one.

@dadoonet
Copy link
Member

@nik9000
Copy link
Member Author

nik9000 commented Oct 25, 2016

Nice!

I wonder if we should have something as part of our build so we don't break it. That plugin looks wonderful though!

@rjernst
Copy link
Member

rjernst commented Nov 2, 2016

For gradle, it also exists already as part of our build tools. This is what the qa projects use, elasticsearch.rest-test (we could probably split it out to allow only starting up a cluster, eg elasticsearch.test-cluster).

@clintongormley clintongormley added the :Delivery/Build Build or test infrastructure label Nov 3, 2016
@ywelsch
Copy link
Contributor

ywelsch commented Nov 4, 2016

For the transport client as well as for the test framework it would be nice to have tests that check whether the dependencies can be properly consumed (from Maven/Gradle/SBT) when using a local maven repo with all dependencies properly packaged. This would consist of a simple build file and a sample class file that connects to an Elasticsearch instance running locally and executing a few commands. We could then have assertions on the exact output we expect. We could then publish the same code as part of the documentation.

@nik9000
Copy link
Member Author

nik9000 commented Nov 4, 2016

@ywelsch that makes sense to me. I think maybe that is a separate issue that is blocked on having this.

@ywelsch
Copy link
Contributor

ywelsch commented Nov 4, 2016

@nik9000 you're right, it's a separate concern. I've opened #21338

@hub-cap
Copy link
Contributor

hub-cap commented Mar 14, 2018

If these both exist in some form, is there more work to do here? cc @nik9000 @rjernst

@hub-cap hub-cap added :Delivery/Build Build or test infrastructure and removed :Delivery/Build Build or test infrastructure labels Mar 14, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@rjernst
Copy link
Member

rjernst commented Mar 17, 2018

This can be closed. While we still don't have any official maven plugin for testing like this, something does exist, and it is not a priority to provide something officially.

@rjernst rjernst closed this as completed Mar 17, 2018
@jsmucr
Copy link

jsmucr commented Jul 25, 2019

It would be nice to have at least one example of a custom plugin along with the integration tests and a testing cluster setup. Sadly, not everything can be solved using the standalone analyzers and there's pretty much nothing to encourage developers into creating new plugins. In order to create a new plugin, I have to dig very deep into the ES code and spend weeks by eventually finding out that something that would make sense was deprecated in favor of something that's overly complicated. Disappointing. :(

@alpar-t
Copy link
Contributor

alpar-t commented Jul 30, 2019

@jsmucr we are sorry you feel that way.
Have you seen the example plugins we would also love to hear more on discuss you can also get help there.

@jsmucr
Copy link

jsmucr commented Jul 30, 2019

@atorok I created the tests I currently use by reusing parts of the Elasticsearch test suite itself. Honestly, I didn't look at the examples much because I'm only interested in EDI files analysis. So in the end I ended up testing my plugin the same way you (I mean the devs) test the analysis plugins officially. But then I started to have problems with testing the plugin using the same mapping I use in the production because of lack of the standard analyzers and filters in the embedded ES. This led me here only to learn that the official way of testing is deprecated.

Later I figured out that it's not completely true that the functionality I was after isn't available. Just the tokenizer and filter factories were missing and unpublished. So I reimplemented these factories and republished it under my own name just for the testing purposes.

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 help wanted adoptme Team:Delivery Meta label for Delivery team
Projects
None yet
Development

No branches or pull requests

10 participants