atlasdb icon indicating copy to clipboard operation
atlasdb copied to clipboard

Transitive dependency introduces dropwizard metrics-core major version change

Open dtobin opened this issue 6 years ago • 2 comments

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

dtobin avatar Nov 07 '19 21:11 dtobin

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.

clockfort avatar Nov 07 '19 21:11 clockfort

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).

iamdanfox avatar Nov 08 '19 15:11 iamdanfox