From 5e1d333ce69be6d3bc92fdf338c55df5d5902b07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:06:59 +0800 Subject: [PATCH 01/34] Bump io.micrometer:micrometer-core from 1.12.2 to 1.12.3 (#13760) Bumps [io.micrometer:micrometer-core](https://github.com/micrometer-metrics/micrometer) from 1.12.2 to 1.12.3. - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.12.2...v1.12.3) --- updated-dependencies: - dependency-name: io.micrometer:micrometer-core dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-demo/dubbo-demo-spring-boot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-demo/dubbo-demo-spring-boot/pom.xml b/dubbo-demo/dubbo-demo-spring-boot/pom.xml index 9dbb5ac36f..c10dd0fa44 100644 --- a/dubbo-demo/dubbo-demo-spring-boot/pom.xml +++ b/dubbo-demo/dubbo-demo-spring-boot/pom.xml @@ -37,7 +37,7 @@ true 2.7.18 2.7.18 - 1.12.2 + 1.12.3 From d7ada3979719652a4db74ddf735d558bfbb63ec2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:08:36 +0800 Subject: [PATCH 02/34] Bump net.bytebuddy:byte-buddy from 1.14.11 to 1.14.12 (#13761) Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.14.11 to 1.14.12. - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.11...byte-buddy-1.14.12) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 66694e28aa..35675135d8 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -93,7 +93,7 @@ 5.3.25 5.8.9 3.30.2-GA - 1.14.11 + 1.14.12 3.2.10.Final 4.1.106.Final 4.5.14 From 11a9de26e1d510870e84213d48b886843be70a17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:08:46 +0800 Subject: [PATCH 03/34] Bump io.micrometer:micrometer-tracing-bom from 1.2.2 to 1.2.3 (#13762) Bumps [io.micrometer:micrometer-tracing-bom](https://github.com/micrometer-metrics/tracing) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/micrometer-metrics/tracing/releases) - [Commits](https://github.com/micrometer-metrics/tracing/compare/v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: io.micrometer:micrometer-tracing-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- .../dubbo-spring-boot-starters/observability/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 35675135d8..f52d3e859c 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -121,7 +121,7 @@ 0.1.35 1.12.2 - 1.2.2 + 1.2.3 3.3 0.16.0 1.0.4 diff --git a/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml index 429b12eb1e..5ba96c7735 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml @@ -37,7 +37,7 @@ 1.12.2 - 1.2.2 + 1.2.3 1.34.1 2.17.2 0.16.0 From 685c5e50e7b42baa0ab43ffb870ddf13b5bf8047 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:08:53 +0800 Subject: [PATCH 04/34] Bump protobuf-java_version from 3.25.2 to 3.25.3 (#13763) Bumps `protobuf-java_version` from 3.25.2 to 3.25.3. Updates `com.google.protobuf:protobuf-java` from 3.25.2 to 3.25.3 - [Release notes](https://github.com/protocolbuffers/protobuf/releases) - [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl) - [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.25.2...v3.25.3) Updates `com.google.protobuf:protobuf-java-util` from 3.25.2 to 3.25.3 --- updated-dependencies: - dependency-name: com.google.protobuf:protobuf-java dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: com.google.protobuf:protobuf-java-util dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index f52d3e859c..ee71ce765f 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -105,7 +105,7 @@ 2.12.0 3.10.0 4.0.66 - 3.25.2 + 3.25.3 1.3.2 3.1.0 9.4.53.v20231009 From faa2e9abb23f3a45c60d038d810db4979a857709 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:09:11 +0800 Subject: [PATCH 05/34] Bump org.apache.commons:commons-compress from 1.25.0 to 1.26.0 (#13765) Bumps org.apache.commons:commons-compress from 1.25.0 to 1.26.0. --- updated-dependencies: - dependency-name: org.apache.commons:commons-compress dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- dubbo-test/dubbo-test-check/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index ee71ce765f..2c38a23575 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -165,7 +165,7 @@ 6.1.26 2.0 1.6.0 - 1.25.0 + 1.26.0 2.43.0 check 1.0.0 diff --git a/dubbo-test/dubbo-test-check/pom.xml b/dubbo-test/dubbo-test-check/pom.xml index d6ec5d7e55..2d0866fece 100644 --- a/dubbo-test/dubbo-test-check/pom.xml +++ b/dubbo-test/dubbo-test-check/pom.xml @@ -33,7 +33,7 @@ 4.2.0 3.7.2 4.2.0 - 1.25.0 + 1.26.0 1.9.3 1.4.0 2.12.3 From 0e80e67e90b4bcf54475bc5675c397da6c388b43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:09:50 +0800 Subject: [PATCH 06/34] Bump netty4_version from 4.1.106.Final to 4.1.107.Final (#13766) Bumps `netty4_version` from 4.1.106.Final to 4.1.107.Final. Updates `io.netty:netty-all` from 4.1.106.Final to 4.1.107.Final - [Commits](https://github.com/netty/netty/compare/netty-4.1.106.Final...netty-4.1.107.Final) Updates `io.netty:netty-bom` from 4.1.106.Final to 4.1.107.Final - [Commits](https://github.com/netty/netty/compare/netty-4.1.106.Final...netty-4.1.107.Final) --- updated-dependencies: - dependency-name: io.netty:netty-all dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: io.netty:netty-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 2c38a23575..049a341824 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -95,7 +95,7 @@ 3.30.2-GA 1.14.12 3.2.10.Final - 4.1.106.Final + 4.1.107.Final 4.5.14 4.4.16 1.2.83 From 3a4abfea969fc157e9e14fa8886c42791210296c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:10:05 +0800 Subject: [PATCH 07/34] Bump jetty_version from 9.4.53.v20231009 to 9.4.54.v20240208 (#13764) Bumps `jetty_version` from 9.4.53.v20231009 to 9.4.54.v20240208. Updates `org.eclipse.jetty:jetty-server` from 9.4.53.v20231009 to 9.4.54.v20240208 Updates `org.eclipse.jetty:jetty-servlet` from 9.4.53.v20231009 to 9.4.54.v20240208 --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-server dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.eclipse.jetty:jetty-servlet dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 049a341824..aa7d677bdd 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -108,7 +108,7 @@ 3.25.3 1.3.2 3.1.0 - 9.4.53.v20231009 + 9.4.54.v20240208 3.0.2 1.1.0.Final 5.4.3.Final From 3a514d2159121ac8ecc34fc81a1db0bd0486bc10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:10:18 +0800 Subject: [PATCH 08/34] Bump ch.qos.logback:logback-core from 1.4.14 to 1.5.0 (#13767) Bumps [ch.qos.logback:logback-core](https://github.com/qos-ch/logback) from 1.4.14 to 1.5.0. - [Commits](https://github.com/qos-ch/logback/compare/v_1.4.14...v_1.5.0) --- updated-dependencies: - dependency-name: ch.qos.logback:logback-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml | 2 +- dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml index 63619aac09..800bd48247 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml @@ -184,7 +184,7 @@ ch.qos.logback logback-core - 1.4.14 + 1.5.0 compile diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml index ac803d7fe2..6c22aec996 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml @@ -181,7 +181,7 @@ ch.qos.logback logback-core - 1.4.14 + 1.5.0 compile From e728bfcf9cfea29663a22b07332e25b338dd40a4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:12:32 +0800 Subject: [PATCH 09/34] Bump org.eclipse.jetty:jetty-maven-plugin (#13771) Bumps org.eclipse.jetty:jetty-maven-plugin from 9.4.53.v20231009 to 9.4.54.v20240208. --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0fcbce9ecb..b4ac6ec0b8 100644 --- a/pom.xml +++ b/pom.xml @@ -148,7 +148,7 @@ 3.12.1 3.3.0 3.6.3 - 9.4.53.v20231009 + 9.4.54.v20240208 3.3.1 0.8.11 1.6.0 From e3f67b1f76c6ee14a2dde911c3bb448e377927c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:12:41 +0800 Subject: [PATCH 10/34] Bump org.aspectj:aspectjweaver from 1.9.21 to 1.9.21.1 (#13770) Bumps [org.aspectj:aspectjweaver](https://github.com/eclipse/org.aspectj) from 1.9.21 to 1.9.21.1. - [Release notes](https://github.com/eclipse/org.aspectj/releases) - [Commits](https://github.com/eclipse/org.aspectj/commits) --- updated-dependencies: - dependency-name: org.aspectj:aspectjweaver dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-config/dubbo-config-spring/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-config/dubbo-config-spring/pom.xml b/dubbo-config/dubbo-config-spring/pom.xml index 60a4991be7..cab899df20 100644 --- a/dubbo-config/dubbo-config-spring/pom.xml +++ b/dubbo-config/dubbo-config-spring/pom.xml @@ -74,7 +74,7 @@ org.aspectj aspectjweaver - 1.9.21 + 1.9.21.1 test From 987c90a5a7bbfc5234be611ca81f804a70071631 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 20 Feb 2024 14:12:53 +0800 Subject: [PATCH 11/34] Bump org.springframework.security:spring-security-bom (#13768) Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 5.8.9 to 5.8.10. - [Release notes](https://github.com/spring-projects/spring-security/releases) - [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc) - [Commits](https://github.com/spring-projects/spring-security/compare/5.8.9...5.8.10) --- updated-dependencies: - dependency-name: org.springframework.security:spring-security-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index aa7d677bdd..45baad0c54 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -91,7 +91,7 @@ 5.3.25 - 5.8.9 + 5.8.10 3.30.2-GA 1.14.12 3.2.10.Final From 99613a1f566775ca6d442088e7dcc84a3cc112a8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 22 Feb 2024 10:44:49 +0800 Subject: [PATCH 12/34] Bump io.micrometer:micrometer-bom from 1.12.2 to 1.12.3 (#13769) Bumps [io.micrometer:micrometer-bom](https://github.com/micrometer-metrics/micrometer) from 1.12.2 to 1.12.3. - [Release notes](https://github.com/micrometer-metrics/micrometer/releases) - [Commits](https://github.com/micrometer-metrics/micrometer/compare/v1.12.2...v1.12.3) --- updated-dependencies: - dependency-name: io.micrometer:micrometer-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- .../dubbo-spring-boot-starters/observability/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 45baad0c54..79de033da1 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -119,7 +119,7 @@ 2.2 3.14.0 0.1.35 - 1.12.2 + 1.12.3 1.2.3 3.3 diff --git a/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml index 5ba96c7735..2e8e4d0b56 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-starters/observability/pom.xml @@ -36,7 +36,7 @@ - 1.12.2 + 1.12.3 1.2.3 1.34.1 2.17.2 From 6dbac54b398252ce0110ddb55150d3f0422c13be Mon Sep 17 00:00:00 2001 From: "J.Son" Date: Mon, 26 Feb 2024 17:11:10 +0800 Subject: [PATCH 13/34] 'blacklist' renamed to 'blocklist' (#13800) --- .../rpc/cluster/router/condition/ConditionStateRouter.java | 2 +- .../org/apache/dubbo/registry/integration/DynamicDirectory.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/ConditionStateRouter.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/ConditionStateRouter.java index b89395ca69..84cf9ef663 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/ConditionStateRouter.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/ConditionStateRouter.java @@ -235,7 +235,7 @@ public class ConditionStateRouter extends AbstractStateRouter { CLUSTER_CONDITIONAL_ROUTE_LIST_EMPTY, "condition state router thenCondition is empty", "", - "The current consumer in the service blacklist. consumer: " + NetUtils.getLocalHost() + "The current consumer in the service blocklist. consumer: " + NetUtils.getLocalHost() + ", service: " + url.getServiceKey()); if (needToPrintMessage) { messageHolder.set("Empty return. Reason: ThenCondition is empty."); diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/DynamicDirectory.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/DynamicDirectory.java index 87a1871067..be8c2e74c2 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/DynamicDirectory.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/DynamicDirectory.java @@ -202,7 +202,7 @@ public abstract class DynamicDirectory extends AbstractDirectory implement + " for service " + getConsumerUrl().getServiceKey() + " on consumer " + NetUtils.getLocalHost() + " use dubbo version " + Version.getVersion() - + ", please check status of providers(disabled, not registered or in blacklist)."); + + ", please check status of providers(disabled, not registered or in blocklist)."); } if (multiGroup) { From 69dd801db2f50e03faf58c60f6eb3f4ea72fee5f Mon Sep 17 00:00:00 2001 From: suncairong163 <105478245+suncairong163@users.noreply.github.com> Date: Wed, 28 Feb 2024 10:44:29 +0800 Subject: [PATCH 14/34] Fix incorrect rest response header and demo double path error (#13789) * fix dubbo demo xml double path error * fix restEasy response headers formate * fix content-type judge * remove unused code --- .../main/java/org/apache/dubbo/demo/RestDemoService.java | 2 +- .../rest/extension/resteasy/ResteasyContext.java | 7 +++++-- .../resteasy/filter/ResteasyNettyHttpResponse.java | 9 ++++++++- .../dubbo/rpc/protocol/rest/message/codec/JsonCodec.java | 3 +-- .../rpc/protocol/rest/message/codec/StringCodec.java | 2 +- .../dubbo/rpc/protocol/rest/netty/NettyHttpResponse.java | 4 ++++ 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/dubbo-demo/dubbo-demo-interface/src/main/java/org/apache/dubbo/demo/RestDemoService.java b/dubbo-demo/dubbo-demo-interface/src/main/java/org/apache/dubbo/demo/RestDemoService.java index f12536bfd1..0405b739f2 100644 --- a/dubbo-demo/dubbo-demo-interface/src/main/java/org/apache/dubbo/demo/RestDemoService.java +++ b/dubbo-demo/dubbo-demo-interface/src/main/java/org/apache/dubbo/demo/RestDemoService.java @@ -65,7 +65,7 @@ public interface RestDemoService { Boolean testBody2(Boolean b); @POST - @Path("/testBody3") + @Path("/testBody4") @Consumes({MediaType.TEXT_PLAIN}) TestPO testBody2(TestPO b); diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/ResteasyContext.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/ResteasyContext.java index d1e6ec0fa4..91f2edfb43 100644 --- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/ResteasyContext.java +++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/ResteasyContext.java @@ -169,10 +169,13 @@ public interface ResteasyContext { for (Map.Entry> entry : headers.entrySet()) { String key = entry.getKey(); - if (entry.getValue() == null) { + List value = entry.getValue(); + if (value == null || value.isEmpty()) { continue; } - response.addOutputHeaders(key, entry.getValue().toString()); + for (Object tmp : value) { + response.addOutputHeaders(key, tmp.toString()); + } } } diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/ResteasyNettyHttpResponse.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/ResteasyNettyHttpResponse.java index 826f84df70..92de82f8d9 100644 --- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/ResteasyNettyHttpResponse.java +++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/ResteasyNettyHttpResponse.java @@ -42,7 +42,14 @@ public class ResteasyNettyHttpResponse implements HttpResponse { for (Map.Entry> headers : outputHeaders.entrySet()) { String key = headers.getKey(); List value = headers.getValue(); - multivaluedMap.add(key, value); + + if (value == null || value.isEmpty()) { + continue; + } + + for (String val : value) { + multivaluedMap.add(key, val); + } } } diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/message/codec/JsonCodec.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/message/codec/JsonCodec.java index c03ed001d4..49994f18b1 100644 --- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/message/codec/JsonCodec.java +++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/message/codec/JsonCodec.java @@ -33,13 +33,12 @@ import java.util.Set; /** * body is json */ -@Activate("json") +@Activate(value = "json", order = 100) public class JsonCodec implements HttpMessageCodec { private static final Set unSupportClasses = new HashSet<>(); static { unSupportClasses.add(byte[].class); - unSupportClasses.add(String.class); } public static void addUnSupportClass(Class unSupportClass) { diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/message/codec/StringCodec.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/message/codec/StringCodec.java index 4f939ea7fb..1a543a2ad7 100644 --- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/message/codec/StringCodec.java +++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/message/codec/StringCodec.java @@ -28,7 +28,7 @@ import java.nio.charset.StandardCharsets; /** * body is string */ -@Activate("string") +@Activate(value = "string", order = 200) public class StringCodec implements HttpMessageCodec { @Override diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/NettyHttpResponse.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/NettyHttpResponse.java index 72256f53e9..d29e194104 100644 --- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/NettyHttpResponse.java +++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/netty/NettyHttpResponse.java @@ -190,6 +190,10 @@ public class NettyHttpResponse implements HttpResponse { outputHeaders.put(name, values); } + if (values.contains(value)) { + return; + } + values.add(value); } From e8a535485afdfb274218310909e90982dd08451e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:25:31 +0800 Subject: [PATCH 15/34] Bump org.testcontainers:testcontainers from 1.19.5 to 1.19.6 (#13796) Bumps [org.testcontainers:testcontainers](https://github.com/testcontainers/testcontainers-java) from 1.19.5 to 1.19.6. - [Release notes](https://github.com/testcontainers/testcontainers-java/releases) - [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/testcontainers/testcontainers-java/compare/1.19.5...1.19.6) --- updated-dependencies: - dependency-name: org.testcontainers:testcontainers dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-config/dubbo-config-api/pom.xml | 2 +- dubbo-dependencies-bom/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-config/dubbo-config-api/pom.xml b/dubbo-config/dubbo-config-api/pom.xml index b9e740597c..b941bd80da 100644 --- a/dubbo-config/dubbo-config-api/pom.xml +++ b/dubbo-config/dubbo-config-api/pom.xml @@ -236,7 +236,7 @@ org.testcontainers testcontainers - 1.19.5 + 1.19.6 test diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 79de033da1..3d8094a581 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -153,7 +153,7 @@ 2.2.7 1.2.0 - 1.19.5 + 1.19.6 3.2.13 1.6.13 From 3d0e8c286874e9cfa964f3251dae9acdb82ae14a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:25:40 +0800 Subject: [PATCH 16/34] Bump com.alibaba.fastjson2:fastjson2 from 2.0.46 to 2.0.47 (#13792) Bumps [com.alibaba.fastjson2:fastjson2](https://github.com/alibaba/fastjson2) from 2.0.46 to 2.0.47. - [Release notes](https://github.com/alibaba/fastjson2/releases) - [Commits](https://github.com/alibaba/fastjson2/compare/2.0.46...2.0.47) --- updated-dependencies: - dependency-name: com.alibaba.fastjson2:fastjson2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 3d8094a581..91d4911d44 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -99,7 +99,7 @@ 4.5.14 4.4.16 1.2.83 - 2.0.46 + 2.0.47 3.7.0 5.1.0 2.12.0 From 5c15c3ffd8a47fb4a832730229d7503a0b73d615 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:25:50 +0800 Subject: [PATCH 17/34] Bump org.graalvm.buildtools:native-maven-plugin from 0.10.0 to 0.10.1 (#13797) Bumps [org.graalvm.buildtools:native-maven-plugin](https://github.com/graalvm/native-build-tools) from 0.10.0 to 0.10.1. - [Release notes](https://github.com/graalvm/native-build-tools/releases) - [Commits](https://github.com/graalvm/native-build-tools/compare/0.10.0...0.10.1) --- updated-dependencies: - dependency-name: org.graalvm.buildtools:native-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml | 2 +- dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml index 800bd48247..b17ae406bc 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml @@ -232,7 +232,7 @@ org.graalvm.buildtools native-maven-plugin - 0.10.0 + 0.10.1 ${project.build.outputDirectory} diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml index 6c22aec996..2267b7fa66 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml @@ -229,7 +229,7 @@ org.graalvm.buildtools native-maven-plugin - 0.10.0 + 0.10.1 ${project.build.outputDirectory} From c4d686af5e1bce23b9f4fb9965a27ba425b7e731 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:26:03 +0800 Subject: [PATCH 18/34] Bump log4j2_version from 2.22.1 to 2.23.0 (#13795) Bumps `log4j2_version` from 2.22.1 to 2.23.0. Updates `org.apache.logging.log4j:log4j-api` from 2.22.1 to 2.23.0 Updates `org.apache.logging.log4j:log4j-core` from 2.22.1 to 2.23.0 --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-api dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.logging.log4j:log4j-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- dubbo-spring-boot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 91d4911d44..c452665dba 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -143,7 +143,7 @@ 1.2.17 1.2.13 - 2.22.1 + 2.23.0 2.15.1 0.13.0 diff --git a/dubbo-spring-boot/pom.xml b/dubbo-spring-boot/pom.xml index ca381b5992..a8ee04c6a1 100644 --- a/dubbo-spring-boot/pom.xml +++ b/dubbo-spring-boot/pom.xml @@ -41,7 +41,7 @@ 2.7.18 ${revision} - 2.22.1 + 2.23.0 1.14.11 From 2e0734d4706970802247170eff33d1af0a8fdd2c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:26:13 +0800 Subject: [PATCH 19/34] Bump org.apache.tomcat.embed:tomcat-embed-core from 8.5.98 to 8.5.99 (#13794) Bumps org.apache.tomcat.embed:tomcat-embed-core from 8.5.98 to 8.5.99. --- updated-dependencies: - dependency-name: org.apache.tomcat.embed:tomcat-embed-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index c452665dba..bd1b1c4a1f 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -132,7 +132,7 @@ 2.1.1 3.15.6.Final 1.9.13 - 8.5.98 + 8.5.99 2.2.4 1.61.1 0.8.1 From 93a6c88ed677d521af5d3ed517aa29d25a7669c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:26:20 +0800 Subject: [PATCH 20/34] Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.1 to 3.5.2 (#13793) Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.1 to 3.5.2. - [Release notes](https://github.com/apache/maven-shade-plugin/releases) - [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.1...maven-shade-plugin-3.5.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-shade-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b4ac6ec0b8..e35f5e8dd0 100644 --- a/pom.xml +++ b/pom.xml @@ -315,7 +315,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.5.1 + 3.5.2 false From 5dd56fee817e2e8addbc37e21a10bc747a8cd9bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Feb 2024 17:26:29 +0800 Subject: [PATCH 21/34] Bump bytebuddy.version from 1.14.11 to 1.14.12 (#13798) Bumps `bytebuddy.version` from 1.14.11 to 1.14.12. Updates `net.bytebuddy:byte-buddy` from 1.14.11 to 1.14.12 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.11...byte-buddy-1.14.12) Updates `net.bytebuddy:byte-buddy-agent` from 1.14.11 to 1.14.12 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.11...byte-buddy-1.14.12) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: net.bytebuddy:byte-buddy-agent dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-spring-boot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-spring-boot/pom.xml b/dubbo-spring-boot/pom.xml index a8ee04c6a1..3dbe3891d5 100644 --- a/dubbo-spring-boot/pom.xml +++ b/dubbo-spring-boot/pom.xml @@ -43,7 +43,7 @@ 2.23.0 - 1.14.11 + 1.14.12 From 17b75a78955effbf82f4cd958c37545209c152e1 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Thu, 29 Feb 2024 11:26:11 +0800 Subject: [PATCH 22/34] Refresh valid invokers after connectivity check (#13773) --- .../cluster/directory/AbstractDirectory.java | 165 +++++++++++------- .../apache/dubbo/common/utils/LockUtils.java | 54 ++++++ .../dubbo/common/utils/LockUtilsTest.java | 144 +++++++++++++++ 3 files changed, 300 insertions(+), 63 deletions(-) create mode 100644 dubbo-common/src/main/java/org/apache/dubbo/common/utils/LockUtils.java create mode 100644 dubbo-common/src/test/java/org/apache/dubbo/common/utils/LockUtilsTest.java diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java index 087eacbade..be68810f4a 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/directory/AbstractDirectory.java @@ -25,6 +25,7 @@ import org.apache.dubbo.common.logger.ErrorTypeAwareLogger; import org.apache.dubbo.common.logger.LoggerFactory; import org.apache.dubbo.common.threadpool.manager.FrameworkExecutorRepository; import org.apache.dubbo.common.utils.ConcurrentHashSet; +import org.apache.dubbo.common.utils.LockUtils; import org.apache.dubbo.common.utils.NetUtils; import org.apache.dubbo.common.utils.StringUtils; import org.apache.dubbo.metrics.event.MetricsEventBus; @@ -56,6 +57,8 @@ import java.util.concurrent.ScheduledFuture; import java.util.concurrent.Semaphore; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.locks.ReentrantLock; import java.util.stream.Collectors; import static org.apache.dubbo.common.constants.CommonConstants.CONSUMER; @@ -122,6 +125,8 @@ public abstract class AbstractDirectory implements Directory { private volatile ScheduledFuture connectivityCheckFuture; + private final ReentrantLock invokerRefreshLock = new ReentrantLock(); + /** * The max count of invokers for each reconnect task select to try to reconnect. */ @@ -293,17 +298,19 @@ public abstract class AbstractDirectory implements Directory { @Override public void addInvalidateInvoker(Invoker invoker) { - // 1. remove this invoker from validInvokers list, this invoker will not be listed in the next time - if (removeValidInvoker(invoker)) { - // 2. add this invoker to reconnect list - invokersToReconnect.add(invoker); - // 3. try start check connectivity task - checkConnectivity(); + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + // 1. remove this invoker from validInvokers list, this invoker will not be listed in the next time + if (removeValidInvoker(invoker)) { + // 2. add this invoker to reconnect list + invokersToReconnect.add(invoker); + // 3. try start check connectivity task + checkConnectivity(); - logger.info("The invoker " + invoker.getUrl() - + " has been added to invalidate list due to connectivity problem. " - + "Will trying to reconnect to it in the background."); - } + logger.info("The invoker " + invoker.getUrl() + + " has been added to invalidate list due to connectivity problem. " + + "Will trying to reconnect to it in the background."); + } + }); } public void checkConnectivity() { @@ -322,23 +329,30 @@ public abstract class AbstractDirectory implements Directory { // 1. pick invokers from invokersToReconnect // limit max reconnectTaskTryCount, prevent this task hang up all the connectivityExecutor // for long time - if (invokersToReconnect.size() < reconnectTaskTryCount) { - invokersToTry.addAll(invokersToReconnect); - } else { - for (int i = 0; i < reconnectTaskTryCount; i++) { - Invoker tInvoker = invokersToReconnect.get( - ThreadLocalRandom.current().nextInt(invokersToReconnect.size())); - if (!invokersToTry.contains(tInvoker)) { - // ignore if is selected, invokersToTry's size is always smaller than - // reconnectTaskTryCount + 1 - invokersToTry.add(tInvoker); + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + if (invokersToReconnect.size() < reconnectTaskTryCount) { + invokersToTry.addAll(invokersToReconnect); + } else { + for (int i = 0; i < reconnectTaskTryCount; i++) { + Invoker tInvoker = invokersToReconnect.get( + ThreadLocalRandom.current().nextInt(invokersToReconnect.size())); + if (!invokersToTry.contains(tInvoker)) { + // ignore if is selected, invokersToTry's size is always smaller than + // reconnectTaskTryCount + 1 + invokersToTry.add(tInvoker); + } } } - } + }); // 2. try to check the invoker's status for (Invoker invoker : invokersToTry) { - if (invokers.contains(invoker)) { + AtomicBoolean invokerExist = new AtomicBoolean(false); + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + invokerExist.set(invokers.contains(invoker)); + }); + // Should not lock here, `invoker.isAvailable` may need some time to check + if (invokerExist.get()) { if (invoker.isAvailable()) { needDeleteList.add(invoker); } @@ -348,22 +362,37 @@ public abstract class AbstractDirectory implements Directory { } // 3. recover valid invoker - for (Invoker tInvoker : needDeleteList) { - if (invokers.contains(tInvoker)) { - addValidInvoker(tInvoker); - logger.info( - "Recover service address: " + tInvoker.getUrl() + " from invalid list."); + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + for (Invoker tInvoker : needDeleteList) { + if (invokers.contains(tInvoker)) { + addValidInvoker(tInvoker); + logger.info("Recover service address: " + tInvoker.getUrl() + + " from invalid list."); + } else { + logger.info( + "The invoker " + tInvoker.getUrl() + + " has been removed from invokers list. Will remove it in reconnect list."); + } + invokersToReconnect.remove(tInvoker); } - invokersToReconnect.remove(tInvoker); - } + }); + } catch (Throwable t) { + logger.error( + LoggerCodeConstants.INTERNAL_ERROR, + "", + "", + "Error occurred when check connectivity. ", + t); } finally { checkConnectivityPermit.release(); } // 4. submit new task if it has more to recover - if (!invokersToReconnect.isEmpty()) { - checkConnectivity(); - } + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + if (!invokersToReconnect.isEmpty()) { + checkConnectivity(); + } + }); MetricsEventBus.publish(RegistryEvent.refreshDirectoryEvent( applicationModel, getSummary(), getDirectoryMeta())); }, @@ -382,9 +411,11 @@ public abstract class AbstractDirectory implements Directory { * 4. all the invokers disappeared from total invokers should be removed in the disabled invokers list */ public void refreshInvoker() { - if (invokersInitialized) { - refreshInvokerInternal(); - } + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + if (invokersInitialized) { + refreshInvokerInternal(); + } + }); MetricsEventBus.publish( RegistryEvent.refreshDirectoryEvent(applicationModel, getSummary(), getDirectoryMeta())); } @@ -393,7 +424,7 @@ public abstract class AbstractDirectory implements Directory { return Collections.emptyMap(); } - private synchronized void refreshInvokerInternal() { + private void refreshInvokerInternal() { BitList> copiedInvokers = invokers.clone(); refreshInvokers(copiedInvokers, invokersToReconnect); refreshInvokers(copiedInvokers, disabledInvokers); @@ -414,25 +445,29 @@ public abstract class AbstractDirectory implements Directory { @Override public void addDisabledInvoker(Invoker invoker) { - if (invokers.contains(invoker)) { - disabledInvokers.add(invoker); - removeValidInvoker(invoker); - logger.info("Disable service address: " + invoker.getUrl() + "."); - } + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + if (invokers.contains(invoker)) { + disabledInvokers.add(invoker); + removeValidInvoker(invoker); + logger.info("Disable service address: " + invoker.getUrl() + "."); + } + }); MetricsEventBus.publish( RegistryEvent.refreshDirectoryEvent(applicationModel, getSummary(), getDirectoryMeta())); } @Override public void recoverDisabledInvoker(Invoker invoker) { - if (disabledInvokers.remove(invoker)) { - try { - addValidInvoker(invoker); - logger.info("Recover service address: " + invoker.getUrl() + " from disabled list."); - } catch (Throwable ignore) { + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + if (disabledInvokers.remove(invoker)) { + try { + addValidInvoker(invoker); + logger.info("Recover service address: " + invoker.getUrl() + " from disabled list."); + } catch (Throwable ignore) { + } } - } + }); MetricsEventBus.publish( RegistryEvent.refreshDirectoryEvent(applicationModel, getSummary(), getDirectoryMeta())); } @@ -491,9 +526,11 @@ public abstract class AbstractDirectory implements Directory { } protected void setInvokers(BitList> invokers) { - this.invokers = invokers; - refreshInvokerInternal(); - this.invokersInitialized = true; + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + this.invokers = invokers; + refreshInvokerInternal(); + this.invokersInitialized = true; + }); MetricsEventBus.publish( RegistryEvent.refreshDirectoryEvent(applicationModel, getSummary(), getDirectoryMeta())); @@ -501,29 +538,31 @@ public abstract class AbstractDirectory implements Directory { protected void destroyInvokers() { // set empty instead of clearing to support concurrent access. - this.invokers = BitList.emptyList(); - this.validInvokers = BitList.emptyList(); - this.invokersInitialized = false; + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + this.invokers = BitList.emptyList(); + this.validInvokers = BitList.emptyList(); + this.invokersInitialized = false; + }); } private boolean addValidInvoker(Invoker invoker) { - boolean result; - synchronized (this.validInvokers) { - result = this.validInvokers.add(invoker); - } + AtomicBoolean result = new AtomicBoolean(false); + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + result.set(this.validInvokers.add(invoker)); + }); MetricsEventBus.publish( RegistryEvent.refreshDirectoryEvent(applicationModel, getSummary(), getDirectoryMeta())); - return result; + return result.get(); } private boolean removeValidInvoker(Invoker invoker) { - boolean result; - synchronized (this.validInvokers) { - result = this.validInvokers.remove(invoker); - } + AtomicBoolean result = new AtomicBoolean(false); + LockUtils.safeLock(invokerRefreshLock, LockUtils.DEFAULT_TIMEOUT, () -> { + result.set(this.validInvokers.remove(invoker)); + }); MetricsEventBus.publish( RegistryEvent.refreshDirectoryEvent(applicationModel, getSummary(), getDirectoryMeta())); - return result; + return result.get(); } protected abstract List> doList( diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/LockUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/LockUtils.java new file mode 100644 index 0000000000..f441dc9b2f --- /dev/null +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/LockUtils.java @@ -0,0 +1,54 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.dubbo.common.utils; + +import org.apache.dubbo.common.constants.LoggerCodeConstants; +import org.apache.dubbo.common.logger.ErrorTypeAwareLogger; +import org.apache.dubbo.common.logger.LoggerFactory; + +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; +import java.util.concurrent.locks.Lock; + +public class LockUtils { + private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(LockUtils.class); + + public static final int DEFAULT_TIMEOUT = 60_000; + + public static void safeLock(Lock lock, int timeout, Runnable runnable) { + try { + if (!lock.tryLock(timeout, TimeUnit.MILLISECONDS)) { + logger.error( + LoggerCodeConstants.INTERNAL_ERROR, + "", + "", + "Try to lock failed, timeout: " + timeout, + new TimeoutException()); + } + runnable.run(); + } catch (InterruptedException e) { + logger.warn(LoggerCodeConstants.INTERNAL_ERROR, "", "", "Try to lock failed", e); + Thread.currentThread().interrupt(); + } finally { + try { + lock.unlock(); + } catch (Exception e) { + // ignore + } + } + } +} diff --git a/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LockUtilsTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LockUtilsTest.java new file mode 100644 index 0000000000..87c1824930 --- /dev/null +++ b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/LockUtilsTest.java @@ -0,0 +1,144 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.dubbo.common.utils; + +import java.lang.Thread.State; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicLong; +import java.util.concurrent.locks.ReentrantLock; + +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.RepeatedTest; + +import static org.awaitility.Awaitility.await; + +public class LockUtilsTest { + @RepeatedTest(5) + void testLockFailed() { + ReentrantLock reentrantLock = new ReentrantLock(); + AtomicBoolean releaseLock = new AtomicBoolean(false); + new Thread(() -> { + reentrantLock.lock(); + while (!releaseLock.get()) { + try { + Thread.sleep(5); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + reentrantLock.unlock(); + }) + .start(); + + await().until(reentrantLock::isLocked); + + AtomicLong lockTime = new AtomicLong(0); + long startTime = System.currentTimeMillis(); + LockUtils.safeLock(reentrantLock, 1000, () -> { + lockTime.set(System.currentTimeMillis()); + }); + Assertions.assertTrue(lockTime.get() - startTime >= 1000); + releaseLock.set(true); + + while (reentrantLock.isLocked()) { + try { + Thread.sleep(5); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + + lockTime.set(0); + startTime = System.currentTimeMillis(); + LockUtils.safeLock(reentrantLock, 1000, () -> { + lockTime.set(System.currentTimeMillis()); + }); + Assertions.assertTrue(lockTime.get() - startTime < 1000); + } + + @RepeatedTest(5) + void testReentrant() { + ReentrantLock reentrantLock = new ReentrantLock(); + reentrantLock.lock(); + + AtomicLong lockTime = new AtomicLong(0); + long startTime = System.currentTimeMillis(); + LockUtils.safeLock(reentrantLock, 1000, () -> { + lockTime.set(System.currentTimeMillis()); + }); + Assertions.assertTrue(lockTime.get() - startTime < 1000); + + reentrantLock.lock(); + lockTime.set(0); + startTime = System.currentTimeMillis(); + LockUtils.safeLock(reentrantLock, 1000, () -> { + lockTime.set(System.currentTimeMillis()); + }); + Assertions.assertTrue(lockTime.get() - startTime < 1000); + + Assertions.assertTrue(reentrantLock.isLocked()); + reentrantLock.unlock(); + Assertions.assertTrue(reentrantLock.isLocked()); + reentrantLock.unlock(); + Assertions.assertFalse(reentrantLock.isLocked()); + } + + @RepeatedTest(5) + void testInterrupt() { + ReentrantLock reentrantLock = new ReentrantLock(); + reentrantLock.lock(); + + AtomicBoolean locked = new AtomicBoolean(false); + Thread thread = new Thread(() -> { + LockUtils.safeLock(reentrantLock, 10000, () -> { + locked.set(true); + }); + }); + thread.start(); + + await().until(() -> thread.getState() == State.TIMED_WAITING); + thread.interrupt(); + await().until(() -> thread.getState() == State.TERMINATED); + + Assertions.assertFalse(locked.get()); + + reentrantLock.unlock(); + } + + @RepeatedTest(5) + void testHoldLock() throws InterruptedException { + ReentrantLock reentrantLock = new ReentrantLock(); + reentrantLock.lock(); + + AtomicLong lockTime = new AtomicLong(0); + long startTime = System.currentTimeMillis(); + Thread thread = new Thread(() -> { + LockUtils.safeLock(reentrantLock, 10000, () -> { + lockTime.set(System.currentTimeMillis()); + }); + }); + thread.start(); + + await().until(() -> thread.getState() == State.TIMED_WAITING); + Thread.sleep(1000); + reentrantLock.unlock(); + + await().until(() -> thread.getState() == State.TERMINATED); + Assertions.assertTrue(lockTime.get() - startTime > 1000); + Assertions.assertTrue(lockTime.get() - startTime < 10000); + } +} From 428ca27a94826e5dadda1b2ab0d588ba3ece5fa2 Mon Sep 17 00:00:00 2001 From: jiangyuan <469391363@qq.com> Date: Thu, 29 Feb 2024 15:25:22 +0800 Subject: [PATCH 23/34] Fix ModuleEnvironment#getDynamicGlobalConfiguration (#13781) * Update ModuleEnvironment#getDynamicGlobalConfiguration * add unit test * update --- .../dubbo/common/config/ModuleEnvironment.java | 18 +++++------------- .../OrderedPropertiesConfigurationTest.java | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/config/ModuleEnvironment.java b/dubbo-common/src/main/java/org/apache/dubbo/common/config/ModuleEnvironment.java index 3de18ccbf0..c014c57a64 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/config/ModuleEnvironment.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/config/ModuleEnvironment.java @@ -29,8 +29,6 @@ import java.util.Map; import java.util.Optional; import java.util.concurrent.atomic.AtomicBoolean; -import static org.apache.dubbo.common.constants.LoggerCodeConstants.COMMON_UNEXPECTED_EXCEPTION; - public class ModuleEnvironment extends Environment implements ModuleExt { // delegate @@ -94,19 +92,13 @@ public class ModuleEnvironment extends Environment implements ModuleExt { @Override public Configuration getDynamicGlobalConfiguration() { if (dynamicConfiguration == null) { - return applicationDelegate.getDynamicGlobalConfiguration(); + CompositeConfiguration configuration = new CompositeConfiguration(); + configuration.addConfiguration(applicationDelegate.getDynamicGlobalConfiguration()); + configuration.addConfiguration(orderedPropertiesConfiguration); + return configuration; } + if (dynamicGlobalConfiguration == null) { - if (dynamicConfiguration == null) { - if (logger.isWarnEnabled()) { - logger.warn( - COMMON_UNEXPECTED_EXCEPTION, - "", - "", - "dynamicConfiguration is null , return globalConfiguration."); - } - return getConfiguration(); - } dynamicGlobalConfiguration = new CompositeConfiguration(); dynamicGlobalConfiguration.addConfiguration(dynamicConfiguration); dynamicGlobalConfiguration.addConfiguration(getConfiguration()); diff --git a/dubbo-common/src/test/java/org/apache/dubbo/common/config/OrderedPropertiesConfigurationTest.java b/dubbo-common/src/test/java/org/apache/dubbo/common/config/OrderedPropertiesConfigurationTest.java index 8fc082de28..aaf2eb628f 100644 --- a/dubbo-common/src/test/java/org/apache/dubbo/common/config/OrderedPropertiesConfigurationTest.java +++ b/dubbo-common/src/test/java/org/apache/dubbo/common/config/OrderedPropertiesConfigurationTest.java @@ -17,6 +17,8 @@ package org.apache.dubbo.common.config; import org.apache.dubbo.rpc.model.ApplicationModel; +import org.apache.dubbo.rpc.model.FrameworkModel; +import org.apache.dubbo.rpc.model.ModuleModel; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -32,4 +34,18 @@ class OrderedPropertiesConfigurationTest { ApplicationModel.defaultModel().getDefaultModule()); Assertions.assertEquals("999", configuration.getInternalProperty("testKey")); } + + @Test + void testGetPropertyFromOrderedPropertiesConfiguration() { + FrameworkModel frameworkModel = new FrameworkModel(); + + ApplicationModel applicationModel = frameworkModel.newApplication(); + + ModuleModel moduleModel = applicationModel.newModule(); + ModuleEnvironment moduleEnvironment = moduleModel.modelEnvironment(); + + Configuration configuration = moduleEnvironment.getDynamicGlobalConfiguration(); + // MockOrderedPropertiesProvider2 initProperties + Assertions.assertEquals("999", configuration.getString("testKey")); + } } From d53d8e5d85358019028354b9f9d8389dde13b627 Mon Sep 17 00:00:00 2001 From: laywin Date: Thu, 29 Feb 2024 17:10:41 +0800 Subject: [PATCH 24/34] fix lazy property of serviceBeanDefinition to false (#13787) --- .../factory/annotation/ServiceAnnotationPostProcessor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceAnnotationPostProcessor.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceAnnotationPostProcessor.java index e187ff3380..15fd2d11b9 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceAnnotationPostProcessor.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceAnnotationPostProcessor.java @@ -528,6 +528,9 @@ public class ServiceAnnotationPostProcessor addPropertyReference(builder, "executor", executorBeanName); } + // service bean definition should not be lazy + builder.setLazyInit(false); + return builder.getBeanDefinition(); } From 8fb22934d1c89cfb07e3566a138a3a5962055ebb Mon Sep 17 00:00:00 2001 From: huazhongming Date: Fri, 1 Mar 2024 11:01:10 +0800 Subject: [PATCH 25/34] Upgrade apache parent version 27 to 31. (#13612) Signed-off-by: crazyhzm --- dubbo-dependencies-bom/pom.xml | 2 +- .../dubbo-dependencies-zookeeper-curator5/pom.xml | 2 +- dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index bd1b1c4a1f..d5221fbc7d 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -21,7 +21,7 @@ org.apache apache - 27 + 31 diff --git a/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml b/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml index 5c3b0e40dd..59599fc785 100644 --- a/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml +++ b/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml @@ -21,7 +21,7 @@ org.apache apache - 27 + 31 diff --git a/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml b/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml index 1c6ac5b0c1..a3b19fc261 100644 --- a/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml +++ b/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml @@ -21,7 +21,7 @@ org.apache apache - 27 + 31 diff --git a/pom.xml b/pom.xml index e35f5e8dd0..d6e6c485f9 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.apache apache - 23 + 31 org.apache.dubbo From 860ad02e1ed2cbe5842a611adfc7f1138c4862e0 Mon Sep 17 00:00:00 2001 From: namelessssssssssss <100946116+namelessssssssssss@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:20:07 +0800 Subject: [PATCH 26/34] Fix URL issue (#13807) --- .../main/java/org/apache/dubbo/common/URL.java | 16 ++++++++-------- .../java/org/apache/dubbo/common/URLBuilder.java | 7 ++++--- .../common/url/component/ServiceConfigURL.java | 4 ++-- .../com/alibaba/dubbo/common/DelegateURL.java | 4 ++-- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java b/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java index 28c841996c..0c7bb1e3e8 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java @@ -339,7 +339,7 @@ public /*final**/ class URL implements Serializable { } static String appendDefaultPort(String address, int defaultPort) { - if (address != null && address.length() > 0 && defaultPort > 0) { + if (StringUtils.isNotEmpty(address) && defaultPort > 0) { int i = address.indexOf(':'); if (i < 0) { return address + ":" + defaultPort; @@ -525,7 +525,7 @@ public /*final**/ class URL implements Serializable { List urls = new ArrayList<>(); urls.add(this); String[] backups = getParameter(RemotingConstants.BACKUP_KEY, new String[0]); - if (backups != null && backups.length > 0) { + if (ArrayUtils.isNotEmpty(backups)) { for (String backup : backups) { urls.add(this.setAddress(backup)); } @@ -805,7 +805,7 @@ public /*final**/ class URL implements Serializable { public boolean hasParameter(String key) { String value = getParameter(key); - return value != null && value.length() > 0; + return StringUtils.isNotEmpty(value); } public String getMethodParameterAndDecoded(String method, String key) { @@ -1061,7 +1061,7 @@ public /*final**/ class URL implements Serializable { } public URL addParameters(String... pairs) { - if (pairs == null || pairs.length == 0) { + if (ArrayUtils.isEmpty(pairs)) { return this; } if (pairs.length % 2 != 0) { @@ -1589,9 +1589,9 @@ public /*final**/ class URL implements Serializable { return attributes == null ? Collections.emptyMap() : attributes; } - public URL addAttributes(Map attributes) { - if (attributes != null) { - attributes.putAll(attributes); + public URL addAttributes(Map attributeMap) { + if (attributeMap != null) { + attributes.putAll(attributeMap); } return this; } @@ -1718,7 +1718,7 @@ public /*final**/ class URL implements Serializable { public boolean hasServiceParameter(String service, String key) { String value = getServiceParameter(service, key); - return value != null && value.length() > 0; + return StringUtils.isNotEmpty(value); } public float getPositiveServiceParameter(String service, String key, float defaultValue) { diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/URLBuilder.java b/dubbo-common/src/main/java/org/apache/dubbo/common/URLBuilder.java index e5c18bdaaf..ad2ec5cdf2 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/URLBuilder.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/URLBuilder.java @@ -17,6 +17,7 @@ package org.apache.dubbo.common; import org.apache.dubbo.common.url.component.ServiceConfigURL; +import org.apache.dubbo.common.utils.ArrayUtils; import org.apache.dubbo.common.utils.CollectionUtils; import org.apache.dubbo.common.utils.StringUtils; import org.apache.dubbo.rpc.model.ScopeModel; @@ -376,7 +377,7 @@ public final class URLBuilder extends ServiceConfigURL { @Override public URLBuilder addParameters(String... pairs) { - if (pairs == null || pairs.length == 0) { + if (ArrayUtils.isEmpty(pairs)) { return this; } if (pairs.length % 2 != 0) { @@ -416,7 +417,7 @@ public final class URLBuilder extends ServiceConfigURL { @Override public URLBuilder removeParameters(String... keys) { - if (keys == null || keys.length == 0) { + if (ArrayUtils.isEmpty(keys)) { return this; } for (String key : keys) { @@ -458,7 +459,7 @@ public final class URLBuilder extends ServiceConfigURL { return false; } String value = getMethodParameter(method, key); - return value != null && value.length() > 0; + return StringUtils.isNotEmpty(value); } @Override diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/url/component/ServiceConfigURL.java b/dubbo-common/src/main/java/org/apache/dubbo/common/url/component/ServiceConfigURL.java index b16b5d0325..a353bdab3e 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/url/component/ServiceConfigURL.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/url/component/ServiceConfigURL.java @@ -113,12 +113,12 @@ public class ServiceConfigURL extends URL { } @Override - public URL addAttributes(Map attributes) { + public URL addAttributes(Map attributeMap) { Map newAttributes = new HashMap<>(); if (this.attributes != null) { newAttributes.putAll(this.attributes); } - newAttributes.putAll(attributes); + newAttributes.putAll(attributeMap); return new ServiceConfigURL(getUrlAddress(), getUrlParam(), newAttributes); } diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/DelegateURL.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/DelegateURL.java index 918b7d8a92..7757fc1ac4 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/DelegateURL.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/common/DelegateURL.java @@ -854,8 +854,8 @@ public class DelegateURL extends com.alibaba.dubbo.common.URL { } @Override - public org.apache.dubbo.common.URL addAttributes(Map attributes) { - return apacheUrl.addAttributes(attributes); + public org.apache.dubbo.common.URL addAttributes(Map attributeMap) { + return apacheUrl.addAttributes(attributeMap); } @Override From 22d3cc9052a958f997db9f1ba328ec1cbb744236 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Mon, 4 Mar 2024 17:25:30 +0800 Subject: [PATCH 27/34] Update issue template (#13822) * Update issue template * Update issue template --- .github/ISSUE_TEMPLATE/1-bug.md | 110 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/2-feature.md | 82 ++++++++++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 39 -------- .github/ISSUE_TEMPLATE/config.yml | 28 ++++-- .github/ISSUE_TEMPLATE/discussion.md | 11 --- .github/ISSUE_TEMPLATE/feature_request.md | 16 ---- .github/ISSUE_TEMPLATE/proposal.md | 15 --- .github/ISSUE_TEMPLATE/question.md | 13 --- 8 files changed, 213 insertions(+), 101 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/1-bug.md create mode 100644 .github/ISSUE_TEMPLATE/2-feature.md delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/discussion.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/ISSUE_TEMPLATE/proposal.md delete mode 100644 .github/ISSUE_TEMPLATE/question.md diff --git a/.github/ISSUE_TEMPLATE/1-bug.md b/.github/ISSUE_TEMPLATE/1-bug.md new file mode 100644 index 0000000000..418da0bd1e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug.md @@ -0,0 +1,110 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name: Bug Report +description: File a bug report +title: "[Bug] " +labels: ["status/need-triage"] +projects: ["apache/337"] +body: +- type: markdown + attributes: + value: | + Dubbo logo + + Thank you for finding the time to report the problem! We really appreciate the community efforts to improve Dubbo. + + Please make sure what you are reporting is indeed a bug with reproducible steps, if you want to ask questions + or share ideas, please [subscribe to our mailing list](mailto:dev-subscribe@dubbo.apache.org) and sent + emails to [our mailing list](mailto:dev@dubbo.apache.org), you can also head to our + [Discussion](https://github.com/apache/dubbo/discussions) tab. + + If you need to report a security issue, please visit [our security policy](https://github.com/apache/dubbo/security/policy). + + **Dubbo is open for world wide collaboration, please make sure that all the content you provide is in English.** + Remember that non-English issues is quite not friendly for everyone, and might unable to get the response! + +- type: checkboxes + attributes: + label: Search before asking + description: > + Please make sure to search in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) first to see + whether the same issue was reported already. + options: + - label: > + I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar + issues. + required: true + +- type: textarea + attributes: + label: Steps to reproduce this issue + description: > + Describe how to reproduce this issue.If you are not able to provide a reproducible case, + please open a [Discussion](https://github.com/apache/dubbo/discussions) instead. + placeholder: > + Please provide the context in which the problem occurred and explain what happened. + A [GitHub address] would be helpful for maintainers to reproduce the problem. + validations: + required: true + +- type: textarea + attributes: + label: What you expected to happen + description: What do you think went wrong? + placeholder: > + Please explain why you think the behaviour is erroneous. It is extremely helpful if you copy and paste + the fragment of logs showing the exact error messages or wrong behaviour and screenshots for + UI problems. You can include files by dragging and dropping them here. + + **NOTE**: please copy and paste texts instead of taking screenshots of them for easy future search. + validations: + required: true + +- type: textarea + attributes: + label: Anything else + description: Anything else we need to know? + placeholder: > + How often does this problem occur? (Once? Every time? Only when certain conditions are met?) + Any relevant logs to include? Put them here inside fenced + ``` ``` blocks or inside a collapsable details tag if it's too long: +
x.log lots of stuff
+ +- type: checkboxes + attributes: + label: Are you willing to submit a pull request to fix on your own? + description: > + This is absolutely not required, but we are happy to guide you in the contribution process + especially if you already have a good understanding of how to implement the fix. + Dubbo is a totally community-driven project and we love to bring new contributors in. + options: + - label: Yes I am willing to submit a pull request on my own! + +- type: checkboxes + attributes: + label: Code of Conduct + description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. + options: + - label: > + I agree to follow this project's + [Code of Conduct](https://www.apache.org/foundation/policies/conduct) + required: true + +- type: markdown + attributes: + value: "Thanks for completing our form!" diff --git a/.github/ISSUE_TEMPLATE/2-feature.md b/.github/ISSUE_TEMPLATE/2-feature.md new file mode 100644 index 0000000000..20c9bf7ebd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature.md @@ -0,0 +1,82 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +name: Feature Request +description: Create a Feature Request for Dubbo +title: "[Feature] " +labels: ["status/need-triage"] +projects: ["apache/337"] +body: +- type: markdown + attributes: + value: | + Dubbo logo + + Thank you for finding the time to propose new feature! + + We really appreciate the community efforts to improve Dubbo. + + **Dubbo is open for world wide collaboration, please make sure that all the content you provide is in English.** + Remember that non-English issues is quite not friendly for everyone, and might unable to get the response! + +- type: checkboxes + attributes: + label: Search before asking + description: > + Please make sure to search in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) first to see + whether the same feature was requested already. + options: + - label: > + I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar + feature requirement. + required: true + +- type: textarea + attributes: + label: Descriptions + description: A short description of your feature + validations: + required: true + +- type: textarea + attributes: + label: Related issues + description: Is there currently another issue associated with this? + +- type: checkboxes + attributes: + label: Are you willing to submit a pull request to fix on your own? + description: > + This is absolutely not required, but we are happy to guide you in the contribution process + especially if you already have a good understanding of how to implement the feature. + Dubbo is a totally community-driven project and we love to bring new contributors in. + options: + - label: Yes I am willing to submit a pull request on my own! + +- type: checkboxes + attributes: + label: Code of Conduct + description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. + options: + - label: > + I agree to follow this project's + [Code of Conduct](https://www.apache.org/foundation/policies/conduct) + required: true + +- type: markdown + attributes: + value: "Thanks for completing our form!" diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index d5eade3841..0000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -name: Bug Report -about: Report a bug in Dubbo -title: '' -labels: status/need-triage -assignees: '' - ---- - - -- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. - -### Environment - -* Dubbo version: xxx -* Operating System version: xxx -* Java version: xxx - -### Steps to reproduce this issue - -1. xxx -2. xxx -3. xxx - -Pls. provide [GitHub address] to reproduce this issue. - -### Expected Behavior - - - -### Actual Behavior - - - -If there is an exception, please attach the exception trace: - -``` -Just put your stack trace here! -``` diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0602b36b44..b4e5b9e035 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,22 @@ -blank_issues_enabled: true +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +blank_issues_enabled: false contact_links: - - name: Dubbo Community Repo - url: https://github.com/apache/dubbo-website - about: Please see our community docs here. - - name: Report a security issue - url: https://github.com/apache/dubbo/security/policy - about: Please report security vulnerabilities using these instructions. + - name: Question & FAQ & Proposal + url: https://github.com/apache/dubbo/discussions/ + about: Ask a question, request support or submit a proposal for Apache Dubbo. diff --git a/.github/ISSUE_TEMPLATE/discussion.md b/.github/ISSUE_TEMPLATE/discussion.md deleted file mode 100644 index dd9c3d8109..0000000000 --- a/.github/ISSUE_TEMPLATE/discussion.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -name: Discussion -about: Start a discussion for Dubbo -title: '' -labels: type/discussion -assignees: '' ---- - - - - diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 7a849f66b3..0000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: Feature Request -about: Create a Feature Request for Dubbo -title: '' -labels: type/feature -assignees: '' - ---- - - -- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. -- [ ] I have searched the [release notes](https://github.com/apache/dubbo/releases) of this repository and believe that this is not a duplicate. - -## Describe the feature - - diff --git a/.github/ISSUE_TEMPLATE/proposal.md b/.github/ISSUE_TEMPLATE/proposal.md deleted file mode 100644 index ffde91a9df..0000000000 --- a/.github/ISSUE_TEMPLATE/proposal.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -name: Proposal -about: Create a technical proposal for Dubbo -title: '' -labels: type/proposal -assignees: '' - ---- - - -- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. - -## Describe the proposal - - diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 86c4d8444a..0000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Question -about: Ask a question about Dubbo -title: '' -labels: type/question -assignees: '' - ---- - - -- [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate. - -## Ask your question here From 22f7a214579b506ca0cc3a24467d42db3bd83a78 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Mon, 4 Mar 2024 17:27:03 +0800 Subject: [PATCH 28/34] Update issue template format --- .github/ISSUE_TEMPLATE/{1-bug.md => 1-bug.yml} | 0 .github/ISSUE_TEMPLATE/{2-feature.md => 2-feature.yml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{1-bug.md => 1-bug.yml} (100%) rename .github/ISSUE_TEMPLATE/{2-feature.md => 2-feature.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/1-bug.md b/.github/ISSUE_TEMPLATE/1-bug.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/1-bug.md rename to .github/ISSUE_TEMPLATE/1-bug.yml diff --git a/.github/ISSUE_TEMPLATE/2-feature.md b/.github/ISSUE_TEMPLATE/2-feature.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/2-feature.md rename to .github/ISSUE_TEMPLATE/2-feature.yml From c41cdbb3bc99eb4c243f96731dec3baf89b84755 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Mon, 4 Mar 2024 17:28:48 +0800 Subject: [PATCH 29/34] Update issue template format --- .github/ISSUE_TEMPLATE/1-bug.yml | 42 ++++++++++++++-------------- .github/ISSUE_TEMPLATE/2-feature.yml | 20 ++++++------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml index 418da0bd1e..7f4d33788b 100644 --- a/.github/ISSUE_TEMPLATE/1-bug.yml +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -24,7 +24,7 @@ body: - type: markdown attributes: value: | - Dubbo logo + Dubbo logo Thank you for finding the time to report the problem! We really appreciate the community efforts to improve Dubbo. @@ -42,23 +42,23 @@ body: attributes: label: Search before asking description: > - Please make sure to search in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) first to see - whether the same issue was reported already. + Please make sure to search in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) first to see + whether the same issue was reported already. options: - label: > - I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar - issues. + I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar + issues. required: true - type: textarea attributes: label: Steps to reproduce this issue description: > - Describe how to reproduce this issue.If you are not able to provide a reproducible case, - please open a [Discussion](https://github.com/apache/dubbo/discussions) instead. + Describe how to reproduce this issue.If you are not able to provide a reproducible case, + please open a [Discussion](https://github.com/apache/dubbo/discussions) instead. placeholder: > - Please provide the context in which the problem occurred and explain what happened. - A [GitHub address] would be helpful for maintainers to reproduce the problem. + Please provide the context in which the problem occurred and explain what happened. + A [GitHub address] would be helpful for maintainers to reproduce the problem. validations: required: true @@ -67,9 +67,9 @@ body: label: What you expected to happen description: What do you think went wrong? placeholder: > - Please explain why you think the behaviour is erroneous. It is extremely helpful if you copy and paste - the fragment of logs showing the exact error messages or wrong behaviour and screenshots for - UI problems. You can include files by dragging and dropping them here. + Please explain why you think the behaviour is erroneous. It is extremely helpful if you copy and paste + the fragment of logs showing the exact error messages or wrong behaviour and screenshots for + UI problems. You can include files by dragging and dropping them here. **NOTE**: please copy and paste texts instead of taking screenshots of them for easy future search. validations: @@ -80,18 +80,18 @@ body: label: Anything else description: Anything else we need to know? placeholder: > - How often does this problem occur? (Once? Every time? Only when certain conditions are met?) - Any relevant logs to include? Put them here inside fenced - ``` ``` blocks or inside a collapsable details tag if it's too long: -
x.log lots of stuff
+ How often does this problem occur? (Once? Every time? Only when certain conditions are met?) + Any relevant logs to include? Put them here inside fenced + ``` ``` blocks or inside a collapsable details tag if it's too long: +
x.log lots of stuff
- type: checkboxes attributes: label: Are you willing to submit a pull request to fix on your own? description: > - This is absolutely not required, but we are happy to guide you in the contribution process - especially if you already have a good understanding of how to implement the fix. - Dubbo is a totally community-driven project and we love to bring new contributors in. + This is absolutely not required, but we are happy to guide you in the contribution process + especially if you already have a good understanding of how to implement the fix. + Dubbo is a totally community-driven project and we love to bring new contributors in. options: - label: Yes I am willing to submit a pull request on my own! @@ -101,8 +101,8 @@ body: description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. options: - label: > - I agree to follow this project's - [Code of Conduct](https://www.apache.org/foundation/policies/conduct) + I agree to follow this project's + [Code of Conduct](https://www.apache.org/foundation/policies/conduct) required: true - type: markdown diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml index 20c9bf7ebd..9feddf22b6 100644 --- a/.github/ISSUE_TEMPLATE/2-feature.yml +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -24,7 +24,7 @@ body: - type: markdown attributes: value: | - Dubbo logo + Dubbo logo Thank you for finding the time to propose new feature! @@ -37,12 +37,12 @@ body: attributes: label: Search before asking description: > - Please make sure to search in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) first to see - whether the same feature was requested already. + Please make sure to search in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) first to see + whether the same feature was requested already. options: - label: > - I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar - feature requirement. + I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar + feature requirement. required: true - type: textarea @@ -61,9 +61,9 @@ body: attributes: label: Are you willing to submit a pull request to fix on your own? description: > - This is absolutely not required, but we are happy to guide you in the contribution process - especially if you already have a good understanding of how to implement the feature. - Dubbo is a totally community-driven project and we love to bring new contributors in. + This is absolutely not required, but we are happy to guide you in the contribution process + especially if you already have a good understanding of how to implement the feature. + Dubbo is a totally community-driven project and we love to bring new contributors in. options: - label: Yes I am willing to submit a pull request on my own! @@ -73,8 +73,8 @@ body: description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. options: - label: > - I agree to follow this project's - [Code of Conduct](https://www.apache.org/foundation/policies/conduct) + I agree to follow this project's + [Code of Conduct](https://www.apache.org/foundation/policies/conduct) required: true - type: markdown From 503183c52695d41a69c582e6e0f32a028975647c Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Mon, 4 Mar 2024 17:32:39 +0800 Subject: [PATCH 30/34] Update issue template format --- .github/ISSUE_TEMPLATE/1-bug.yml | 62 ++++++++++++++-------------- .github/ISSUE_TEMPLATE/2-feature.yml | 48 ++++++++++----------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml index 7f4d33788b..ede92feb8b 100644 --- a/.github/ISSUE_TEMPLATE/1-bug.yml +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -23,7 +23,7 @@ projects: ["apache/337"] body: - type: markdown attributes: - value: | + value: | Dubbo logo Thank you for finding the time to report the problem! We really appreciate the community efforts to improve Dubbo. @@ -40,46 +40,46 @@ body: - type: checkboxes attributes: - label: Search before asking - description: > + label: Search before asking + description: > Please make sure to search in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) first to see whether the same issue was reported already. - options: - - label: > - I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar - issues. - required: true + options: + - label: > + I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar + issues. + required: true - type: textarea attributes: - label: Steps to reproduce this issue - description: > + label: Steps to reproduce this issue + description: > Describe how to reproduce this issue.If you are not able to provide a reproducible case, please open a [Discussion](https://github.com/apache/dubbo/discussions) instead. - placeholder: > + placeholder: > Please provide the context in which the problem occurred and explain what happened. A [GitHub address] would be helpful for maintainers to reproduce the problem. validations: - required: true + required: true - type: textarea attributes: - label: What you expected to happen - description: What do you think went wrong? - placeholder: > + label: What you expected to happen + description: What do you think went wrong? + placeholder: > Please explain why you think the behaviour is erroneous. It is extremely helpful if you copy and paste the fragment of logs showing the exact error messages or wrong behaviour and screenshots for UI problems. You can include files by dragging and dropping them here. **NOTE**: please copy and paste texts instead of taking screenshots of them for easy future search. validations: - required: true + required: true - type: textarea attributes: - label: Anything else - description: Anything else we need to know? - placeholder: > + label: Anything else + description: Anything else we need to know? + placeholder: > How often does this problem occur? (Once? Every time? Only when certain conditions are met?) Any relevant logs to include? Put them here inside fenced ``` ``` blocks or inside a collapsable details tag if it's too long: @@ -87,24 +87,24 @@ body: - type: checkboxes attributes: - label: Are you willing to submit a pull request to fix on your own? - description: > + label: Are you willing to submit a pull request to fix on your own? + description: > This is absolutely not required, but we are happy to guide you in the contribution process especially if you already have a good understanding of how to implement the fix. Dubbo is a totally community-driven project and we love to bring new contributors in. - options: - - label: Yes I am willing to submit a pull request on my own! + options: + - label: Yes I am willing to submit a pull request on my own! - type: checkboxes attributes: - label: Code of Conduct - description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. - options: - - label: > - I agree to follow this project's - [Code of Conduct](https://www.apache.org/foundation/policies/conduct) - required: true + label: Code of Conduct + description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. + options: + - label: > + I agree to follow this project's + [Code of Conduct](https://www.apache.org/foundation/policies/conduct) + required: true - type: markdown attributes: - value: "Thanks for completing our form!" + value: "Thanks for completing our form!" diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml index 9feddf22b6..1f678ab51e 100644 --- a/.github/ISSUE_TEMPLATE/2-feature.yml +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -23,7 +23,7 @@ projects: ["apache/337"] body: - type: markdown attributes: - value: | + value: | Dubbo logo Thank you for finding the time to propose new feature! @@ -35,48 +35,48 @@ body: - type: checkboxes attributes: - label: Search before asking - description: > + label: Search before asking + description: > Please make sure to search in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) first to see whether the same feature was requested already. - options: - - label: > - I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar - feature requirement. + options: + - label: > + I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar + feature requirement. required: true - type: textarea attributes: - label: Descriptions - description: A short description of your feature + label: Descriptions + description: A short description of your feature validations: - required: true + required: true - type: textarea attributes: - label: Related issues - description: Is there currently another issue associated with this? + label: Related issues + description: Is there currently another issue associated with this? - type: checkboxes attributes: - label: Are you willing to submit a pull request to fix on your own? - description: > + label: Are you willing to submit a pull request to fix on your own? + description: > This is absolutely not required, but we are happy to guide you in the contribution process especially if you already have a good understanding of how to implement the feature. Dubbo is a totally community-driven project and we love to bring new contributors in. - options: - - label: Yes I am willing to submit a pull request on my own! + options: + - label: Yes I am willing to submit a pull request on my own! - type: checkboxes attributes: - label: Code of Conduct - description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. - options: - - label: > - I agree to follow this project's - [Code of Conduct](https://www.apache.org/foundation/policies/conduct) - required: true + label: Code of Conduct + description: The Code of Conduct helps create a safe space for everyone. We require that everyone agrees to it. + options: + - label: > + I agree to follow this project's + [Code of Conduct](https://www.apache.org/foundation/policies/conduct) + required: true - type: markdown attributes: - value: "Thanks for completing our form!" + value: "Thanks for completing our form!" From 362f833243db0c351e6fba03820fbd47286f0d94 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Mon, 4 Mar 2024 17:33:41 +0800 Subject: [PATCH 31/34] Update issue template format(required) --- .github/ISSUE_TEMPLATE/2-feature.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml index 1f678ab51e..87331b4e2e 100644 --- a/.github/ISSUE_TEMPLATE/2-feature.yml +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -43,7 +43,7 @@ body: - label: > I had searched in the [issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no similar feature requirement. - required: true + required: true - type: textarea attributes: From 6251a4bbd41e95a23a688079a19aa34931642e30 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Mon, 4 Mar 2024 17:39:02 +0800 Subject: [PATCH 32/34] Add pre-check for issue template (#13823) --- .github/ISSUE_TEMPLATE/1-bug.yml | 9 +++++++-- .github/ISSUE_TEMPLATE/2-feature.yml | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml index ede92feb8b..7391050bd5 100644 --- a/.github/ISSUE_TEMPLATE/1-bug.yml +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -21,9 +21,10 @@ title: "[Bug] " labels: ["status/need-triage"] projects: ["apache/337"] body: -- type: markdown +- type: checkboxes attributes: - value: | + label: Pre-check + description: > Dubbo logo Thank you for finding the time to report the problem! We really appreciate the community efforts to improve Dubbo. @@ -37,6 +38,10 @@ body: **Dubbo is open for world wide collaboration, please make sure that all the content you provide is in English.** Remember that non-English issues is quite not friendly for everyone, and might unable to get the response! + options: + - label: > + I am sure that all the content I provide is in English. + required: true - type: checkboxes attributes: diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml index 87331b4e2e..627ec2d93e 100644 --- a/.github/ISSUE_TEMPLATE/2-feature.yml +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -21,9 +21,10 @@ title: "[Feature] " labels: ["status/need-triage"] projects: ["apache/337"] body: -- type: markdown +- type: checkboxes attributes: - value: | + label: Pre-check + description: > Dubbo logo Thank you for finding the time to propose new feature! @@ -32,6 +33,10 @@ body: **Dubbo is open for world wide collaboration, please make sure that all the content you provide is in English.** Remember that non-English issues is quite not friendly for everyone, and might unable to get the response! + options: + - label: > + I am sure that all the content I provide is in English. + required: true - type: checkboxes attributes: From 26cc9896f0e88fefbc180004758eb8ed573cb969 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Mon, 4 Mar 2024 17:50:57 +0800 Subject: [PATCH 33/34] Fix pre-check for issue template style (#13824) * Fix pre-check for issue template style * Add version --- .github/ISSUE_TEMPLATE/1-bug.yml | 17 ++++++++++++++--- .github/ISSUE_TEMPLATE/2-feature.yml | 9 ++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml index 7391050bd5..e7d06e48ec 100644 --- a/.github/ISSUE_TEMPLATE/1-bug.yml +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -21,10 +21,9 @@ title: "[Bug] " labels: ["status/need-triage"] projects: ["apache/337"] body: -- type: checkboxes +- type: markdown attributes: - label: Pre-check - description: > + value: | Dubbo logo Thank you for finding the time to report the problem! We really appreciate the community efforts to improve Dubbo. @@ -38,6 +37,10 @@ body: **Dubbo is open for world wide collaboration, please make sure that all the content you provide is in English.** Remember that non-English issues is quite not friendly for everyone, and might unable to get the response! + +- type: checkboxes + attributes: + label: Pre-check options: - label: > I am sure that all the content I provide is in English. @@ -55,6 +58,14 @@ body: issues. required: true +- type: input + attributes: + label: Dubbo Version + description: "Which Dubbo version, JDK version and operating system did you use?" + placeholder: "Example: Dubbo Java 3.2.12, OpenJDK 1.8, Ubuntu 20.04" + validations: + required: true + - type: textarea attributes: label: Steps to reproduce this issue diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml index 627ec2d93e..3c01789124 100644 --- a/.github/ISSUE_TEMPLATE/2-feature.yml +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -21,10 +21,9 @@ title: "[Feature] " labels: ["status/need-triage"] projects: ["apache/337"] body: -- type: checkboxes +- type: markdown attributes: - label: Pre-check - description: > + value: | Dubbo logo Thank you for finding the time to propose new feature! @@ -33,6 +32,10 @@ body: **Dubbo is open for world wide collaboration, please make sure that all the content you provide is in English.** Remember that non-English issues is quite not friendly for everyone, and might unable to get the response! + +- type: checkboxes + attributes: + label: Pre-check options: - label: > I am sure that all the content I provide is in English. From 8a1296f892a8acebf346914cd233becddd6418b1 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Mon, 4 Mar 2024 17:53:02 +0800 Subject: [PATCH 34/34] Fix feature template --- .github/ISSUE_TEMPLATE/2-feature.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/2-feature.yml b/.github/ISSUE_TEMPLATE/2-feature.yml index 3c01789124..501122efcd 100644 --- a/.github/ISSUE_TEMPLATE/2-feature.yml +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -23,7 +23,7 @@ projects: ["apache/337"] body: - type: markdown attributes: - value: | + value: | Dubbo logo Thank you for finding the time to propose new feature!