GeezerVison is showing github.com — [ISSUE #9609] Fix bazel CI and reduce dependencies (#9610) · lltopk/rocketmq@7ab7ddd
File treeExpand file treeCollapse file tree Open diff view settings main/java/org/apache/rocketmq/broker/metrics test/java/org/apache/rocketmq/broker/offset
src/test/java/org/apache/rocketmq/acl/common
src/main/java/org/apache/rocketmq/proxy
remoting/src/main/java/org/apache/rocketmq/remoting/common main/java/org/apache/rocketmq/store test/java/org/apache/rocketmq/store
tieredstore/src/test/java/org/apache/rocketmq/tieredstore/util tools/src/test/java/org/apache/rocketmq/tools/admin
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .bazelrc +2-4Lines changed: 2 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -47,10 +47,8 @@ build:remote --platforms=@buildbuddy_toolchain//:platform | 47 | 47 | build:remote --extra_execution_platforms=@buildbuddy_toolchain//:platform | 48 | 48 | build:remote --crosstool_top=@buildbuddy_toolchain//:toolchain | 49 | 49 | build:remote --extra_toolchains=@buildbuddy_toolchain//:cc_toolchain | 50 | | -build:remote --javabase=@buildbuddy_toolchain//:javabase_jdk8 | 51 | | -build:remote --host_javabase=@buildbuddy_toolchain//:javabase_jdk8 | 52 | | -build:remote --java_toolchain=@buildbuddy_toolchain//:toolchain_jdk8 | 53 | | -build:remote --host_java_toolchain=@buildbuddy_toolchain//:toolchain_jdk8 | | 50 | +build:remote --java_language_version=8 | | 51 | +build:remote --java_runtime_version=8 | 54 | 52 | build:remote --define=EXECUTOR=remote | 55 | 53 |
| 56 | 54 | # Enable remote execution so actions are performed on the remote systems. | |
Collapse file Copy file name to clipboard +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -5.2.0 | | 1 | +6.5.0 |
Collapse file Copy file name to clipboardExpand all lines: BUILD.bazel -14Lines changed: 0 additions & 14 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 14 | 14 | # See the License for the specific language governing permissions and | 15 | 15 | # limitations under the License. | 16 | 16 | # | 17 | | -load("@bazel_toolchains//rules/exec_properties:exec_properties.bzl", "create_rbe_exec_properties_dict") | 18 | | - | 19 | | -platform( | 20 | | - name = "custom_platform", | 21 | | - # Inherit from the platform target generated by 'rbe_configs_gen' assuming the generated configs | 22 | | - # were imported as a Bazel external repository named 'rbe_default'. If you extracted the | 23 | | - # generated configs elsewhere in your source repository, replace the following with the label | 24 | | - # to the 'platform' target in the generated configs. | 25 | | - parents = ["@rbe_default//config:platform"], | 26 | | - # Example custom execution property instructing RBE to use e2-standard-2 GCE VMs. | 27 | | - exec_properties = create_rbe_exec_properties_dict( | 28 | | - container_image = "ubuntu:latest", | 29 | | - ), | 30 | | -) | 31 | 17 |
| 32 | 18 | java_library( | 33 | 19 | name = "test_deps", | |
Collapse file Copy file name to clipboardExpand all lines: WORKSPACE +26-6Lines changed: 26 additions & 6 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -64,7 +64,7 @@ maven_install( | 64 | 64 | "org.awaitility:awaitility:4.1.0", | 65 | 65 | "commons-cli:commons-cli:1.5.0", | 66 | 66 | "com.google.guava:guava:31.0.1-jre", | 67 | | - "org.yaml:snakeyaml:1.30", | | 67 | + "org.yaml:snakeyaml:2.0", | 68 | 68 | "commons-codec:commons-codec:1.13", | 69 | 69 | "commons-io:commons-io:2.7", | 70 | 70 | "com.google.truth:truth:0.30", | @@ -134,11 +134,31 @@ load("@io_buildbuddy_buildbuddy_toolchain//:rules.bzl", "buildbuddy") | 134 | 134 | buildbuddy(name = "buildbuddy_toolchain") | 135 | 135 |
| 136 | 136 | http_archive( | 137 | | - name = "bazel_toolchains", | 138 | | - sha256 = "1adf5db506a7e3c465a26988514cfc3971af6d5b3c2218925cd6e71ee443fc3f", | 139 | | - strip_prefix = "bazel-toolchains-4.0.0", | | 137 | + name = "bazel_skylib", | | 138 | + sha256 = "51b5105a760b353773f904d2bbc5e664d0987fbaf22265164de65d43e910d8ac", | 140 | 139 | urls = [ | 141 | | - "https://github.com/bazelbuild/bazel-toolchains/releases/download/4.0.0/bazel-toolchains-4.0.0.tar.gz", | 142 | | - "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/4.0.0/bazel-toolchains-4.0.0.tar.gz", | | 140 | + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.8.1/bazel-skylib-1.8.1.tar.gz", | | 141 | + "https://github.com/bazelbuild/bazel-skylib/releases/download/1.8.1/bazel-skylib-1.8.1.tar.gz", | 143 | 142 | ], | 144 | 143 | ) | | 144 | + | | 145 | +load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") | | 146 | +bazel_skylib_workspace() | | 147 | + | | 148 | +http_archive( | | 149 | + name = "rules_java", | | 150 | + urls = [ | | 151 | + "https://github.com/bazelbuild/rules_java/releases/download/7.12.5/rules_java-7.12.5.tar.gz", | | 152 | + ], | | 153 | + sha256 = "17b18cb4f92ab7b94aa343ce78531b73960b1bed2ba166e5b02c9fdf0b0ac270", | | 154 | +) | | 155 | +load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") | | 156 | +rules_java_dependencies() | | 157 | +rules_java_toolchains() | | 158 | + | | 159 | +load("@rules_java//toolchains:local_java_repository.bzl", "local_java_repository") | | 160 | +local_java_repository( | | 161 | + name = "jdk8", | | 162 | + version = "8", | | 163 | + java_home = "/usr/lib/jvm/java-8-openjdk-amd64", | | 164 | +) |
Collapse file Copy file name to clipboardExpand all lines: auth/BUILD.bazel -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -23,7 +23,6 @@ java_library( | 23 | 23 | deps = [ | 24 | 24 | "//common", | 25 | 25 | "//remoting", | 26 | | - "//srvutil", | 27 | 26 | "//client", | 28 | 27 | "@maven//:commons_codec_commons_codec", | 29 | 28 | "@maven//:org_apache_commons_commons_lang3", | |
Collapse file Copy file name to clipboardExpand all lines: bazel/GenTestRules.bzl +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -66,7 +66,7 @@ def GenTestRules( | 66 | 66 | runtime_deps = deps, | 67 | 67 | resources = resources, | 68 | 68 | size = test_size, | 69 | | - jvm_flags = jvm_flags, | | 69 | + jvm_flags = jvm_flags + ["-Dbuild.bazel=true"], | 70 | 70 | args = args, | 71 | 71 | flaky = flaky, | 72 | 72 | tags = tags, | |
Collapse file Copy file name to clipboardExpand all lines: broker/src/main/java/org/apache/rocketmq/broker/metrics/BrokerMetricsManager.java +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -162,6 +162,7 @@ public class BrokerMetricsManager { | 162 | 162 | public static LongCounter rollBackMessagesTotal = new NopLongCounter(); | 163 | 163 | public static LongHistogram transactionFinishLatency = new NopLongHistogram(); | 164 | 164 |
| | 165 | + @SuppressWarnings("DoubleBraceInitialization") | 165 | 166 | public static final List<String> SYSTEM_GROUP_PREFIX_LIST = new ArrayList<String>() { | 166 | 167 | { | 167 | 168 | add(MixAll.CID_RMQ_SYS_PREFIX.toLowerCase()); | |
Collapse file Copy file name to clipboardExpand all lines: broker/src/test/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManagerTest.java +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -40,6 +40,7 @@ public class ConsumerOffsetManagerTest { | 40 | 40 | private ConsumerOffsetManager consumerOffsetManager; | 41 | 41 |
| 42 | 42 | @Before | | 43 | + @SuppressWarnings("DoubleBraceInitialization") | 43 | 44 | public void init() { | 44 | 45 | brokerController = Mockito.mock(BrokerController.class); | 45 | 46 | consumerOffsetManager = new ConsumerOffsetManager(brokerController); | |
Collapse file Copy file name to clipboardExpand all lines: broker/src/test/java/org/apache/rocketmq/broker/offset/RocksDBConsumerOffsetManagerTest.java +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -41,6 +41,7 @@ public class RocksDBConsumerOffsetManagerTest { | 41 | 41 | private ConsumerOffsetManager consumerOffsetManager; | 42 | 42 |
| 43 | 43 | @Before | | 44 | + @SuppressWarnings("DoubleBraceInitialization") | 44 | 45 | public void init() { | 45 | 46 | if (notToBeExecuted()) { | 46 | 47 | return; | |
Collapse file Copy file name to clipboardExpand all lines: client/BUILD.bazel +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -68,5 +68,6 @@ GenTestRules( | 68 | 68 | ], | 69 | 69 | exclude_tests = [ | 70 | 70 | "src/test/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumerTest", | | 71 | + "src/test/java/org/apache/rocketmq/client/impl/mqclient/MQClientAPITest", | 71 | 72 | ], | 72 | 73 | ) |
|