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

Remove duplicate dependency declaration for http client #19580

Conversation

danielmitterdorfer
Copy link
Member

We disable transitive dependencies in our build plugin
for all dependencies except for the group org.elasticsearch`.
However, in the reindex plugin we depend on the REST client
and declare its dependencies again which is not necessary
(and led to problems with conflicting versions in #19281.
After a fair amount of digging / debugging the build I am
still not sure why though.)

With this PR we remove the duplicate declaration.

We [disable transitive dependencies in our build plugin](https://github.com/elastic/elasticsearch/blob/2d1b0587dd57a74c48022f5456467ab8873a2d0c/buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy#L253-L265) for all dependencies except for the group "org.elasticsearch". However, in the reindex plugin we depend on the REST client and declare its dependencies again which is not necessary (and led to problems with conflicting versions in elastic#19281. After a fair amount of digging / debugging the build I am still not sure why though.)

With this PR we remove the duplicate declaration.
@nik9000
Copy link
Member

nik9000 commented Jul 25, 2016

LGTM. @javanna, I think it is important you have a look too.

I didn't know that that is how we handled Elasticsearch's transitive dependencies.

@javanna
Copy link
Member

javanna commented Jul 25, 2016

this change looks good to me. I am not sure whether long term we should rather disable transitive deps for o.e.client. maybe @rjernst can comment on that?

Note that the conflict problem originates from httpaasyncclient which depends on httpclient 4.5.2 and httpcore 4.4.5, but httpclient 4.5.2 depends on httpcore 4.4.4. Weird situation.

We should also figure out whether there may be problems with commons-codec and commons-logging versions, I think Daniel found problems there too.

@nik9000
Copy link
Member

nik9000 commented Jul 25, 2016

We should also figure out whether there may be problems with commons-codec and commons-logging versions, I think Daniel found problems there too.

So long as we're just removing duplicate deps its ok with me. If we start getting diverging version numbers I think we're in a bad place.

@rjernst
Copy link
Member

rjernst commented Jul 25, 2016

I am not sure whether long term we should rather disable transitive deps for o.e.client. maybe @rjernst can comment on that?

No, I don't think we should. We should not pull in anything in o.e.client that is not actually needed by the client.

@nik9000
Copy link
Member

nik9000 commented Jul 25, 2016

No, I don't think we should. We should not pull in anything in o.e.client that is not actually needed by the client.

I don't understand your answer. If we depend on o.e.client like we do in reindex should we have to list its deps in reindex or not? We don't now.

I don't think we're talking about allowing o.e.client to skip declaring its own transitive dependencies.

@rjernst
Copy link
Member

rjernst commented Jul 25, 2016

If we depend on o.e.client like we do in reindex should we have to list its deps in reindex or not? We don't now

No, I don't think we should, for the same reason we do not for any plugin/module that depends on core. One of the main reasons for disabling transitive dependencies is to ensure we vet all dependencies. We have done that for o.e.client, so why would we need to do it again inside reindex?

@javanna
Copy link
Member

javanna commented Jul 25, 2016

thanks for the explanation Ryan, makes sense. LGTM then

@danielmitterdorfer
Copy link
Member Author

@nik9000, @javanna, @rjernst thanks for the review.

@danielmitterdorfer danielmitterdorfer merged commit d7d3b1a into elastic:master Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Clients/Java Low Level REST Client Minimal dependencies Java Client for Elasticsearch >enhancement v5.0.0-alpha5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants