diff --git a/.bazelrc b/.bazelrc new file mode 100644 index 0000000..e123082 --- /dev/null +++ b/.bazelrc @@ -0,0 +1,8 @@ +# Java language version used by source code and any tools that are compiled in-build. +# This is also the minimum Java runtime version that the compiled code will execute with. +build --java_language_version=17 +build --tool_java_language_version=17 + +# Java runtime version used for running tests and tools that need to run as part of a build. +build --java_runtime_version=remotejdk_17 +build --tool_java_runtime_version=remotejdk_17 diff --git a/.bazelversion b/.bazelversion index ac14c3d..f22d756 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -5.1.1 +6.5.0 diff --git a/3rdparty/jvm/com/fasterxml/jackson/core/BUILD b/3rdparty/jvm/com/fasterxml/jackson/core/BUILD index 8e4fbc5..26d1fa8 100644 --- a/3rdparty/jvm/com/fasterxml/jackson/core/BUILD +++ b/3rdparty/jvm/com/fasterxml/jackson/core/BUILD @@ -29,5 +29,6 @@ java_library( runtime_deps = [ ":jackson_annotations", ":jackson_core", + "//3rdparty/jvm/net/bytebuddy:byte_buddy", ], ) diff --git a/3rdparty/jvm/com/fasterxml/jackson/dataformat/BUILD b/3rdparty/jvm/com/fasterxml/jackson/dataformat/BUILD index 5aabfb2..72d0b33 100644 --- a/3rdparty/jvm/com/fasterxml/jackson/dataformat/BUILD +++ b/3rdparty/jvm/com/fasterxml/jackson/dataformat/BUILD @@ -23,6 +23,7 @@ java_library( ], runtime_deps = [ "//3rdparty/jvm/com/fasterxml/jackson/core:jackson_core", + "//3rdparty/jvm/com/fasterxml/jackson/core:jackson_databind", "//3rdparty/jvm/org/yaml:snakeyaml", ], ) diff --git a/3rdparty/jvm/com/fasterxml/jackson/module/BUILD b/3rdparty/jvm/com/fasterxml/jackson/module/BUILD index 119cbc3..2a33ae5 100644 --- a/3rdparty/jvm/com/fasterxml/jackson/module/BUILD +++ b/3rdparty/jvm/com/fasterxml/jackson/module/BUILD @@ -12,20 +12,6 @@ java_library( ], ) -java_library( - name = "jackson_module_paranamer", - visibility = [ - "//3rdparty/jvm:__subpackages__", - ], - exports = [ - "//external:jar/com/fasterxml/jackson/module/jackson_module_paranamer", - ], - runtime_deps = [ - "//3rdparty/jvm/com/fasterxml/jackson/core:jackson_databind", - "//3rdparty/jvm/com/thoughtworks/paranamer", - ], -) - scala_import( name = "jackson_module_scala", jars = [ @@ -35,11 +21,10 @@ scala_import( "//visibility:public", ], runtime_deps = [ - ":jackson_module_paranamer", "//3rdparty/jvm/com/fasterxml/jackson/core:jackson_annotations", "//3rdparty/jvm/com/fasterxml/jackson/core:jackson_core", "//3rdparty/jvm/com/fasterxml/jackson/core:jackson_databind", + "//3rdparty/jvm/com/thoughtworks/paranamer", "//3rdparty/jvm/org/scala_lang:scala_library", - "//3rdparty/jvm/org/scala_lang:scala_reflect", ], ) diff --git a/3rdparty/jvm/net/bytebuddy/BUILD b/3rdparty/jvm/net/bytebuddy/BUILD new file mode 100644 index 0000000..4d38a71 --- /dev/null +++ b/3rdparty/jvm/net/bytebuddy/BUILD @@ -0,0 +1,19 @@ +java_library( + name = "byte_buddy", + visibility = [ + "//3rdparty/jvm:__subpackages__", + ], + exports = [ + "//external:jar/net/bytebuddy/byte_buddy", + ], +) + +java_library( + name = "byte_buddy_agent", + visibility = [ + "//3rdparty/jvm:__subpackages__", + ], + exports = [ + "//external:jar/net/bytebuddy/byte_buddy_agent", + ], +) diff --git a/3rdparty/jvm/org/hamcrest/BUILD b/3rdparty/jvm/org/hamcrest/BUILD index 0957d9e..4ba6e57 100644 --- a/3rdparty/jvm/org/hamcrest/BUILD +++ b/3rdparty/jvm/org/hamcrest/BUILD @@ -1,7 +1,7 @@ java_library( name = "hamcrest_core", visibility = [ - "//visibility:public", + "//3rdparty/jvm:__subpackages__", ], exports = [ "//external:jar/org/hamcrest/hamcrest_core", diff --git a/3rdparty/jvm/org/mockito/BUILD b/3rdparty/jvm/org/mockito/BUILD index 4fa96f3..bb78101 100644 --- a/3rdparty/jvm/org/mockito/BUILD +++ b/3rdparty/jvm/org/mockito/BUILD @@ -1,13 +1,3 @@ -java_library( - name = "mockito_all", - visibility = [ - "//visibility:public", - ], - exports = [ - "//external:jar/org/mockito/mockito_all", - ], -) - java_library( name = "mockito_core", visibility = [ @@ -17,7 +7,8 @@ java_library( "//external:jar/org/mockito/mockito_core", ], runtime_deps = [ - "//3rdparty/jvm/org/hamcrest:hamcrest_core", + "//3rdparty/jvm/net/bytebuddy:byte_buddy", + "//3rdparty/jvm/net/bytebuddy:byte_buddy_agent", "//3rdparty/jvm/org/objenesis", ], ) diff --git a/3rdparty/workspace.bzl b/3rdparty/workspace.bzl index 2238093..d5751c6 100644 --- a/3rdparty/workspace.bzl +++ b/3rdparty/workspace.bzl @@ -71,35 +71,30 @@ def list_dependencies(): {"artifact": "ch.qos.logback:logback-classic:1.2.1", "lang": "java", "sha1": "706a8b8206ead3683ec639dd270d11fd948fbb0e", "sha256": "368ed7aef1cf597d8e59a3ccda55bc82ed2174f8ecc495c4b653247708a49d73", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/ch/qos/logback/logback-classic/1.2.1/logback-classic-1.2.1.jar", "source": {"sha1": "9fca3c77b4401de7541f01d858b2aec55f4fc51f", "sha256": "adc529de34f5ffb08f0a02a62f6f6ac816728dd8ed1fad7ec5ff4f255f53e11c", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/ch/qos/logback/logback-classic/1.2.1/logback-classic-1.2.1-sources.jar"}, "name": "ch_qos_logback_logback_classic", "actual": "@ch_qos_logback_logback_classic//jar", "bind": "jar/ch/qos/logback/logback_classic"}, {"artifact": "ch.qos.logback:logback-core:1.2.1", "lang": "java", "sha1": "0378913dfc3c6c71e7e2a2853eff2c3e8ac27599", "sha256": "2ab00a18d414d1c43a7f8ba286f16f323c6b940ca775cdfd974dd6c127a35b25", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/ch/qos/logback/logback-core/1.2.1/logback-core-1.2.1.jar", "source": {"sha1": "8025b15884a6a3909c6b0fe881c81b647f2fc7fe", "sha256": "d2ec8370638bb1ab066fbd8c25a15506611b951a982693112c92f295e12fc46b", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/ch/qos/logback/logback-core/1.2.1/logback-core-1.2.1-sources.jar"}, "name": "ch_qos_logback_logback_core", "actual": "@ch_qos_logback_logback_core//jar", "bind": "jar/ch/qos/logback/logback_core"}, {"artifact": "com.beust:jcommander:1.72", "lang": "java", "sha1": "6375e521c1e11d6563d4f25a07ce124ccf8cd171", "sha256": "e0de160b129b2414087e01fe845609cd55caec6820cfd4d0c90fabcc7bdb8c1e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/beust/jcommander/1.72/jcommander-1.72.jar", "source": {"sha1": "7ef123d5dfb6f839b41265648ff1be34982d50f8", "sha256": "9b4fddc257d3572696333f48158802243141ce46579d92f0a4c0b2c14956b49d", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/beust/jcommander/1.72/jcommander-1.72-sources.jar"}, "name": "com_beust_jcommander", "actual": "@com_beust_jcommander//jar", "bind": "jar/com/beust/jcommander"}, - # duplicates in com.fasterxml.jackson.core:jackson-annotations fixed to 2.9.5 - # - com.fasterxml.jackson.core:jackson-databind:2.9.5 wanted version 2.9.0 - # - com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.5 wanted version 2.9.0 - # - com.fasterxml.jackson.module:jackson-module-scala_2.12:2.9.5 wanted version 2.9.5 - {"artifact": "com.fasterxml.jackson.core:jackson-annotations:2.9.5", "lang": "java", "sha1": "9056ec9db21c57d43219a84bb18c129ae51c6a5d", "sha256": "38a0e450049f643570adac99888aa3480ec2de385790a7096908bf43bfc085d6", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.9.5/jackson-annotations-2.9.5.jar", "source": {"sha1": "02fc22732b6e1e7b6ed5eebfab8866766bb3a84d", "sha256": "3512ca54884823379de7d962cec90f205f9836856f40080e698f6303a1a23c43", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.9.5/jackson-annotations-2.9.5-sources.jar"}, "name": "com_fasterxml_jackson_core_jackson_annotations", "actual": "@com_fasterxml_jackson_core_jackson_annotations//jar", "bind": "jar/com/fasterxml/jackson/core/jackson_annotations"}, - # duplicates in com.fasterxml.jackson.core:jackson-core fixed to 2.9.5 - # - com.fasterxml.jackson.core:jackson-databind:2.9.5 wanted version 2.9.5 - # - com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.5 wanted version 2.9.5 - # - com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.5 wanted version 2.9.5 + {"artifact": "com.fasterxml.jackson.core:jackson-annotations:2.17.0", "lang": "java", "sha1": "880a742337010da4c851f843d8cac150e22dff9f", "sha256": "8562569a001d46e84ea23802257e33c8f68b24eb47c1e0efd133a0372c512959", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.17.0/jackson-annotations-2.17.0.jar", "source": {"sha1": "536350a2ea1e4f5bcc7f716797af19a2ddf0f53e", "sha256": "d758d47fa8b7d05006958191ca816ca3ea4795ee97b1adefa84f03b3dfd01d40", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.17.0/jackson-annotations-2.17.0-sources.jar"}, "name": "com_fasterxml_jackson_core_jackson_annotations", "actual": "@com_fasterxml_jackson_core_jackson_annotations//jar", "bind": "jar/com/fasterxml/jackson/core/jackson_annotations"}, + # duplicates in com.fasterxml.jackson.core:jackson-core fixed to 2.17.0 + # - com.fasterxml.jackson.core:jackson-databind:2.17.0 wanted version 2.17.0 + # - com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.17.0 wanted version 2.17.0 + # - com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.0 wanted version 2.17.0 # - com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.5 wanted version 2.10.5 - # - com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.5 wanted version 2.9.5 - # - com.fasterxml.jackson.module:jackson-module-scala_2.12:2.9.5 wanted version 2.9.5 - {"artifact": "com.fasterxml.jackson.core:jackson-core:2.9.5", "lang": "java", "sha1": "a22ac51016944b06fd9ffbc9541c6e7ce5eea117", "sha256": "a2bebaa325ad25455b02149c67e6052367a7d7fc1ce77de000eed284a5214eac", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.9.5/jackson-core-2.9.5.jar", "source": {"sha1": "739ee692a42ee8c0cf9d3c504f0df568797b0a85", "sha256": "fc30dc19b7911a0748229110fd3915b951012d1e785701a4cfd0f797396290de", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.9.5/jackson-core-2.9.5-sources.jar"}, "name": "com_fasterxml_jackson_core_jackson_core", "actual": "@com_fasterxml_jackson_core_jackson_core//jar", "bind": "jar/com/fasterxml/jackson/core/jackson_core"}, - # duplicates in com.fasterxml.jackson.core:jackson-databind fixed to 2.9.5 - # - com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.5 wanted version 2.9.5 + # - com.fasterxml.jackson.module:jackson-module-parameter-names:2.17.0 wanted version 2.17.0 + # - com.fasterxml.jackson.module:jackson-module-scala_2.12:2.17.0 wanted version 2.17.0 + {"artifact": "com.fasterxml.jackson.core:jackson-core:2.17.0", "lang": "java", "sha1": "a6e5058ef9720623c517252d17162f845306ff3a", "sha256": "55be130f6a68038088a261856c4e383ce79957a0fc1a29ecb213a9efd6ef4389", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.17.0/jackson-core-2.17.0.jar", "source": {"sha1": "7e3408d602e036a52ba6a40d5e1ba76fb61b644c", "sha256": "97f4f4a85bf4da59174dde187130bddb927ac31320b385ed8ef1439c00df00f2", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-core/2.17.0/jackson-core-2.17.0-sources.jar"}, "name": "com_fasterxml_jackson_core_jackson_core", "actual": "@com_fasterxml_jackson_core_jackson_core//jar", "bind": "jar/com/fasterxml/jackson/core/jackson_core"}, + # duplicates in com.fasterxml.jackson.core:jackson-databind fixed to 2.17.0 + # - com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.17.0 wanted version 2.17.0 + # - com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.0 wanted version 2.17.0 # - com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.5 wanted version 2.10.5 - # - com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.5 wanted version 2.9.5 - # - com.fasterxml.jackson.module:jackson-module-paranamer:2.10.5 wanted version 2.10.5 - # - com.fasterxml.jackson.module:jackson-module-scala_2.12:2.9.5 wanted version 2.9.5 + # - com.fasterxml.jackson.module:jackson-module-parameter-names:2.17.0 wanted version 2.17.0 + # - com.fasterxml.jackson.module:jackson-module-scala_2.12:2.17.0 wanted version 2.17.0 # - org.apache.kafka:kafka-metadata:2.8.1 wanted version 2.10.5.1 # - org.apache.kafka:kafka-raft:2.8.1 wanted version 2.10.5.1 # - org.apache.kafka:kafka_2.12:2.8.1 wanted version 2.10.5.1 - {"artifact": "com.fasterxml.jackson.core:jackson-databind:2.9.5", "lang": "java", "sha1": "3490508379d065fe3fcb80042b62f630f7588606", "sha256": "0fb4e079c118e752cc94c15ad22e6782b0dfc5dc09145f4813fb39d82e686047", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.9.5/jackson-databind-2.9.5.jar", "source": {"sha1": "7f93f92d7ff619c1a49b5442ba77c0c297a88019", "sha256": "3993a5b825701d1f8a3313315129e36ca46216e81894f79f13b3d6cd76f1f0bf", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.9.5/jackson-databind-2.9.5-sources.jar"}, "name": "com_fasterxml_jackson_core_jackson_databind", "actual": "@com_fasterxml_jackson_core_jackson_databind//jar", "bind": "jar/com/fasterxml/jackson/core/jackson_databind"}, - {"artifact": "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.9.5", "lang": "java", "sha1": "df8cece8f7e675352ca08b833e29eebd581b4461", "sha256": "a38afcb60ed828ef46c56010857194d88998b9a95f507f610fd831daaf8a0579", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-csv/2.9.5/jackson-dataformat-csv-2.9.5.jar", "source": {"sha1": "4a7d4b210c169ffb3b26e7e4a5d4440c26157c0b", "sha256": "6b92f9bf85ef44b317df47f492e374215bf243034f47d0caaf2792ee4351045c", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-csv/2.9.5/jackson-dataformat-csv-2.9.5-sources.jar"}, "name": "com_fasterxml_jackson_dataformat_jackson_dataformat_csv", "actual": "@com_fasterxml_jackson_dataformat_jackson_dataformat_csv//jar", "bind": "jar/com/fasterxml/jackson/dataformat/jackson_dataformat_csv"}, - {"artifact": "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.5", "lang": "java", "sha1": "a10eb0c996b7b855b7dafa3abb0a39cb6873b9e7", "sha256": "adc1c495e9c7286bfa1d861ca07e06c8d0980057ad981b48b04f68eb8dcade2c", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.9.5/jackson-dataformat-yaml-2.9.5.jar", "source": {"sha1": "fe8d7cf2c6dc6266d265344038e0e609fd4cedfa", "sha256": "3587209e99860bb71b2da57efb530a3fc1b8b77abbd3b920705d19b0d26f3df4", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.9.5/jackson-dataformat-yaml-2.9.5-sources.jar"}, "name": "com_fasterxml_jackson_dataformat_jackson_dataformat_yaml", "actual": "@com_fasterxml_jackson_dataformat_jackson_dataformat_yaml//jar", "bind": "jar/com/fasterxml/jackson/dataformat/jackson_dataformat_yaml"}, + {"artifact": "com.fasterxml.jackson.core:jackson-databind:2.17.0", "lang": "java", "sha1": "7173e9e1d4bc6d7ca03bc4eeedcd548b8b580b34", "sha256": "d0ed5b54cb1b0bbb0828e24ce752a43a006dc188b34e3a4ae3238acc7b637418", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.17.0/jackson-databind-2.17.0.jar", "source": {"sha1": "4241e9bdb3e3c2fe8bdfad112b7794c44c40d1f2", "sha256": "2abe3703841fc6de7545279030bdff45c90ea21a5ea3e2238caccb35244919b7", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.17.0/jackson-databind-2.17.0-sources.jar"}, "name": "com_fasterxml_jackson_core_jackson_databind", "actual": "@com_fasterxml_jackson_core_jackson_databind//jar", "bind": "jar/com/fasterxml/jackson/core/jackson_databind"}, + {"artifact": "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.17.0", "lang": "java", "sha1": "d49d9b32b2c8d7a476c2cb069ff2a7588693dfbd", "sha256": "16368b24be6535ebe3e6b2569381404e80f8f845a08fe0bdc55a1e59ee04f1a0", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-csv/2.17.0/jackson-dataformat-csv-2.17.0.jar", "source": {"sha1": "fc730332eb316b85f08b8cdb0f4e016acf5e6469", "sha256": "3d029b742f37775b8e3ac6bcc69f1f086f8a2fe0ac80c679ff2917e803cc29b3", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-csv/2.17.0/jackson-dataformat-csv-2.17.0-sources.jar"}, "name": "com_fasterxml_jackson_dataformat_jackson_dataformat_csv", "actual": "@com_fasterxml_jackson_dataformat_jackson_dataformat_csv//jar", "bind": "jar/com/fasterxml/jackson/dataformat/jackson_dataformat_csv"}, + {"artifact": "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.0", "lang": "java", "sha1": "57a963c6258c49febc11390082d8503f71bb15a9", "sha256": "46b65ace036b01743710bcfc9e7f041eded2fc82ba0d3d83e19b32c818c18b4c", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.17.0/jackson-dataformat-yaml-2.17.0.jar", "source": {"sha1": "32358e7efc8727c3d2585999c0d9361934e76a39", "sha256": "e3f4c3b630fc12c551d3bb2e1538a23cde62d134d8db6030b46b353a0a95aa0e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.17.0/jackson-dataformat-yaml-2.17.0-sources.jar"}, "name": "com_fasterxml_jackson_dataformat_jackson_dataformat_yaml", "actual": "@com_fasterxml_jackson_dataformat_jackson_dataformat_yaml//jar", "bind": "jar/com/fasterxml/jackson/dataformat/jackson_dataformat_yaml"}, {"artifact": "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.5", "lang": "java", "sha1": "2e145b4eeccdfe0efc8f4aa38b80d493465f7064", "sha256": "216a7fb7a2e7ef160a3cfa6c0322984a492698df426ab83a064bd8a9b10f88ea", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.10.5/jackson-datatype-jdk8-2.10.5.jar", "source": {"sha1": "ab4d3365aa5f83170e167e52715e266ca95a61d1", "sha256": "417903ab860552b85505cfdb51f960b04a6a4acad613711e921c5e3ad2edf093", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.10.5/jackson-datatype-jdk8-2.10.5-sources.jar"}, "name": "com_fasterxml_jackson_datatype_jackson_datatype_jdk8", "actual": "@com_fasterxml_jackson_datatype_jackson_datatype_jdk8//jar", "bind": "jar/com/fasterxml/jackson/datatype/jackson_datatype_jdk8"}, - {"artifact": "com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.5", "lang": "java", "sha1": "f824c60751ffb7bfc3a0d30dfe0e42317d8e67f5", "sha256": "3e0aeec9733e1621753c99d8cb03993fdadd21a7dc463d28acebf739e740a463", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.5/jackson-module-parameter-names-2.9.5.jar", "source": {"sha1": "1f646ad214f99d908cccad438ce10b0a95679eee", "sha256": "b5fc856df448ab87f75fc15174792493dbdf6ad66e9cd6407077d721ffd0c46a", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names/2.9.5/jackson-module-parameter-names-2.9.5-sources.jar"}, "name": "com_fasterxml_jackson_module_jackson_module_parameter_names", "actual": "@com_fasterxml_jackson_module_jackson_module_parameter_names//jar", "bind": "jar/com/fasterxml/jackson/module/jackson_module_parameter_names"}, - {"artifact": "com.fasterxml.jackson.module:jackson-module-paranamer:2.10.5", "lang": "java", "sha1": "03907141093e7a5523becedba1dd27f7448caf0c", "sha256": "ef33bbfe6f85c2b17baf8e8bb586a2d96e6f2dc3095b1832b0b52d320fa0f758", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-paranamer/2.10.5/jackson-module-paranamer-2.10.5.jar", "source": {"sha1": "4a36e854848dea9085ad74286f33f0c21f092e55", "sha256": "ae03c39728376cf0cdc36d1ce9cc22909c3f87a23607a6d34631533b38cbbafd", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-paranamer/2.10.5/jackson-module-paranamer-2.10.5-sources.jar"}, "name": "com_fasterxml_jackson_module_jackson_module_paranamer", "actual": "@com_fasterxml_jackson_module_jackson_module_paranamer//jar", "bind": "jar/com/fasterxml/jackson/module/jackson_module_paranamer"}, - {"artifact": "com.fasterxml.jackson.module:jackson-module-scala_2.12:2.9.5", "lang": "scala", "sha1": "6d25f55a46cd6b74e7e0893719de145c29d00eae", "sha256": "30e269f7210759b71ae24d4326e21c78f7074bc9b3188f4dabfab29003aa8399", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-scala_2.12/2.9.5/jackson-module-scala_2.12-2.9.5.jar", "source": {"sha1": "605b56ba1261caeaa0eba7ddadc95d7417b2ef94", "sha256": "226e039bcedaf99967a0a538190a36e02d11a0f21adc4fa88c07d0862cb504d1", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-scala_2.12/2.9.5/jackson-module-scala_2.12-2.9.5-sources.jar"}, "name": "com_fasterxml_jackson_module_jackson_module_scala_2_12", "actual": "@com_fasterxml_jackson_module_jackson_module_scala_2_12//jar:file", "bind": "jar/com/fasterxml/jackson/module/jackson_module_scala_2_12"}, + {"artifact": "com.fasterxml.jackson.module:jackson-module-parameter-names:2.17.0", "lang": "java", "sha1": "59340d6d12c15bcc465a91a4b9a2a93a920c4212", "sha256": "1fd79421bb95c74cc4c44c1ae4910e9253f255f248d34c3f9e5b2abeb2145b6a", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names/2.17.0/jackson-module-parameter-names-2.17.0.jar", "source": {"sha1": "2fc59bdd31eb69b2219f9805a86032ca61dfc31d", "sha256": "7b685c1b1fda296b5aebde4aebb6503fec3c475626f66b61f0573b25ba43689e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-parameter-names/2.17.0/jackson-module-parameter-names-2.17.0-sources.jar"}, "name": "com_fasterxml_jackson_module_jackson_module_parameter_names", "actual": "@com_fasterxml_jackson_module_jackson_module_parameter_names//jar", "bind": "jar/com/fasterxml/jackson/module/jackson_module_parameter_names"}, + {"artifact": "com.fasterxml.jackson.module:jackson-module-scala_2.12:2.17.0", "lang": "scala", "sha1": "9c41e063dc7444b9fe51e353424d74d6d03a6ab3", "sha256": "868413f3e21fa0a7fc14e2877676cea777079375f1441287bfecb5ce4e1b8c17", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-scala_2.12/2.17.0/jackson-module-scala_2.12-2.17.0.jar", "source": {"sha1": "cf675bcef4d588acbda766f0b049fe8a969665d6", "sha256": "b5dd2d3416cf498904f003851dcf72f4327ec025a67e810185954e8acb86f045", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/fasterxml/jackson/module/jackson-module-scala_2.12/2.17.0/jackson-module-scala_2.12-2.17.0-sources.jar"}, "name": "com_fasterxml_jackson_module_jackson_module_scala_2_12", "actual": "@com_fasterxml_jackson_module_jackson_module_scala_2_12//jar:file", "bind": "jar/com/fasterxml/jackson/module/jackson_module_scala_2_12"}, {"artifact": "com.github.luben:zstd-jni:1.4.9-1", "lang": "java", "sha1": "7dc25611870925d32752c5b45d7d23ae01702f43", "sha256": "16bb6f70b6577db165bda521a30349fcdc698055893833a993c4553eba71a61b", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/github/luben/zstd-jni/1.4.9-1/zstd-jni-1.4.9-1.jar", "source": {"sha1": "befcbcaedd0fa804df797ed2caa797c9dcb16421", "sha256": "d3c59a7c77842d112d69358a352ad0a5e525c744bcc9668a14169a0d451ea6f5", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/github/luben/zstd-jni/1.4.9-1/zstd-jni-1.4.9-1-sources.jar"}, "name": "com_github_luben_zstd_jni", "actual": "@com_github_luben_zstd_jni//jar", "bind": "jar/com/github/luben/zstd_jni"}, {"artifact": "com.google.code.findbugs:jsr305:3.0.2", "lang": "java", "sha1": "25ea2e8b0c338a877313bd4672d3fe056ea78f0d", "sha256": "766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar", "source": {"sha1": "b19b5927c2c25b6c70f093767041e641ae0b1b35", "sha256": "1c9e85e272d0708c6a591dc74828c71603053b48cc75ae83cce56912a2aa063b", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-sources.jar"}, "name": "com_google_code_findbugs_jsr305", "actual": "@com_google_code_findbugs_jsr305//jar", "bind": "jar/com/google/code/findbugs/jsr305"}, {"artifact": "com.google.errorprone:error_prone_annotations:2.21.1", "lang": "java", "sha1": "6d9b10773b5237df178a7b3c1b4208df7d0e7f94", "sha256": "d1f3c66aa91ac52549e00ae3b208ba4b9af7d72d68f230643553beb38e6118ac", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1.jar", "source": {"sha1": "68e62df0cf0c3927fa98f6d795543ecbeb919521", "sha256": "29012a51bb8d7d7bdd7db882f46dec8cccb36b40f34b6e5de2ec7dd647b372ca", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.21.1/error_prone_annotations-2.21.1-sources.jar"}, "name": "com_google_errorprone_error_prone_annotations", "actual": "@com_google_errorprone_error_prone_annotations//jar", "bind": "jar/com/google/errorprone/error_prone_annotations"}, @@ -145,15 +140,20 @@ def list_dependencies(): {"artifact": "io.prometheus:simpleclient_common:0.5.0", "lang": "java", "sha1": "bfd93082d7cf85c0543c2ccc286b96c817d1090c", "sha256": "41d881034a44639d5717d71c61d207b8580bc755e0c0a6f4a1ec7137a7274366", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/prometheus/simpleclient_common/0.5.0/simpleclient_common-0.5.0.jar", "source": {"sha1": "1453a353fa4332badc3775c57af7da535c28f554", "sha256": "73f144e653aa6d1929da515849157a7705cd29b5e0f07dc644888d4dfae74407", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/prometheus/simpleclient_common/0.5.0/simpleclient_common-0.5.0-sources.jar"}, "name": "io_prometheus_simpleclient_common", "actual": "@io_prometheus_simpleclient_common//jar", "bind": "jar/io/prometheus/simpleclient_common"}, {"artifact": "io.prometheus:simpleclient_hotspot:0.5.0", "lang": "java", "sha1": "0f341cb84d6713255b1ce46c7593eee50a35d414", "sha256": "93f4f9e43948599ce42e38b3899194a130989d967eba47233abe16177fef1d06", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/prometheus/simpleclient_hotspot/0.5.0/simpleclient_hotspot-0.5.0.jar", "source": {"sha1": "a263096758ae06f7f8306f143209e2581557c73f", "sha256": "4ab90ff5600abc6d9e2c8527693c766fdc7e67968288f3a13bb389c4b2e79b0e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/prometheus/simpleclient_hotspot/0.5.0/simpleclient_hotspot-0.5.0-sources.jar"}, "name": "io_prometheus_simpleclient_hotspot", "actual": "@io_prometheus_simpleclient_hotspot//jar", "bind": "jar/io/prometheus/simpleclient_hotspot"}, {"artifact": "io.prometheus:simpleclient_httpserver:0.5.0", "lang": "java", "sha1": "53fbb42b6501cee3c879ed2f8f86b64b105604aa", "sha256": "e3a42188c9b1dee3a0317496a8ffb461c958737188fe4a8bcd3a9f651e934a58", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/prometheus/simpleclient_httpserver/0.5.0/simpleclient_httpserver-0.5.0.jar", "source": {"sha1": "ff1bb4085fcda656337cfe40359a0b01f93b1159", "sha256": "bef0f25f9acff3e515f1822f91a96d298052a689ed42a420eb91a69993c8c68e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/io/prometheus/simpleclient_httpserver/0.5.0/simpleclient_httpserver-0.5.0-sources.jar"}, "name": "io_prometheus_simpleclient_httpserver", "actual": "@io_prometheus_simpleclient_httpserver//jar", "bind": "jar/io/prometheus/simpleclient_httpserver"}, - # duplicates in junit:junit fixed to 4.11 + # duplicates in junit:junit fixed to 4.13.2 # - com.google.guava:guava-testlib:32.1.3-jre wanted version 4.13.2 # - com.squareup.okhttp3:mockwebserver:3.8.1 wanted version 4.12 - {"artifact": "junit:junit:4.11", "lang": "java", "sha1": "4e031bb61df09069aeb2bffb4019e7a5034a4ee0", "sha256": "90a8e1603eeca48e7e879f3afbc9560715322985f39a274f6f6070b43f9d06fe", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11.jar", "source": {"sha1": "28e0ad201304e4a4abf999ca0570b7cffc352c3c", "sha256": "694f4694a51f67dadea4d2045742d38fb4efb92d82d42744b15e26ce653bcd3e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/junit/junit/4.11/junit-4.11-sources.jar"}, "name": "junit_junit", "actual": "@junit_junit//jar", "bind": "jar/junit/junit"}, + {"artifact": "junit:junit:4.13.2", "lang": "java", "sha1": "8ac9e16d933b6fb43bc7f576336b8f4d7eb5ba12", "sha256": "8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/junit/junit/4.13.2/junit-4.13.2.jar", "source": {"sha1": "33987872a811fe4d4001ed494b07854822257f42", "sha256": "34181df6482d40ea4c046b063cb53c7ffae94bdf1b1d62695bdf3adf9dea7e3a", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/junit/junit/4.13.2/junit-4.13.2-sources.jar"}, "name": "junit_junit", "actual": "@junit_junit//jar", "bind": "jar/junit/junit"}, {"artifact": "log4j:log4j:1.2.17", "lang": "java", "sha1": "5af35056b4d257e4b64b9e8069c0746e8b08629f", "sha256": "1d31696445697720527091754369082a6651bd49781b6005deb94e56753406f9", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.jar", "source": {"sha1": "677abe279b68c5e7490d6d50c6951376238d7d3e", "sha256": "4d9ba787af1692aa88417c2a47a37a98125d645b91ab556252dbee0f45225493", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17-sources.jar"}, "name": "log4j_log4j", "actual": "@log4j_log4j//jar", "bind": "jar/log4j/log4j"}, + {"artifact": "net.bytebuddy:byte-buddy-agent:1.12.19", "lang": "java", "sha1": "450917cf3b358b691a824acf4c67aa89c826f67e", "sha256": "3a70240de7cdcde04e7c504c2327d7035b9c25ae0206881e3bf4e6798a273ed8", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.12.19/byte-buddy-agent-1.12.19.jar", "source": {"sha1": "261284eb82c0c2280424cabfa00edbb713313217", "sha256": "1e0d73101549bda70048f53fdea8b1011a97db7ddfd233ac117a221ae7f6e027", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.12.19/byte-buddy-agent-1.12.19-sources.jar"}, "name": "net_bytebuddy_byte_buddy_agent", "actual": "@net_bytebuddy_byte_buddy_agent//jar", "bind": "jar/net/bytebuddy/byte_buddy_agent"}, + # duplicates in net.bytebuddy:byte-buddy promoted to 1.14.9 + # - com.fasterxml.jackson.core:jackson-databind:2.17.0 wanted version 1.14.9 + # - org.mockito:mockito-core:4.11.0 wanted version 1.12.19 + {"artifact": "net.bytebuddy:byte-buddy:1.14.9", "lang": "java", "sha1": "b69e7fff6c473d3ed2b489cdfd673a091fd94226", "sha256": "377352e253282bf86f731ac90ed88348e8f40a63ce033c00a85982de7e790e6f", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.9/byte-buddy-1.14.9.jar", "source": {"sha1": "6c36f86b91c864d5aabf4033324a4756bc72f99a", "sha256": "4039b20d06895bf0449161dd5f1cbbc2e81004af196d5b42c5536b91db8e0315", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.14.9/byte-buddy-1.14.9-sources.jar"}, "name": "net_bytebuddy_byte_buddy", "actual": "@net_bytebuddy_byte_buddy//jar", "bind": "jar/net/bytebuddy/byte_buddy"}, {"artifact": "net.sf.jopt-simple:jopt-simple:5.0.4", "lang": "java", "sha1": "4fdac2fbe92dfad86aa6e9301736f6b4342a3f5c", "sha256": "df26cc58f235f477db07f753ba5a3ab243ebe5789d9f89ecf68dd62ea9a66c28", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar", "source": {"sha1": "950831646d014c9162999019a3cb17d5fc01ac0d", "sha256": "06b283801a5a94ef697b7f2c79a048c4e2f848b3daddda61cab74d882bdd97a5", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4-sources.jar"}, "name": "net_sf_jopt_simple_jopt_simple", "actual": "@net_sf_jopt_simple_jopt_simple//jar", "bind": "jar/net/sf/jopt_simple/jopt_simple"}, {"artifact": "net.sourceforge.argparse4j:argparse4j:0.7.0", "lang": "java", "sha1": "6f0621d0c3888de39e0f06d01f37ba53a798e657", "sha256": "65ceb669d88f63306c680f8088bbf765bbca72d288a61a03703000076c3d3f56", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/net/sourceforge/argparse4j/argparse4j/0.7.0/argparse4j-0.7.0.jar", "source": {"sha1": "dc5e5b48261b5eb12c2804561a98f1fbc287bc07", "sha256": "e3b108dc1238e96da91c5dbbf6e920fcdebccf31d9f624f5f8fd0a09677fc4b9", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/net/sourceforge/argparse4j/argparse4j/0.7.0/argparse4j-0.7.0-sources.jar"}, "name": "net_sourceforge_argparse4j_argparse4j", "actual": "@net_sourceforge_argparse4j_argparse4j//jar", "bind": "jar/net/sourceforge/argparse4j/argparse4j"}, {"artifact": "org.antlr:antlr4-runtime:4.5.3", "lang": "java", "sha1": "2609e36f18f7e8d593cc1cddfb2ac776dc96b8e0", "sha256": "93bca08ec995caeaaf60bdf80035a0be8507fcdabd3c2618fd8c5aab4444a752", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3.jar", "source": {"sha1": "bed0a83e6afc677b188994f4652502e80b61e49c", "sha256": "e5347b0329dda2ff7e5f1067c6b64505549eab3e578d38e0af82c9bd1fb1f88d", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3-sources.jar"}, "name": "org_antlr_antlr4_runtime", "actual": "@org_antlr_antlr4_runtime//jar", "bind": "jar/org/antlr/antlr4_runtime"}, - {"artifact": "org.apache.commons:commons-lang3:3.7", "lang": "java", "sha1": "557edd918fd41f9260963583ebf5a61a43a6b423", "sha256": "6e8dc31e046508d9953c96534edf0c2e0bfe6f468966b5b842b3f87e43b6a847", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7.jar", "source": {"sha1": "e7e36219edde1c66c93495a75490d8f526c377cb", "sha256": "8c48529d61778cee7b44e1c5858c887abed5395f5d13d6d52931d14ab22f017f", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.7/commons-lang3-3.7-sources.jar"}, "name": "org_apache_commons_commons_lang3", "actual": "@org_apache_commons_commons_lang3//jar", "bind": "jar/org/apache/commons/commons_lang3"}, + {"artifact": "org.apache.commons:commons-lang3:3.12.0", "lang": "java", "sha1": "c6842c86792ff03b9f1d1fe2aab8dc23aa6c6f0e", "sha256": "d919d904486c037f8d193412da0c92e22a9fa24230b9d67a57855c5c31c7e94e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar", "source": {"sha1": "198b882fdc2c72c89c63401d946f6ba46c3acea3", "sha256": "325a4551eee7d99f7616aa05b00ee3ca9d0cdc8face1b252a9864f2d945c58b3", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0-sources.jar"}, "name": "org_apache_commons_commons_lang3", "actual": "@org_apache_commons_commons_lang3//jar", "bind": "jar/org/apache/commons/commons_lang3"}, {"artifact": "org.apache.kafka:kafka-clients:2.8.1", "lang": "java", "sha1": "cf4abb87e0d49670cf7a94e79eba14616be27418", "sha256": "ae5a9dc793af827b2a33f734018ae5bd6f29493085c2903063d3ecb8826cc0c1", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/kafka/kafka-clients/2.8.1/kafka-clients-2.8.1.jar", "source": {"sha1": "e1e597ea341675dd1211205becb72c901759a7f8", "sha256": "d9fdbc0c087aaf30aa0d4183a3824193b37a3462ad390d37453371320bca13bb", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/kafka/kafka-clients/2.8.1/kafka-clients-2.8.1-sources.jar"}, "name": "org_apache_kafka_kafka_clients", "actual": "@org_apache_kafka_kafka_clients//jar", "bind": "jar/org/apache/kafka/kafka_clients"}, {"artifact": "org.apache.kafka:kafka-clients:jar:test:2.8.1", "lang": "java", "sha1": "122a66141ef1006e927a78f8e123dfc301048346", "sha256": "b774d65ba44f3866261b3f4f217e19261451838067166cfb949a4122f5b01a90", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/kafka/kafka-clients/2.8.1/kafka-clients-2.8.1-test.jar", "source": {"sha1": "e1e597ea341675dd1211205becb72c901759a7f8", "sha256": "d9fdbc0c087aaf30aa0d4183a3824193b37a3462ad390d37453371320bca13bb", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/kafka/kafka-clients/2.8.1/kafka-clients-2.8.1-sources.jar"}, "name": "org_apache_kafka_kafka_clients_jar_test", "actual": "@org_apache_kafka_kafka_clients_jar_test//jar", "bind": "jar/org/apache/kafka/kafka_clients_jar_test"}, {"artifact": "org.apache.kafka:kafka-metadata:2.8.1", "lang": "java", "sha1": "0c064d560b52db3b35c2062234e8df5a1eb09a84", "sha256": "28e3f78548e1bdae4dead66ca4713b41ea3193ccfe2f663497850b26c9b1ea65", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/kafka/kafka-metadata/2.8.1/kafka-metadata-2.8.1.jar", "source": {"sha1": "28120b6cab8fd4c089588012bfca9f81b4adcea2", "sha256": "ec232290b9534ac781fc135fa76b62a4a69ccf1a6b2fa19ac5007731118d1173", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/apache/kafka/kafka-metadata/2.8.1/kafka-metadata-2.8.1-sources.jar"}, "name": "org_apache_kafka_kafka_metadata", "actual": "@org_apache_kafka_kafka_metadata//jar", "bind": "jar/org/apache/kafka/kafka_metadata"}, @@ -170,14 +170,10 @@ def list_dependencies(): {"artifact": "org.bouncycastle:bcprov-jdk15on:1.70", "lang": "java", "sha1": "4636a0d01f74acaf28082fb62b317f1080118371", "sha256": "8f3c20e3e2d565d26f33e8d4857a37d0d7f8ac39b62a7026496fcab1bdac30d4", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.70/bcprov-jdk15on-1.70.jar", "source": {"sha1": "6245e15dd47e5fc33cff275df61662e0a8e5958f", "sha256": "0252e39814e4403b5d91a7386c3a5ac3e1fe65d43c2d25fed8d45e8eebab2696", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.70/bcprov-jdk15on-1.70-sources.jar"}, "name": "org_bouncycastle_bcprov_jdk15on", "actual": "@org_bouncycastle_bcprov_jdk15on//jar", "bind": "jar/org/bouncycastle/bcprov_jdk15on"}, {"artifact": "org.bouncycastle:bcutil-jdk15on:1.70", "lang": "java", "sha1": "54280e7195a7430d7911ded93fc01e07300b9526", "sha256": "52dc5551b0257666526c5095424567fed7dc7b00d2b1ba7bd52298411112b1d0", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/bouncycastle/bcutil-jdk15on/1.70/bcutil-jdk15on-1.70.jar", "source": {"sha1": "4af4a6c92b8ea07885b27d8536b81b855497f4eb", "sha256": "5bc99f2da0436d62ab22a374a77a913f33c91f9c23f06f1fca4d62a66b24d303", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/bouncycastle/bcutil-jdk15on/1.70/bcutil-jdk15on-1.70-sources.jar"}, "name": "org_bouncycastle_bcutil_jdk15on", "actual": "@org_bouncycastle_bcutil_jdk15on//jar", "bind": "jar/org/bouncycastle/bcutil_jdk15on"}, {"artifact": "org.checkerframework:checker-qual:3.37.0", "lang": "java", "sha1": "ba74746d38026581c12166e164bb3c15e90cc4ea", "sha256": "e4ce1376cc2735e1dde220b62ad0913f51297704daad155a33f386bc5db0d9f7", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0.jar", "source": {"sha1": "9990309889a76e4c6556c18140ce8559b854bae3", "sha256": "2ca31c7e959ad82fe270b2baac11a59c570f8778191233c54927e94adab7b640", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.37.0/checker-qual-3.37.0-sources.jar"}, "name": "org_checkerframework_checker_qual", "actual": "@org_checkerframework_checker_qual//jar", "bind": "jar/org/checkerframework/checker_qual"}, - # duplicates in org.hamcrest:hamcrest-core fixed to 1.3 - # - junit:junit:4.11 wanted version 1.3 - # - org.mockito:mockito-core:1.10.19 wanted version 1.1 {"artifact": "org.hamcrest:hamcrest-core:1.3", "lang": "java", "sha1": "42a25dc3219429f0e5d060061f71acb49bf010a0", "sha256": "66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar", "source": {"sha1": "1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b", "sha256": "e223d2d8fbafd66057a8848cc94222d63c3cedd652cc48eddc0ab5c39c0f84df", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar"}, "name": "org_hamcrest_hamcrest_core", "actual": "@org_hamcrest_hamcrest_core//jar", "bind": "jar/org/hamcrest/hamcrest_core"}, {"artifact": "org.lz4:lz4-java:1.7.1", "lang": "java", "sha1": "c4d931ef8ad2c9c35d65b231a33e61428472d0da", "sha256": "f1167a45d4b8002053670ef6991ca66d1bab9dcc03e4ef00183674d2f3fb9cac", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/lz4/lz4-java/1.7.1/lz4-java-1.7.1.jar", "source": {"sha1": "1a37e596d5e62bd94000c6f0b5e3989f3b8d6a67", "sha256": "4c5adb34dec7ef6208cdae45a414a89727b74fea122b86ca6c76b4a93b472b47", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/lz4/lz4-java/1.7.1/lz4-java-1.7.1-sources.jar"}, "name": "org_lz4_lz4_java", "actual": "@org_lz4_lz4_java//jar", "bind": "jar/org/lz4/lz4_java"}, - {"artifact": "org.mockito:mockito-all:1.10.19", "lang": "java", "sha1": "539df70269cc254a58cccc5d8e43286b4a73bf30", "sha256": "d1a7a7ef14b3db5c0fc3e0a63a81b374b510afe85add9f7984b97911f4c70605", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/mockito/mockito-all/1.10.19/mockito-all-1.10.19.jar", "source": {"sha1": "8269667b73d9616600359a9b0ba1b1c7d0cf7a97", "sha256": "6c8680afe9cfdb6e0fe40aca1e27ded721252bd53107390f166f2077b9e5b16e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/mockito/mockito-all/1.10.19/mockito-all-1.10.19-sources.jar"}, "name": "org_mockito_mockito_all", "actual": "@org_mockito_mockito_all//jar", "bind": "jar/org/mockito/mockito_all"}, - {"artifact": "org.mockito:mockito-core:1.10.19", "lang": "java", "sha1": "e8546f5bef4e061d8dd73895b4e8f40e3fe6effe", "sha256": "d5831ee4f71055800821a34a3051cf1ed5b3702f295ffebd50f65fb5d81a71b8", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.jar", "source": {"sha1": "8269667b73d9616600359a9b0ba1b1c7d0cf7a97", "sha256": "6c8680afe9cfdb6e0fe40aca1e27ded721252bd53107390f166f2077b9e5b16e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19-sources.jar"}, "name": "org_mockito_mockito_core", "actual": "@org_mockito_mockito_core//jar", "bind": "jar/org/mockito/mockito_core"}, - {"artifact": "org.objenesis:objenesis:2.1", "lang": "java", "sha1": "87c0ea803b69252868d09308b4618f766f135a96", "sha256": "c74330cc6b806c804fd37e74487b4fe5d7c2750c5e15fbc6efa13bdee1bdef80", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/objenesis/objenesis/2.1/objenesis-2.1.jar", "source": {"sha1": "0611a57d836e2c320d59f9851d4ad587f3c8472e", "sha256": "65178da72578c40a37cbd88d07d2a21dd240d6186fe67f1fc066d1fcbac0003b", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/objenesis/objenesis/2.1/objenesis-2.1-sources.jar"}, "name": "org_objenesis_objenesis", "actual": "@org_objenesis_objenesis//jar", "bind": "jar/org/objenesis/objenesis"}, + {"artifact": "org.mockito:mockito-core:4.11.0", "lang": "java", "sha1": "ce5226440c2ee78915716d4ce3d10aed2dbf26fb", "sha256": "4b909690cab288c761eb94c0bf0e814496cf3921d8affac84cd87774530351e5", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/mockito/mockito-core/4.11.0/mockito-core-4.11.0.jar", "source": {"sha1": "caa9afd0d62ce8c216eb10c76105bd9597ba03ae", "sha256": "34741d9f2cceb187358f5a3195de179467ca876c9a0540ad0ef3d14e3a7c78bf", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/mockito/mockito-core/4.11.0/mockito-core-4.11.0-sources.jar"}, "name": "org_mockito_mockito_core", "actual": "@org_mockito_mockito_core//jar", "bind": "jar/org/mockito/mockito_core"}, + {"artifact": "org.objenesis:objenesis:3.3", "lang": "java", "sha1": "1049c09f1de4331e8193e579448d0916d75b7631", "sha256": "02dfd0b0439a5591e35b708ed2f5474eb0948f53abf74637e959b8e4ef69bfeb", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3.jar", "source": {"sha1": "5fef34eeee6816b0ba2170755a8a9db7744990c3", "sha256": "d06164f8ca002c8ef193cef2d682822014dd330505616af93a3fb64226fc131d", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/objenesis/objenesis/3.3/objenesis-3.3-sources.jar"}, "name": "org_objenesis_objenesis", "actual": "@org_objenesis_objenesis//jar", "bind": "jar/org/objenesis/objenesis"}, {"artifact": "org.scala-lang.modules:scala-collection-compat_2.12:2.3.0", "lang": "java", "sha1": "0362a8061f05dfa3f640d47fadd9ed979cdbaab8", "sha256": "5271230939acc5d5f2a5952d9fae2df42b370fded047455bb30d802e8ab7d89d", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/scala-lang/modules/scala-collection-compat_2.12/2.3.0/scala-collection-compat_2.12-2.3.0.jar", "source": {"sha1": "e2b329ce1b95201bf815f7fe6fdf25f693537767", "sha256": "ee94d113c80e1c6922d877b56adb64f84b53d6508431399ad3ecd5b4a08fd72e", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/scala-lang/modules/scala-collection-compat_2.12/2.3.0/scala-collection-compat_2.12-2.3.0-sources.jar"}, "name": "org_scala_lang_modules_scala_collection_compat_2_12", "actual": "@org_scala_lang_modules_scala_collection_compat_2_12//jar", "bind": "jar/org/scala_lang/modules/scala_collection_compat_2_12"}, {"artifact": "org.scala-lang.modules:scala-java8-compat_2.12:0.9.1", "lang": "scala", "sha1": "133823ddf1b871325e92b1fe3cdf85e0f06aacf1", "sha256": "b786eeb390d558cd2a7af809964e500bdb4828eec6ac7358c6db1ba3ec6820ab", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/scala-lang/modules/scala-java8-compat_2.12/0.9.1/scala-java8-compat_2.12-0.9.1.jar", "source": {"sha1": "f9cd1f4b1aa41e840268851d6eaf34ea8185120d", "sha256": "fbec7c749a23e929c3536c09b3c4d9af1c9c7c7023ad70ebd88c289c0bac018b", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/scala-lang/modules/scala-java8-compat_2.12/0.9.1/scala-java8-compat_2.12-0.9.1-sources.jar"}, "name": "org_scala_lang_modules_scala_java8_compat_2_12", "actual": "@org_scala_lang_modules_scala_java8_compat_2_12//jar:file", "bind": "jar/org/scala_lang/modules/scala_java8_compat_2_12"}, # duplicates in org.slf4j:slf4j-api fixed to 1.7.25 @@ -191,10 +187,10 @@ def list_dependencies(): # - org.apache.zookeeper:zookeeper:3.5.10 wanted version 1.7.36 {"artifact": "org.slf4j:slf4j-api:1.7.25", "lang": "java", "sha1": "da76ca59f6a57ee3102f8f9bd9cee742973efa8a", "sha256": "18c4a0095d5c1da6b817592e767bb23d29dd2f560ad74df75ff3961dbde25b79", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar", "source": {"sha1": "962153db4a9ea71b79d047dfd1b2a0d80d8f4739", "sha256": "c4bc93180a4f0aceec3b057a2514abe04a79f06c174bbed910a2afb227b79366", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25-sources.jar"}, "name": "org_slf4j_slf4j_api", "actual": "@org_slf4j_slf4j_api//jar", "bind": "jar/org/slf4j/slf4j_api"}, {"artifact": "org.xerial.snappy:snappy-java:1.1.8.1", "lang": "java", "sha1": "d30aaf4d41d6ff0c760c8931d3b8dafc0293c91a", "sha256": "b57a1c9762bebc1ee1004fe78932e7c245279652531782083c577efedf83813b", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/xerial/snappy/snappy-java/1.1.8.1/snappy-java-1.1.8.1.jar", "source": {"sha1": "f522ac5bad03b20107573f15dcd99d241a3fa599", "sha256": "66ec505ec2863c33746a1a40edadbe5620261bdde938d33318a21e817b553bae", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/xerial/snappy/snappy-java/1.1.8.1/snappy-java-1.1.8.1-sources.jar"}, "name": "org_xerial_snappy_snappy_java", "actual": "@org_xerial_snappy_snappy_java//jar", "bind": "jar/org/xerial/snappy/snappy_java"}, - # duplicates in org.yaml:snakeyaml promoted to 1.18 - # - com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.5 wanted version 1.18 + # duplicates in org.yaml:snakeyaml promoted to 2.2 + # - com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.0 wanted version 2.2 # - io.prometheus.jmx:collector:0.9 wanted version 1.16 - {"artifact": "org.yaml:snakeyaml:1.18", "lang": "java", "sha1": "e4a441249ade301985cb8d009d4e4a72b85bf68e", "sha256": "81bf4c29d0275dace75fadb5febf5384553422816256023efa83b2b15a9ced60", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.18/snakeyaml-1.18.jar", "source": {"sha1": "17af1c263c33176842715cbfa677e14a5ad862dd", "sha256": "76a7b11358ea5ed67e49de701566a785c25c9ba8b86fca62ce0840838b81f4e7", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/1.18/snakeyaml-1.18-sources.jar"}, "name": "org_yaml_snakeyaml", "actual": "@org_yaml_snakeyaml//jar", "bind": "jar/org/yaml/snakeyaml"}, + {"artifact": "org.yaml:snakeyaml:2.2", "lang": "java", "sha1": "3af797a25458550a16bf89acc8e4ab2b7f2bfce0", "sha256": "1467931448a0817696ae2805b7b8b20bfb082652bf9c4efaed528930dc49389b", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/2.2/snakeyaml-2.2.jar", "source": {"sha1": "575a7915b847393207642575c139177ac2b2ac23", "sha256": "8f7cf911cf63db55fd980a926d155bd846317737351a2f48ef1c1088c414538a", "repository": "https://repo.maven.apache.org/maven2/", "url": "https://repo.maven.apache.org/maven2/org/yaml/snakeyaml/2.2/snakeyaml-2.2-sources.jar"}, "name": "org_yaml_snakeyaml", "actual": "@org_yaml_snakeyaml//jar", "bind": "jar/org/yaml/snakeyaml"}, ] def maven_dependencies(callback = jar_artifact_callback): diff --git a/README.md b/README.md index 4bf9352..db0546c 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,16 @@ Bazelisk can be installed in different ways, see [here](https://docs.bazel.build ### Test ``` -bazel test //...:all +bazel test //... ``` ### Build ``` -bazel build //...:all +bazel build //... ``` -> Note: In bazel, target spec `//..:all` indicates all rules in all packages beneath workspace, thus `bazel build //...:all` implies build everything. +> Note: In bazel, target spec `//...` indicates all targets in all packages beneath workspace, thus `bazel build //...` implies build everything. ### Intellij @@ -50,8 +50,7 @@ If you are using Intellij + Bazel, you can import the project directly with: * Select "Import project view file" and select the `ij.bazelproject` file * Select "Finish" with Infer from: Workspace (the default selection) -The newest version of Intellij does not play nicely with Bazel (and its plugins). We recommend using Intellij 2018.3.6 -with Bazel plugin version v2019.04.15.0.5 +We recommend using the latest version of Intellij with the latest version of Bazel plugin. ## Python diff --git a/WORKSPACE b/WORKSPACE index 1f16eee..85cea49 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,5 +1,5 @@ -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") load("//3rdparty:workspace.bzl", "maven_dependencies") #-- Skylib begin --# @@ -13,15 +13,25 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() -load("@bazel_skylib//lib:versions.bzl", "versions") +#-- Skylib end --# -versions.check( - # Maximum version is inclusive, so set the maximum minor version to 99. - # This allows us to freely switch between minor versions without touching the WORKSPACE file. - maximum_bazel_version = "5.99.0", - minimum_bazel_version = "5.0.0", +#-- Java start --# +RULES_JAVA_VERSION = "7.3.2" + +http_archive( + name = "rules_java", + sha256 = "3121a00588b1581bd7c1f9b550599629e5adcc11ba9c65f482bbd5cfe47fdf30", + urls = [ + "https://github.com/bazelbuild/rules_java/releases/download/%s/rules_java-%s.tar.gz" % (RULES_JAVA_VERSION, RULES_JAVA_VERSION), + ], ) -#-- Skylib end --# + +load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") + +rules_java_dependencies() + +rules_java_toolchains() +#-- Java end --# #-- Maven start --# maven_dependencies() diff --git a/dependencies.yaml b/dependencies.yaml index ac7edc4..181e63c 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -22,21 +22,21 @@ dependencies: jackson: lang: java modules: [ "annotations", "core", "databind" ] - version: "2.9.5" + version: "2.17.0" com.fasterxml.jackson.dataformat: jackson: lang: java modules: [ "dataformat-csv", "dataformat-yaml" ] - version: "2.9.5" + version: "2.17.0" com.fasterxml.jackson.module: jackson-module-parameter-names: lang: java - version: "2.9.5" + version: "2.17.0" jackson-module-scala: lang: scala - version: "2.9.5" + version: "2.17.0" com.google.guava: failureaccess: @@ -85,7 +85,7 @@ dependencies: junit: junit: lang: java - version: "4.11" + version: "4.13.2" log4j: log4j: @@ -95,7 +95,7 @@ dependencies: org.apache.commons: commons-lang3: lang: java - version: "3.7" + version: "3.12.0" org.apache.kafka: kafka: @@ -123,16 +123,10 @@ dependencies: lang: java version: "1.70" - org.hamcrest: - hamcrest-core: - lang: java - version: "1.3" - org.mockito: - mockito: + mockito-core: lang: java - modules: [ "all", "core" ] - version: "1.10.19" + version: "4.11.0" org.scala-lang: scala-library: diff --git a/kafka_acl_enforcer/src/test/java/com/tesla/data/acl/AclEnforcerTest.java b/kafka_acl_enforcer/src/test/java/com/tesla/data/acl/AclEnforcerTest.java index 7458523..9b2b2b9 100644 --- a/kafka_acl_enforcer/src/test/java/com/tesla/data/acl/AclEnforcerTest.java +++ b/kafka_acl_enforcer/src/test/java/com/tesla/data/acl/AclEnforcerTest.java @@ -5,19 +5,17 @@ package com.tesla.data.acl; import static java.util.Collections.emptyList; -import static org.mockito.Matchers.anyCollectionOf; +import static org.mockito.ArgumentMatchers.anyCollection; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import org.apache.kafka.common.acl.AclBinding; -import org.apache.kafka.common.acl.AclBindingFilter; import org.junit.Before; import org.junit.Test; import java.io.IOException; import java.util.Arrays; -import java.util.Collection; import java.util.List; public class AclEnforcerTest { @@ -36,13 +34,12 @@ public void setup() throws IOException { @Test public void testCreateDryRun() throws IOException { enforcer.create(acls); - verify(aclService, times(0)).create(anyCollectionOf(AclBinding.class)); + verify(aclService, times(0)).create(anyCollection()); } @Test public void testDeleteDryRun() throws IOException { enforcer.delete(acls); - verify(aclService, times(0)).delete(anyCollectionOf(AclBinding.class)); + verify(aclService, times(0)).delete(anyCollection()); } - } diff --git a/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/BUILD b/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/BUILD index af2544b..e897b5c 100644 --- a/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/BUILD +++ b/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/BUILD @@ -4,7 +4,7 @@ java_test( deps = [ "//3rdparty/jvm/junit", "//3rdparty/jvm/org/apache/kafka:kafka_clients", - "//3rdparty/jvm/org/mockito:mockito_all", + "//3rdparty/jvm/org/mockito:mockito_core", "//kafka_consumer_freshness_tracker/src/main/java/com/tesla/data/consumer/freshness", ], ) @@ -16,8 +16,7 @@ java_test( "//3rdparty/jvm/com/fasterxml/jackson/core:jackson_databind", "//3rdparty/jvm/com/squareup/okhttp3:okhttp", "//3rdparty/jvm/junit", - "//3rdparty/jvm/org/hamcrest:hamcrest_core", - "//3rdparty/jvm/org/mockito:mockito_all", + "//3rdparty/jvm/org/mockito:mockito_core", "//3rdparty/jvm_shaded/com/google/guava_shaded", "//kafka_consumer_freshness_tracker/src/main/java/com/tesla/data/consumer/freshness", ], @@ -35,7 +34,7 @@ java_test( "//3rdparty/jvm/io/prometheus:simpleclient", "//3rdparty/jvm/junit", "//3rdparty/jvm/org/apache/kafka:kafka_clients", - "//3rdparty/jvm/org/mockito:mockito_all", + "//3rdparty/jvm/org/mockito:mockito_core", "//3rdparty/jvm_shaded/com/google/guava_shaded", "//kafka_consumer_freshness_tracker/src/main/java/com/tesla/data/consumer/freshness", ], diff --git a/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/BurrowTest.java b/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/BurrowTest.java index dd03f12..75ff0c3 100644 --- a/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/BurrowTest.java +++ b/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/BurrowTest.java @@ -5,8 +5,8 @@ package com.tesla.data.consumer.freshness; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.argThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -18,8 +18,6 @@ import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; -import org.hamcrest.BaseMatcher; -import org.hamcrest.Description; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; @@ -137,18 +135,7 @@ public void testGetClusterBootstrapServers() throws Exception { } private Request expectPath(String path) { - return argThat(new BaseMatcher() { - @Override - public void describeTo(Description description) { - description.appendText("Requested URL does not match expected: " + path); - } - - @Override - public boolean matches(Object o) { - Request request = (Request) o; - return request.url().encodedPath().equals(path); - } - }); + return argThat(request -> request.url().encodedPath().equals(path)); } private Answer respondWithJson(Object o) { diff --git a/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/ConsumerFreshnessTest.java b/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/ConsumerFreshnessTest.java index 72ab8cf..b02438e 100644 --- a/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/ConsumerFreshnessTest.java +++ b/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/ConsumerFreshnessTest.java @@ -9,51 +9,48 @@ import static org.apache.kafka.clients.consumer.ConsumerRecord.NULL_SIZE; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.when; import static tesla.shade.com.google.common.collect.Lists.newArrayList; -import com.google.common.collect.ImmutableMap; import io.prometheus.client.Gauge; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.clients.consumer.ConsumerRecords; import org.apache.kafka.clients.consumer.KafkaConsumer; import org.apache.kafka.common.TopicPartition; -import org.apache.kafka.common.KafkaException; import org.apache.kafka.common.record.TimestampType; import org.junit.Assert; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -import org.mockito.Mock; import org.mockito.Mockito; +import tesla.shade.com.google.common.collect.ImmutableMap; import tesla.shade.com.google.common.collect.Lists; import tesla.shade.com.google.common.util.concurrent.ListeningExecutorService; import tesla.shade.com.google.common.util.concurrent.MoreExecutors; import java.io.IOException; import java.time.Duration; -import java.util.*; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.Callable; import java.util.concurrent.Executors; import java.util.concurrent.RejectedExecutionException; import java.util.function.Consumer; -import java.util.stream.Collectors; /** - * Validate that we compute freshness and handle errors as expected. Specifically, for errors, we do the following: - * * rejected freshness lookup -> fail the application (something very wrong) - * * interrupted while waiting for a consumer -> mark the cluster as failed - * * freshness computation throws an exception -> marks the group as a failure - * * Burrow errors (failed response, bad data, etc.) - * * find all clusters -> fail run, mark error - * * find all consumers in a cluster -> mark the cluster as failed - * * find status of a consumer -> skip the consumer, mark the consumer as failed, but not the cluster - * * missing partition end offset -> mark missing, skip partition + * Validate that we compute freshness and handle errors as expected. Specifically, for errors, we do the following: * + * rejected freshness lookup -> fail the application (something very wrong) * interrupted while waiting for a consumer + * -> mark the cluster as failed * freshness computation throws an exception -> marks the group as a failure * Burrow + * errors (failed response, bad data, etc.) * find all clusters -> fail run, mark error * find all consumers in a + * cluster -> mark the cluster as failed * find status of a consumer -> skip the consumer, mark the consumer as failed, + * but not the cluster * missing partition end offset -> mark missing, skip partition */ public class ConsumerFreshnessTest { @@ -80,7 +77,7 @@ public void testTranslateZeroLagAsUpToDate() throws Exception { // if there is no burrow lag, we shouldn't even try to read kafka try { - verifyZeroInteractions(workers.get("cluster1").take()); + verifyNoInteractions(workers.get("cluster1").take()); } catch (InterruptedException e) { throw new RuntimeException(e); } @@ -98,7 +95,7 @@ public void testLargeCurrentLag() throws Exception { partitionState("topic1", 1, 10, lagMs)); when(burrow.getClusters()).thenReturn(newArrayList(client)); - withExecutor(executor ->{ + withExecutor(executor -> { KafkaConsumer consumer = mock(KafkaConsumer.class); when(consumer.poll(Mockito.any(Duration.class))).thenReturn(records("topic", 1, 10, lagMs)); ConsumerFreshness freshness = new ConsumerFreshness(); @@ -120,7 +117,7 @@ public void testFailClusterWhenInterruptedWaitingForAConsumer() throws Exception partitionState("topic1", 1, 10, 10L)); when(burrow.getClusters()).thenReturn(newArrayList(client)); - withExecutor(executor ->{ + withExecutor(executor -> { // create an empty queue of workers so #take blocks forever, giving us the opportunity to interrupt the thread. Map> workers = new HashMap<>(1); ArrayBlockingQueue queue = new ArrayBlockingQueue<>(1); @@ -267,8 +264,8 @@ public void testBurrowMissingConsumerGroupPartitionEndOffsetMarksMissing() throw when(client.consumerGroups()).thenReturn(newArrayList("group")); when(client.getConsumerGroupStatus("group")).thenReturn(ImmutableMap.of( "partitions", newArrayList(ImmutableMap.of( - "topic", "some-topic", - "partition", 1 + "topic", "some-topic", + "partition", 1 ) ))); freshness.run(); @@ -287,7 +284,7 @@ public void testConfigurationContainsUnknownCluster() throws Exception { String clusterName = "bad_cluster"; when(burrow.getClusterBootstrapServers(clusterName)).thenThrow(new IOException()); Map conf = mockConfForCluster( - clusterName, "l1.example.com:9092", "l2.example.com:9092" + clusterName, "l1.example.com:9092", "l2.example.com:9092" ); ConsumerFreshness freshness = new ConsumerFreshness(); @@ -297,7 +294,7 @@ public void testConfigurationContainsUnknownCluster() throws Exception { Assert.assertTrue(msg.isPresent()); Assert.assertTrue(msg.get().contains("failed to read cluster detail from Burrow: ")); Assert.assertEquals(1.0, - freshness.getMetricsForTesting().burrowClusterDetailReadFailed.labels(clusterName).get(), 0.0); + freshness.getMetricsForTesting().burrowClusterDetailReadFailed.labels(clusterName).get(), 0.0); } @Test @@ -305,13 +302,13 @@ public void testConfigurationIsValidServersMatchBurrow() throws Exception { Burrow burrow = mock(Burrow.class); String clusterName = "cluster1"; when(burrow.getClusterBootstrapServers(clusterName)) - .thenReturn(Arrays.asList("kafka01.example.com:10251", "kafka02.example.com:10251") - ); + .thenReturn(Arrays.asList("kafka01.example.com:10251", "kafka02.example.com:10251") + ); Map conf = mockConfForCluster( clusterName, "kafka01.example.com:10251", "kafka02.example.com:10251" - ); + ); ConsumerFreshness freshness = new ConsumerFreshness(); freshness.burrow = burrow; @@ -329,26 +326,26 @@ public void testConfigurationIsInvalidContainsUnknownServer() throws Exception { Burrow burrow = mock(Burrow.class); String clusterName = "cluster1"; List burrowBootstrapServers = Arrays.asList( - "kafka01.example.com:10251", "kafka02.example.com:10251"); + "kafka01.example.com:10251", "kafka02.example.com:10251"); when(burrow.getClusterBootstrapServers(clusterName)) - .thenReturn(burrowBootstrapServers); + .thenReturn(burrowBootstrapServers); List confBootstrapServers = Arrays.asList("kafka01.example.com:10251", "kafka02.example.com:10251", - "kafka03.example.com:10251"); + "kafka03.example.com:10251"); Map conf = mockConfForCluster( clusterName, confBootstrapServers.toArray(new String[0]) - ); + ); ConsumerFreshness freshness = new ConsumerFreshness(); freshness.burrow = burrow; String expected = String.format( - "the set of bootstrap servers in config is not the same as the " + - "set advertised by Burrow\nconfig: %s\nburrow: %s", - String.join(", ", confBootstrapServers), - String.join(", ", burrowBootstrapServers) + "the set of bootstrap servers in config is not the same as the " + + "set advertised by Burrow\nconfig: %s\nburrow: %s", + String.join(", ", confBootstrapServers), + String.join(", ", burrowBootstrapServers) ); // normal mode @@ -364,25 +361,25 @@ public void testConfigurationIsInvalidMissingServer() throws Exception { Burrow burrow = mock(Burrow.class); String clusterName = "cluster1"; List burrowBootstrapServers = Arrays.asList("kafka01.example.com:10251", "kafka02.example.com:10251", - "kafka03.example.com:10251"); + "kafka03.example.com:10251"); List confBootstrapServers = Arrays.asList("kafka01.example.com:10251", "kafka02.example.com:10251"); when(burrow.getClusterBootstrapServers(clusterName)) - .thenReturn(burrowBootstrapServers); + .thenReturn(burrowBootstrapServers); Map conf = mockConfForCluster( clusterName, - confBootstrapServers.toArray(new String[0]) - ); + confBootstrapServers.toArray(new String[0]) + ); ConsumerFreshness freshness = new ConsumerFreshness(); freshness.burrow = burrow; String expected = String.format( - "the set of bootstrap servers in config is not the same as the " + - "set advertised by Burrow\nconfig: %s\nburrow: %s", - String.join(", ", confBootstrapServers), - String.join(", ", burrowBootstrapServers) + "the set of bootstrap servers in config is not the same as the " + + "set advertised by Burrow\nconfig: %s\nburrow: %s", + String.join(", ", confBootstrapServers), + String.join(", ", burrowBootstrapServers) ); // normal mode @@ -394,11 +391,11 @@ public void testConfigurationIsInvalidMissingServer() throws Exception { Map globalConf = new HashMap<>(); globalConf.put("clusters", Lists.newArrayList(conf)); - + // RuntimeException should be thrown when attempting to setup Tracker with invalid configuration in strict mode thrown.expect(RuntimeException.class); thrown.expectMessage(expected); - + freshness.setupWithBurrow(globalConf, burrow); } @@ -433,13 +430,13 @@ public void testFailToSubmitTaskExitsTracker() throws Exception { freshness.run(); } - private void assertNoSuccessfulClusterMeasurement(ConsumerFreshness freshness, String cluster){ + private void assertNoSuccessfulClusterMeasurement(ConsumerFreshness freshness, String cluster) { FreshnessMetrics metrics = freshness.getMetricsForTesting(); assertEquals("Cluster measurement should not be successful", 0.0, metrics.lastClusterRunSuccessfulAttempt.labels(cluster).get(), 0.0); } - private void assertSuccessfulClusterMeasurement(ConsumerFreshness freshness, String cluster){ + private void assertSuccessfulClusterMeasurement(ConsumerFreshness freshness, String cluster) { FreshnessMetrics metrics = freshness.getMetricsForTesting(); assertTrue("Cluster measurement should be successful", metrics.lastClusterRunSuccessfulAttempt.labels(cluster).get() > 0); @@ -477,14 +474,14 @@ private Map> workers(String cluster, K /** * Mock a state of the cluster that has a single consumer group for a number of partitions * - * @param cluster name of the cluster - * @param group name of the consumer group + * @param cluster name of the cluster + * @param group name of the consumer group * @param partitions partitions the consumer is "reading" * @return mock client * @see #partitionState(String, int, long, long) helper function to more easily generate partition description */ private Burrow.ClusterClient mockClusterState(String cluster, String group, - Map... partitions) throws IOException { + Map... partitions) throws IOException { Burrow.ClusterClient client = mock(Burrow.ClusterClient.class); when(client.getCluster()).thenReturn(cluster); @@ -500,10 +497,10 @@ private Burrow.ClusterClient mockClusterState(String cluster, String group, /** * Generate the state as returned by the {@link Burrow} client representing the consumer of a topic/partition. * - * @param topic topic name + * @param topic topic name * @param partitionNumber index of the partition - * @param endOffset most recent offset "read" by the consumer - * @param currentLagMs amount of lag, in milliseconds, the consumer is behind the Log-Eng-Offset + * @param endOffset most recent offset "read" by the consumer + * @param currentLagMs amount of lag, in milliseconds, the consumer is behind the Log-Eng-Offset */ private Map partitionState(String topic, int partitionNumber, long endOffset, long currentLagMs) { Map partition = new HashMap<>(); @@ -517,10 +514,10 @@ private Map partitionState(String topic, int partitionNumber, lo } /** - * Create a {@link ConsumerRecords} with a single consumer record at the given topic, partition, offset and lagging - * by at least the given milliseconds. + * Create a {@link ConsumerRecords} with a single consumer record at the given topic, partition, offset and lagging by + * at least the given milliseconds. */ - private ConsumerRecords records(String topic, int partition, long offset, long lagMs){ + private ConsumerRecords records(String topic, int partition, long offset, long lagMs) { return new ConsumerRecords(ImmutableMap.of( new TopicPartition(topic, partition), asList( new ConsumerRecord(topic, partition, offset, System.currentTimeMillis() - lagMs, diff --git a/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/FreshnessTrackerTest.java b/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/FreshnessTrackerTest.java index 8d228c6..35e3254 100644 --- a/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/FreshnessTrackerTest.java +++ b/kafka_consumer_freshness_tracker/src/test/java/com/tesla/data/consumer/freshness/FreshnessTrackerTest.java @@ -5,12 +5,12 @@ package com.tesla.data.consumer.freshness; import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.when; import org.apache.kafka.clients.consumer.Consumer; @@ -46,7 +46,7 @@ public void testNoLag() throws Exception { assertEquals("Freshness should be 0 if no lag", 0, metrics.freshness.labels("cluster", "group", "topic", "1").get(), 0); assertEquals(0, metrics.failed.labels("cluster", "group").get(), 0); - verifyZeroInteractions(kafka); + verifyNoInteractions(kafka); } @Test diff --git a/kafka_enforcer_common/src/test/java/com/tesla/data/enforcer/EnforceCommandTest.java b/kafka_enforcer_common/src/test/java/com/tesla/data/enforcer/EnforceCommandTest.java index e9af427..2ab8816 100644 --- a/kafka_enforcer_common/src/test/java/com/tesla/data/enforcer/EnforceCommandTest.java +++ b/kafka_enforcer_common/src/test/java/com/tesla/data/enforcer/EnforceCommandTest.java @@ -4,7 +4,7 @@ package com.tesla.data.enforcer; -import static org.mockito.Matchers.anyInt; +import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.mock; diff --git a/kafka_enforcer_common/src/test/java/com/tesla/data/enforcer/EnforcerTest.java b/kafka_enforcer_common/src/test/java/com/tesla/data/enforcer/EnforcerTest.java index afd47a9..ff60045 100644 --- a/kafka_enforcer_common/src/test/java/com/tesla/data/enforcer/EnforcerTest.java +++ b/kafka_enforcer_common/src/test/java/com/tesla/data/enforcer/EnforcerTest.java @@ -7,7 +7,7 @@ import static java.util.Collections.emptyList; import static java.util.Collections.emptyMap; import static java.util.Collections.singletonList; -import static org.mockito.Matchers.anyListOf; +import static org.mockito.ArgumentMatchers.anyList; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; @@ -75,7 +75,7 @@ public void testSafeModeEnforceAll() { // safemode on enforcer = spy(new DummyEnforcer(dummies, () -> singletonList(unexpected), true)); enforcer.enforceAll(); - verify(enforcer, times(0)).delete(anyListOf(Dummy.class)); + verify(enforcer, times(0)).delete(anyList()); // safemode off enforcer = spy(new DummyEnforcer(dummies, () -> singletonList(unexpected), false)); diff --git a/kafka_quota_enforcer/src/test/java/com/tesla/data/quota/enforcer/QuotaEnforcerTest.java b/kafka_quota_enforcer/src/test/java/com/tesla/data/quota/enforcer/QuotaEnforcerTest.java index 0793f91..bc5d27a 100644 --- a/kafka_quota_enforcer/src/test/java/com/tesla/data/quota/enforcer/QuotaEnforcerTest.java +++ b/kafka_quota_enforcer/src/test/java/com/tesla/data/quota/enforcer/QuotaEnforcerTest.java @@ -5,12 +5,9 @@ package com.tesla.data.quota.enforcer; import static java.util.Collections.emptyList; -import static org.mockito.Matchers.anyCollection; -import static org.mockito.Matchers.anyCollectionOf; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.verifyNoInteractions; import org.junit.Before; import org.junit.Test; @@ -49,13 +46,13 @@ public void testDelete() { public void testCreateDryRun() { QuotaEnforcer enforcer = new QuotaEnforcer(emptyList(), quotaService, true, true); enforcer.create(quotas); - verifyZeroInteractions(quotaService); + verifyNoInteractions(quotaService); } @Test public void testDeleteDryRun() { QuotaEnforcer enforcer = new QuotaEnforcer(emptyList(), quotaService, true, true); enforcer.delete(quotas); - verifyZeroInteractions(quotaService); + verifyNoInteractions(quotaService); } } diff --git a/kafka_quota_enforcer/src/test/java/com/tesla/data/quota/enforcer/QuotaServiceTest.java b/kafka_quota_enforcer/src/test/java/com/tesla/data/quota/enforcer/QuotaServiceTest.java index 7220f32..246a7e9 100644 --- a/kafka_quota_enforcer/src/test/java/com/tesla/data/quota/enforcer/QuotaServiceTest.java +++ b/kafka_quota_enforcer/src/test/java/com/tesla/data/quota/enforcer/QuotaServiceTest.java @@ -4,7 +4,7 @@ package com.tesla.data.quota.enforcer; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; diff --git a/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/BUILD b/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/BUILD index 6329d9c..33b3c81 100644 --- a/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/BUILD +++ b/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/BUILD @@ -6,6 +6,7 @@ java_test( deps = [ "//3rdparty/jvm/org/apache/kafka:kafka_clients", "//3rdparty/jvm/org/mockito:mockito_core", + "//3rdparty/jvm_shaded/com/google/guava_shaded", "//kafka_topic_enforcer/src/main/java/com/tesla/data/topic/enforcer", ], ) @@ -18,6 +19,7 @@ java_test( deps = [ "//3rdparty/jvm/ch/qos/logback:logback_classic", "//3rdparty/jvm/org/mockito:mockito_core", + "//3rdparty/jvm_shaded/com/google/guava_shaded", "//kafka_topic_enforcer/src/main/java/com/tesla/data/topic/enforcer", ], ) diff --git a/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/TopicEnforcerTest.java b/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/TopicEnforcerTest.java index b29f4f0..7841e6b 100644 --- a/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/TopicEnforcerTest.java +++ b/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/TopicEnforcerTest.java @@ -12,10 +12,10 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import tesla.shade.com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -50,18 +50,16 @@ public void testPartitionIncrease() { new ConfiguredTopic("b", 3, (short) 1, Collections.emptyMap()), new ConfiguredTopic("c", 3, (short) 3, Collections.emptyMap())); - Map existing = new HashMap() { - { + Map existing = ImmutableMap.of( // cluster topic has less replicas than configured but same partitions, we do not care! - put("a", new ConfiguredTopic("a", 1, (short) 1, Collections.emptyMap())); + "a", new ConfiguredTopic("a", 1, (short) 1, Collections.emptyMap()), // cluster topic has less partitions than configured, we care! - put("b", new ConfiguredTopic("b", 1, (short) 1, Collections.emptyMap())); + "b", new ConfiguredTopic("b", 1, (short) 1, Collections.emptyMap()), // cluster topic has less partitions than configured and less replicas, we care (about the partitions)! - put("c", new ConfiguredTopic("c", 1, (short) 1, Collections.emptyMap())); + "c", new ConfiguredTopic("c", 1, (short) 1, Collections.emptyMap()), // cluster has an extra topic that is not configured to be present, we do not care! - put("d", new ConfiguredTopic("b", 1, (short) 1, Collections.emptyMap())); - } - }; + "d", new ConfiguredTopic("b", 1, (short) 1, Collections.emptyMap()) + ); when(service.listExisting(true)).thenReturn(existing); TopicEnforcer enforcer = new TopicEnforcer(service, configured, true); @@ -83,17 +81,15 @@ public void testAlterConfiguration() { new ConfiguredTopic("c", 1, (short) 1, Collections.emptyMap()), new ConfiguredTopic("d", 1, (short) 3, Collections.emptyMap())); - Map existing = new HashMap() { - { + Map existing = ImmutableMap.of( // cluster topic has as some config overrides - put("a", new ConfiguredTopic("a", 1, (short) 1, Collections.singletonMap("k", "v"))); + "a", new ConfiguredTopic("a", 1, (short) 1, Collections.singletonMap("k", "v")), // no change in topic config, partition count should be ignored - put("b", new ConfiguredTopic("b", 3, (short) 1, Collections.emptyMap())); + "b", new ConfiguredTopic("b", 3, (short) 1, Collections.emptyMap()), // topic 'c' is no present in the cluster // cluster topic has some config overrides and less replicas, we care (about the config overrides) - put("d", new ConfiguredTopic("d", 1, (short) 1, Collections.singletonMap("k", "v"))); - } - }; + "d", new ConfiguredTopic("d", 1, (short) 1, Collections.singletonMap("k", "v")) + ); when(service.listExisting(true)).thenReturn(existing); TopicEnforcer enforcer = new TopicEnforcer(service, configured, true); diff --git a/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/TopicServiceImplTest.java b/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/TopicServiceImplTest.java index 45ab855..4a3a69f 100644 --- a/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/TopicServiceImplTest.java +++ b/kafka_topic_enforcer/src/test/java/com/tesla/data/topic/enforcer/TopicServiceImplTest.java @@ -5,7 +5,7 @@ package com.tesla.data.topic.enforcer; import static org.apache.kafka.common.config.ConfigResource.Type.TOPIC; -import static org.mockito.Matchers.any; +import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -35,6 +35,7 @@ import org.junit.Before; import org.junit.Test; import org.mockito.ArgumentCaptor; +import tesla.shade.com.google.common.collect.ImmutableMap; import java.util.Arrays; import java.util.Collection; @@ -98,20 +99,16 @@ public void testListExisting() { ConfigEntry configEntry = new ConfigEntry("k", "v"); KafkaFuture kfc = KafkaFuture.completedFuture(new Config(Collections.singletonList(configEntry))); Set topicNames = new HashSet<>(Arrays.asList("a", "b", "_c")); - Map tds = new HashMap() { - { - put("a", new TopicDescription("a", false, Collections.singletonList(tp))); - put("b", new TopicDescription("b", false, Collections.singletonList(tp))); - put("c", new TopicDescription("_c", false, Collections.singletonList(tp))); - } - }; - Map> configs = new HashMap>() { - { - put(new ConfigResource(TOPIC, "a"), kfc); - put(new ConfigResource(TOPIC, "b"), kfc); - put(new ConfigResource(TOPIC, "_c"), kfc); - } - }; + Map tds = ImmutableMap.of( + "a", new TopicDescription("a", false, Collections.singletonList(tp)), + "b", new TopicDescription("b", false, Collections.singletonList(tp)), + "c", new TopicDescription("_c", false, Collections.singletonList(tp)) + ); + Map> configs = ImmutableMap.of( + new ConfigResource(TOPIC, "a"), kfc, + new ConfigResource(TOPIC, "b"), kfc, + new ConfigResource(TOPIC, "_c"), kfc + ); TopicService service = new TopicServiceImpl(adminClient, true); ListTopicsResult listTopicsResult = mock(ListTopicsResult.class);