palantir / atlasdb

Transactional Distributed Database Layer
https://palantir.github.io/atlasdb/
Apache License 2.0
55 stars 14 forks source link

Transitive dependency introduces dropwizard metrics-core major version change #4393

Open dtobin opened 5 years ago

dtobin commented 5 years ago

atlasdb 0.172.1 sets io.dropwizard.metrics:metrics-* = 3.2.3 in its versions.props, but because of a new dependency on com.datastax.oss:java-driver-core:4.3.0, clients depending on atlasdb 0.172.1 will resolve a transitive dependency on io.dropwizard.metrics:metrics-core:4.0.5.

If atlasdb intends to depend on io.dropwizard.metrics:metrics-core:4.0.5, we should change the version in versions.props and communicate the change in the release notes. Otherwise we should drop the com.datastax.oss:java-driver-core dependency or exclude the transitive dependency on metrics-core.

Looks like the com.datastax.oss:java-driver-core:4.3.0 dependency was introduced by this change: https://github.com/palantir/atlasdb/pull/4375

clockfort commented 5 years ago

The datastax driver has been previously a problem; their dependency management is getting better over time but is still problematic for most large enterprise java codebases. I previously put some dependency shading in atlas specifically for problematic dependencies from datastax's driver; it might be that smooshing the datastax-transitive dropwizard in there as well could fix this.

iamdanfox commented 5 years ago

FYI the reason we've historically stayed on dropwizard-metrics 3.X is because spark and hadoop compile against 3.X classes, so just dropping in 4.X jars would cause NoSuchMethodErrors at runtime.

I think they're still working on a 5.X rev which has a new io.dropwizard.metrics5 package name which should be able to co-exist peacefully with 3.X (https://mvnrepository.com/artifact/io.dropwizard.metrics5/metrics-core).