diff --git a/.artifacts b/.artifacts new file mode 100644 index 00000000000..27974610f1f --- /dev/null +++ b/.artifacts @@ -0,0 +1,117 @@ +# 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. +# + +# Please add new modules to the end of the list. + +dubbo +dubbo-auth +dubbo-apache-release +dubbo-all-shaded +dubbo-bom +dubbo-cluster +dubbo-common +dubbo-compatible +dubbo-compiler +dubbo-config +dubbo-config-api +dubbo-config-spring +dubbo-config-spring6 +dubbo-configcenter +dubbo-configcenter-file +dubbo-configcenter-apollo +dubbo-configcenter-nacos +dubbo-configcenter-zookeeper +dubbo-core-spi +dubbo-dependencies-all +dubbo-dependencies-bom +dubbo-filter-cache +dubbo-filter-validation +dubbo-kubernetes +dubbo-maven-plugin +dubbo-metadata +dubbo-metadata-api +dubbo-metadata-definition-protobuf +dubbo-metadata-processor +dubbo-metadata-report-nacos +dubbo-metadata-report-zookeeper +dubbo-metrics +dubbo-metrics-api +dubbo-metrics-default +dubbo-metrics-metadata +dubbo-metrics-prometheus +dubbo-metrics-registry +dubbo-metrics-config-center +dubbo-metrics-netty +dubbo-metrics-event +dubbo-native +dubbo-parent +dubbo-plugin +dubbo-qos +dubbo-qos-api +dubbo-reactive +dubbo-registry +dubbo-registry-api +dubbo-registry-multicast +dubbo-registry-multiple +dubbo-registry-nacos +dubbo-registry-zookeeper +dubbo-remoting +dubbo-remoting-api +dubbo-remoting-http12 +dubbo-remoting-http3 +dubbo-remoting-websocket +dubbo-remoting-netty +dubbo-remoting-netty4 +dubbo-remoting-zookeeper-curator5 +dubbo-rpc +dubbo-rpc-api +dubbo-rpc-dubbo +dubbo-rpc-injvm +dubbo-rpc-triple +dubbo-security +dubbo-serialization +dubbo-serialization-api +dubbo-serialization-fastjson2 +dubbo-serialization-hessian2 +dubbo-spring-boot +dubbo-spring-boot-actuator +dubbo-spring-boot-actuator-autoconfigure +dubbo-spring-boot-actuator-compatible +dubbo-spring-boot-autoconfigure +dubbo-spring-boot-3-autoconfigure +dubbo-spring-boot-autoconfigure-compatible +dubbo-spring-boot-actuator-autoconfigure-compatible +dubbo-spring-boot-compatible +dubbo-tracing-brave-zipkin-spring-boot-starter +dubbo-tracing-otel-zipkin-spring-boot-starter +dubbo-tracing-otel-otlp-spring-boot-starter +dubbo-observability-spring-boot-starter +dubbo-spring-boot-starter +dubbo-spring-boot-starters +dubbo-spring-boot-interceptor +dubbo-nacos-spring-boot-starter +dubbo-zookeeper-curator5-spring-boot-starter +dubbo-sentinel-spring-boot-starter +dubbo-seata-spring-boot-starter +dubbo-spring-security +dubbo-tracing +dubbo-xds +dubbo-plugin-loom +dubbo-rest-jaxrs +dubbo-rest-spring +dubbo-rest-openapi +dubbo-triple-servlet +dubbo-triple-websocket diff --git a/.asf.yaml b/.asf.yaml new file mode 100644 index 00000000000..4f41badc91d --- /dev/null +++ b/.asf.yaml @@ -0,0 +1,60 @@ +# +# +# 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. +# +# + +notifications: + commits: commits@dubbo.apache.org + issues: notifications@dubbo.apache.org + pullrequests: notifications@dubbo.apache.org + jira_options: link label link label + discussions: notifications@dubbo.apache.org + +github: + homepage: https://dubbo.apache.org/ + description: "The java implementation of Apache Dubbo. An RPC and microservice framework." + features: + # Enable wiki for documentation + wiki: true + # Enable issue management + issues: true + # Enable projects for project management boards + projects: true + # Enable GitHub Discussions for community discussions + discussions: true + protected_branches: + master: {} + 2.5.x: {} + 2.6.x: {} + 2.7.x: {} + 3.0: {} + 3.1: {} + 3.2: {} + 3.3: {} + 3.4: {} + labels: + - java + - rpc + - microservices + - framework + - restful + - distributed-systems + - dubbo + - service-mesh + - http + - grpc + - web diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..b9e9081f75a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,89 @@ +# 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. +# + +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +tab_width = 4 +max_line_length = 120 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.java] +ij_java_continuation_indent_size = 8 +ij_java_keep_control_statement_in_one_line = false +ij_java_for_brace_force = always +ij_java_if_brace_force = always +ij_java_keep_first_column_comment = false +ij_java_keep_line_breaks = false +ij_java_keep_simple_blocks_in_one_line = true +ij_java_keep_simple_classes_in_one_line = true +ij_java_keep_simple_lambdas_in_one_line = true +ij_java_keep_simple_methods_in_one_line = true +ij_java_keep_blank_lines_in_code = 1 +ij_java_keep_blank_lines_in_declarations = 1 +ij_java_blank_lines_after_class_header = 1 +ij_java_class_count_to_use_import_on_demand = 999 +ij_java_names_count_to_use_import_on_demand = 999 +ij_java_imports_layout = org.apache.dubbo.**, |, javax.**, |, java.**, |, *, |, $* +ij_java_insert_inner_class_imports = true +ij_java_space_before_array_initializer_left_brace = true +ij_java_method_parameters_new_line_after_left_paren = true +ij_java_wrap_comments = false +ij_java_wrap_long_lines = false +ij_java_enum_constants_wrap = split_into_lines +ij_java_method_call_chain_wrap = on_every_item +ij_java_method_parameters_wrap = on_every_item +ij_java_extends_list_wrap = normal +ij_java_extends_keyword_wrap = normal +ij_java_binary_operation_wrap = normal +ij_java_binary_operation_sign_on_next_line = true +ij_java_generate_final_locals = false +ij_java_generate_final_parameters = false + +[*.groovy] +max_line_length = 180 +ij_groovy_label_indent_size = 4 +ij_groovy_keep_blank_lines_in_code = 1 +ij_groovy_keep_blank_lines_in_declarations = 1 +ij_groovy_blank_lines_after_class_header = 1 +ij_groovy_class_count_to_use_import_on_demand = 999 +ij_groovy_names_count_to_use_import_on_demand = 999 +ij_groovy_imports_layout = org.apache.dubbo.**, |, javax.**, |, java.**, |, *, |, $* +ij_groovy_space_after_type_cast = false + +[*.json] +tab_width = 2 +indent_size = 2 + +[*.{yml,yaml}] +tab_width = 2 +indent_size = 2 + +[*.xml] +ij_xml_attribute_wrap = off +ij_xml_text_wrap = off +ij_xml_keep_blank_lines = 1 + +[pom.xml] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..c8c7a66c9b6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,20 @@ +# 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. +# + +# Auto detect text files and perform LF normalization +* text=auto + +*.java text eol=lf \ No newline at end of file diff --git a/.github/DISCUSSION_TEMPLATE/general.yml b/.github/DISCUSSION_TEMPLATE/general.yml new file mode 100644 index 00000000000..b61c1bf057d --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/general.yml @@ -0,0 +1,88 @@ +# +# 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. +# + +title: "[General][Java SDK (Component)] xxx" +body: +- type: markdown + attributes: + value: | + Dubbo logo + + Thank you for finding the time to share your idea! We really appreciate the community efforts to improve Dubbo. + + 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 idea 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. + required: true + +- type: dropdown + attributes: + label: Apache Dubbo Component + description: | + What Apache Dubbo component are you using? Apache Dubbo has many subprojects, please make sure + to choose the component that you want to ask questions about. + multiple: false + options: + - "Java SDK (apache/dubbo)" + - "Java Samples (apache/dubbo-samples)" + - "Java Integration Cases (apache/dubbo-integration-cases)" + - "Java SPI Extensions (apache/dubbo-spi-extensions)" + - "Java Benchmark (apache/dubbo-benchmark)" + - "Go SDK (apache/dubbo-go)" + - "Go Samples (apache/dubbo-go-samples)" + - "Rust SDK (apache/dubbo-rust)" + - "Node.js SDK (apache/dubbo-js)" + - "Python SDK (apache/dubbo-python)" + - "Kubernetes Integration (apache/dubbo-kubernetes)" + - "Pixiu Gateway (apache/dubbo-go-pixiu)" + - "Pixiu Gateway Samples (apache/dubbo-go-pixiu-samples)" + - "Admin (apache/dubbo-admin)" + - "Website (apache/dubbo-website)" + - "Awesome (apache/dubbo-awesome)" + - "Initializer (apache/dubbo-intializer)" + - "Others (apache/dubbo-xxx)" + validations: + required: true + +- type: textarea + attributes: + label: Details + description: Anything you want to ask? + validations: + required: true + +- 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/DISCUSSION_TEMPLATE/question.yml b/.github/DISCUSSION_TEMPLATE/question.yml new file mode 100644 index 00000000000..17aadb9ab95 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/question.yml @@ -0,0 +1,88 @@ +# +# 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. +# + +title: "[Q/A][Java SDK (Component)] xxx" +body: +- type: markdown + attributes: + value: | + Dubbo logo + + Thank you for finding the time to report the question! We really appreciate the community efforts to improve Dubbo. + + 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 question 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. + required: true + +- type: dropdown + attributes: + label: Apache Dubbo Component + description: | + What Apache Dubbo component are you using? Apache Dubbo has many subprojects, please make sure + to choose the component that you want to ask questions about. + multiple: false + options: + - "Java SDK (apache/dubbo)" + - "Java Samples (apache/dubbo-samples)" + - "Java Integration Cases (apache/dubbo-integration-cases)" + - "Java SPI Extensions (apache/dubbo-spi-extensions)" + - "Java Benchmark (apache/dubbo-benchmark)" + - "Go SDK (apache/dubbo-go)" + - "Go Samples (apache/dubbo-go-samples)" + - "Rust SDK (apache/dubbo-rust)" + - "Node.js SDK (apache/dubbo-js)" + - "Python SDK (apache/dubbo-python)" + - "Kubernetes Integration (apache/dubbo-kubernetes)" + - "Pixiu Gateway (apache/dubbo-go-pixiu)" + - "Pixiu Gateway Samples (apache/dubbo-go-pixiu-samples)" + - "Admin (apache/dubbo-admin)" + - "Website (apache/dubbo-website)" + - "Awesome (apache/dubbo-awesome)" + - "Initializer (apache/dubbo-intializer)" + - "Others (apache/dubbo-xxx)" + validations: + required: true + +- type: textarea + attributes: + label: Details + description: Anything you want to know? + validations: + required: true + +- 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/1-bug.yml b/.github/ISSUE_TEMPLATE/1-bug.yml new file mode 100644 index 00000000000..9f6cc59a1ec --- /dev/null +++ b/.github/ISSUE_TEMPLATE/1-bug.yml @@ -0,0 +1,143 @@ +# +# 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: ["type/need-triage", "component/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: Pre-check + options: + - label: > + I am sure that all the content I provide is in English. + required: true + +- 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: dropdown + attributes: + label: Apache Dubbo Component + description: | + What Apache Dubbo component are you using? Apache Dubbo has many subprojects, please make sure + to choose the component that you want to ask questions about. + multiple: false + options: + - "Java SDK (apache/dubbo)" + - "Java Samples (apache/dubbo-samples)" + - "Java Integration Cases (apache/dubbo-integration-cases)" + - "Java SPI Extensions (apache/dubbo-spi-extensions)" + - "Java Benchmark (apache/dubbo-benchmark)" + - "Python SDK (apache/dubbo-python)" + validations: + required: true + +- type: textarea + 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 + 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.yml b/.github/ISSUE_TEMPLATE/2-feature.yml new file mode 100644 index 00000000000..986c16dbe8b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2-feature.yml @@ -0,0 +1,107 @@ +# +# 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: ["type/need-triage", "component/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: Pre-check + options: + - label: > + I am sure that all the content I provide is in English. + required: true + +- 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: dropdown + attributes: + label: Apache Dubbo Component + description: | + What Apache Dubbo component are you using? Apache Dubbo has many subprojects, please make sure + to choose the component that you want to ask questions about. + multiple: false + options: + - "Java SDK (apache/dubbo)" + - "Java Samples (apache/dubbo-samples)" + - "Java Integration Cases (apache/dubbo-integration-cases)" + - "Java SPI Extensions (apache/dubbo-spi-extensions)" + - "Java Benchmark (apache/dubbo-benchmark)" + - "Python SDK (apache/dubbo-python)" + validations: + 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/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000000..b4e5b9e0352 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,22 @@ +# +# 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: 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/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..afcac9f890e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +## What is the purpose of the change? + + +## Checklist +- [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change. +- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. +- [x] Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project. +- [x] Make sure gitHub actions can pass. [Why the workflow is failing and how to fix it?](../CONTRIBUTING.md) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 00000000000..805733a69df --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,15 @@ +version: 2 +updates: + + - package-ecosystem: "maven" + directory: "/" + open-pull-requests-limit: 20 + # Ignore major version updates + ignore: + - dependency-name: "*" + update-types: ["version-update:semver-major"] + schedule: + interval: "weekly" + day: "monday" + time: "03:00" + timezone: "US/Eastern" diff --git a/.github/workflows/build-and-test-pr.yml b/.github/workflows/build-and-test-pr.yml new file mode 100644 index 00000000000..1bd5e2e9824 --- /dev/null +++ b/.github/workflows/build-and-test-pr.yml @@ -0,0 +1,699 @@ +name: "Build and Test For PR" + +on: [push, pull_request, workflow_dispatch] + +permissions: + contents: read + +env: + FORK_COUNT: 2 + FAIL_FAST: 0 + SHOW_ERROR_DETAIL: 1 + #multi-version size limit + VERSIONS_LIMIT: 4 + JACOCO_ENABLE: true + CANDIDATE_VERSIONS: ' + spring.version:5.3.24,6.1.5; + spring-boot.version:2.7.6,3.2.3; + ' + MAVEN_OPTS: >- + -XX:+UseG1GC + -XX:InitiatingHeapOccupancyPercent=45 + -XX:+UseStringDeduplication + -XX:-TieredCompilation + -XX:TieredStopAtLevel=1 + -Dmaven.javadoc.skip=true + -Dmaven.wagon.http.retryHandler.count=5 + -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + MAVEN_ARGS: >- + -e + --batch-mode + --no-snapshot-updates + --no-transfer-progress + --fail-fast + +jobs: + check-format: + name: "Check if code needs formatting" + runs-on: ubuntu-latest + steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Setup maven" + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: zulu + - name: "Check if code aligns with code style" + id: check + run: mvn --log-file mvn.log spotless:check + continue-on-error: true + - name: "Upload checkstyle result" + uses: actions/upload-artifact@v4 + with: + name: checkstyle-result + path: mvn.log + - name: "Generate Summary for successful run" + if: ${{ steps.check.outcome == 'success' }} + run: | + echo ":ballot_box_with_check: Kudos! No formatting issues found!" >> $GITHUB_STEP_SUMMARY + - name: "Generate Summary for failed run" + if: ${{ steps.check.outcome == 'failure' }} + run: | + echo "## :negative_squared_cross_mark: Formatting issues found!" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + cat mvn.log | grep "ERROR" | sed 's/Check if code needs formatting Check if code aligns with code style [0-9A-Z:.-]\+//' | sed 's/\[ERROR] //' | head -n -11 >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + echo "Please run \`mvn spotless:apply\` to fix the formatting issues." >> $GITHUB_STEP_SUMMARY + - name: "Fail if code needs formatting" + if: ${{ steps.check.outcome == 'failure' }} + uses: actions/github-script@v7.0.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + core.setFailed("Formatting issues found! \nRun \`mvn spotless:apply\` to fix.") + + license: + name: "Check License" + needs: check-format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: "Check License" + uses: apache/skywalking-eyes@e1a02359b239bd28de3f6d35fdc870250fa513d5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Set up JDK 21" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - name: "Compile Dubbo (Linux)" + run: | + ./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -Pskip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true + - name: "Check Dependencies' License" + uses: apache/skywalking-eyes/dependency@e1a02359b239bd28de3f6d35fdc870250fa513d5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + config: .licenserc.yaml + mode: check + + build-source: + name: "Build Dubbo" + needs: check-format + runs-on: ubuntu-latest + outputs: + version: ${{ steps.dubbo-version.outputs.version }} + steps: + - name: "Checkout code" + uses: actions/checkout@v4 + - name: "Set up JDK" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - name: "Set current date as env variable" + run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: "Restore local maven repository cache" + uses: actions/cache/restore@v4 + id: cache-maven-repository + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }} + - name: "Restore common local maven repository cache" + uses: actions/cache/restore@v4 + if: steps.cache-maven-repository.outputs.cache-hit != 'true' + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: "Clean dubbo cache" + run: rm -rf ~/.m2/repository/org/apache/dubbo + - name: "Build Dubbo with maven" + run: | + ./mvnw ${{ env.MAVEN_ARGS }} clean install -Psources,skip-spotless,checkstyle -Dmaven.test.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Save dubbo cache" + uses: actions/cache/save@v4 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + - name: "Clean dubbo cache" + run: rm -rf ~/.m2/repository/org/apache/dubbo + - name: "Save local maven repository cache" + uses: actions/cache/save@v4 + if: steps.cache-maven-repository.outputs.cache-hit != 'true' + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }} + - name: "Pack class result" + run: | + shopt -s globstar + zip ${{ github.workspace }}/class.zip **/target/classes/* -r + - name: "Upload class result" + uses: actions/upload-artifact@v4 + with: + name: "class-file" + path: ${{ github.workspace }}/class.zip + - name: "Pack checkstyle file if failure" + if: failure() + run: zip ${{ github.workspace }}/checkstyle.zip *checkstyle* -r + - name: "Upload checkstyle file if failure" + uses: actions/upload-artifact@v4 + if: failure() + with: + name: "checkstyle-file" + path: ${{ github.workspace }}/checkstyle.zip + - name: "Calculate Dubbo Version" + id: dubbo-version + run: | + REVISION=`awk '/[^<]+<\/revision>/{gsub(/|<\/revision>/,"",$1);print $1;exit;}' ./pom.xml` + echo "version=$REVISION" >> $GITHUB_OUTPUT + echo "dubbo version: $REVISION" + + unit-test-prepare: + name: "Preparation for Unit Test" + needs: check-format + runs-on: ubuntu-latest + strategy: + fail-fast: false + env: + ZOOKEEPER_VERSION: 3.7.2 + steps: + - name: "Cache zookeeper binary archive" + uses: actions/cache@v3 + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + - name: "Set up msys2 if necessary" + uses: msys2/setup-msys2@v2 + if: ${{ startsWith( matrix.os, 'windows') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + with: + release: false # support cache, see https://github.com/msys2/setup-msys2#context + - name: "Download zookeeper binary archive in Linux OS" + run: | + mkdir -p ${{ github.workspace }}/.tmp/zookeeper + wget -t 1 -T 120 -c https://archive.apache.org/dist/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c https://apache.website-solution.net/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + echo "list the downloaded zookeeper binary archive" + ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + + unit-test: + needs: [check-format, unit-test-prepare] + name: "Unit Test On ubuntu-latest" + runs-on: ubuntu-latest + strategy: + fail-fast: false + env: + DISABLE_FILE_SYSTEM_TEST: true + CURRENT_ROLE: ${{ matrix.case-role }} + ZOOKEEPER_VERSION: 3.7.2 + steps: + - name: "Checkout code" + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: "Set up JDK 21" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - name: "Set current date as env variable" + run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: "Cache local maven repository" + uses: actions/cache/restore@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Cache zookeeper binary archive" + uses: actions/cache@v3 + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}- + - name: "Test with maven" + timeout-minutes: 90 + run: | + set -o pipefail + ./mvnw ${{ env.MAVEN_ARGS }} clean test verify -Pjacoco,jdk15ge-simple,'!jdk15ge-add-open',skip-spotless -DtrimStackTrace=false -Dmaven.test.skip=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper 2>&1 | tee >(grep -n -B 1 -A 200 "FAILURE! -- in" > test_errors.log) + - name: "Print test error log" + if: failure() + run: cat test_errors.log + - name: "Upload coverage to Codecov" + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + flags: unit-tests + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + - name: "Upload surefire reports" + uses: actions/upload-artifact@v4 + with: + name: surefire-reports + path: "**/target/surefire-reports/**" + + samples-test-prepare: + needs: check-format + runs-on: ubuntu-latest + env: + JOB_COUNT: 3 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Prepare test list" + run: bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: samples-test-list + path: test/jobs + samples-test-job: + needs: [check-format, build-source, samples-test-prepare] + name: "Samples Test on ubuntu-latest (JobId: ${{matrix.job_id}} Java: ${{matrix.java}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.java}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + java: [ 8, 17 ] + job_id: [1,2,3] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Set current date as env variable" + run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: "Restore local maven repository cache" + uses: actions/cache/restore@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache/restore@v4 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: samples-test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.java}}" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: ${{matrix.java}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "merge jacoco result" + run: cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoMerge" -Dexec.args="${{github.workspace}}" + - name: "Upload jacoco" + uses: actions/upload-artifact@v4 + with: + name: samples-jacoco-result-${{matrix.job_id}}-java${{matrix.java}} + path: target/jacoco*.exec + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: samples-test-result-${{matrix.job_id}}-java${{matrix.java}} + path: test/jobs/*-result* + - name: "Upload test logs" + if: always() + uses: actions/upload-artifact@v4 + with: + name: samples-test-logs-${{matrix.job_id}}-java${{matrix.java}} + path: test/logs/* + samples-test-result: + needs: [check-format, samples-test-job] + name: "Samples Test Result on ubuntu-latest (JobId: ${{matrix.job_id}} Java: ${{matrix.java}})" + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.java}} + strategy: + matrix: + java: [ 8, 17 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: samples-test-result-*-java${{matrix.java}} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + integration-test-prepare: + needs: check-format + runs-on: ubuntu-latest + env: + JOB_COUNT: 3 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Prepare test list" + run: bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: test-list + path: test/jobs + integration-test-job: + needs: [check-format, build-source, integration-test-prepare] + name: "Integration Test on ubuntu-latest (JobId: ${{matrix.job_id}} Java: ${{matrix.java}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.java}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + java: [ 8, 17 ] + job_id: [1,2,3] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Set current date as env variable" + run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: "Restore local maven repository cache" + uses: actions/cache/restore@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache/restore@v4 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.java}}" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: ${{matrix.java}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "merge jacoco result" + run: cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoMerge" -Dexec.args="${{github.workspace}}" + - name: "Upload jacoco" + uses: actions/upload-artifact@v4 + with: + name: jacoco-result-${{matrix.job_id}}-java${{matrix.java}} + path: target/jacoco*.exec + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-result-${{matrix.job_id}}-java${{matrix.java}} + path: test/jobs/*-result* + - name: "Upload test logs" + if: always() + uses: actions/upload-artifact@v4 + with: + name: integration-test-logs-${{matrix.job_id}}-java${{matrix.java}} + path: test/logs/* + integration-test-result: + name: "Integration Test Result on ubuntu-latest (JobId: ${{matrix.job_id}} Java: ${{matrix.java}})" + needs: [check-format, integration-test-job] + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.java}} + strategy: + matrix: + java: [ 8, 17 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: test-result-*-java${{matrix.java}} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + samples-jacoco-result-merge: + name: "Samples Jacoco Result on ubuntu-latest (JobId: ${{matrix.job_id}} Java: ${{matrix.java}})" + runs-on: ubuntu-latest + needs: [check-format, samples-test-result] + strategy: + matrix: + java: [ 8, 17 ] + steps: + - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + path: "./dubbo-samples" + - name: "Set up JDK 21" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - name: "Restore class result" + uses: actions/download-artifact@v4 + with: + name: "class-file" + github-token: ${{ secrets.GITHUB_TOKEN }} + path: ${{ github.workspace }} + - name: "Unpack class result" + run: | + unzip -o ${{ github.workspace }}/class.zip + - name: "Restore samples jacoco exec" + uses: actions/download-artifact@v4 + with: + pattern: samples-jacoco-result-*-java${{matrix.java}} + github-token: ${{ secrets.GITHUB_TOKEN }} + path: dubbo-samples/target/ + merge-multiple: true + - name: "Merge samples jacoco result" + run: | + cd ${{ github.workspace }}/dubbo-samples/test/dubbo-test-jacoco-merger + mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-samples ${{github.workspace}}" + - name: "Remove old test result" + run: | + rm -rf ${{ github.workspace }}/dubbo-samples + - name: "Upload coverage to Codecov" + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: samples-tests-java${{matrix.java}} + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + integration-jacoco-result-merge: + name: "Integration Jacoco Result on ubuntu-latest (JobId: ${{matrix.job_id}} Java: ${{matrix.java}})" + runs-on: ubuntu-latest + needs: [check-format, integration-test-result, samples-test-result] + strategy: + matrix: + java: [ 8, 17 ] + steps: + - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + path: "./dubbo-integration-cases" + - name: "Set up JDK 21" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - name: "Restore class result" + uses: actions/download-artifact@v4 + with: + name: "class-file" + github-token: ${{ secrets.GITHUB_TOKEN }} + path: ${{ github.workspace }} + - name: "Unpack class result" + run: | + unzip -o ${{ github.workspace }}/class.zip + - name: "Restore integration test jacoco exec" + uses: actions/download-artifact@v4 + with: + pattern: jacoco-result-*-java${{matrix.java}} + github-token: ${{ secrets.GITHUB_TOKEN }} + path: dubbo-integration-cases/target/ + merge-multiple: true + - name: "Merge integration test jacoco result" + run: | + cd ${{ github.workspace }}/dubbo-integration-cases/test/dubbo-test-jacoco-merger + mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoReport" -Dexec.args="${{github.workspace}}/dubbo-integration-cases ${{github.workspace}}" + - name: "Remove old test result" + run: | + rm -rf ${{ github.workspace }}/dubbo-integration-cases + - name: "Upload coverage to Codecov" + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: integration-tests-java${{matrix.java}} + verbose: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + + + error-code-inspecting: + needs: check-format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: "./dubbo" + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-test-tools' + ref: main + path: "./dubbo-test-tools" + - name: "Set up JDK 21" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - name: "Restore local maven repository cache" + uses: actions/cache/restore@v4 + id: cache-maven-repository + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true + - name: "Run Error Code Inspecting" + env: + DUBBO_ECI_REPORT_AS_ERROR: true + run: | + cd ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector + ../mvnw ${{ env.MAVEN_ARGS }} -T 2C package exec:java -Ddubbo.eci.report-as-error=${DUBBO_ECI_REPORT_AS_ERROR} -Dmaven.test.skip=true -Ddubbo.eci.path=${{ github.workspace }}/dubbo + - name: "Upload error code inspection result" + # always() should not be used here, since we don't need to handle the 'canceled' situation. + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v4 + with: + name: "error-inspection-result" + path: ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt + + native-image-inspecting: + needs: check-format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: "./dubbo" + - name: "Set up GraalVM environment" + uses: graalvm/setup-graalvm@v1 + with: + version: '22.3.0' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} + native-image-job-reports: 'true' + - name: "Set up Zookeeper environment" + run: | + wget -t 1 -T 120 https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz + tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz + mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg apache-zookeeper-3.8.4-bin/conf/zoo.cfg + apache-zookeeper-3.8.4-bin/bin/zkServer.sh start + - name: "Check environment" + run: | + java --version + native-image --version + - name: "Set current date as env variable" + run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: "Restore local Maven repository cache" + uses: actions/cache/restore@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true + - name: "Checkout dubbo-samples repository" + uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + path: "./dubbo-samples" + - name: "Compile and run Dubbo native image demo" + run: | + MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true" + cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider + $MVNW clean package -P native native:compile + nohup ./target/dubbo-samples-native-image-provider & + sleep 10 + curl \ + --header "Content-Type: application/json" \ + --data '{"name":"Dubbo"}' \ + http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/ + diff --git a/.github/workflows/build-and-test-scheduled-3.1.yml b/.github/workflows/build-and-test-scheduled-3.1.yml new file mode 100644 index 00000000000..d53f36a7db3 --- /dev/null +++ b/.github/workflows/build-and-test-scheduled-3.1.yml @@ -0,0 +1,516 @@ +name: Build and Test Scheduled On 3.1 + +on: + schedule: + - cron: '0 0/6 * * *' + workflow_dispatch: + +permissions: + contents: read + +env: + FORK_COUNT: 2 + FAIL_FAST: 0 + SHOW_ERROR_DETAIL: 1 + #multi-version size limit + VERSIONS_LIMIT: 4 + ALL_REMOTE_VERSION: true + CANDIDATE_VERSIONS: ' + spring.version:5.3.24; + spring-boot.version:2.7.6; + ' + +jobs: + license: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "3.1" + - name: Check License + uses: apache/skywalking-eyes@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build-source: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.dubbo-version.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + ref: "3.1" + path: dubbo + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 8 + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + - name: "Build Dubbo with Maven" + run: | + cd ./dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean source:jar install -Pjacoco,checkstyle -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -Dmaven.test.skip=true -Dmaven.test.skip.exec=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Pack checkstyle file if failure" + if: failure() + run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r + - name: "Upload checkstyle file if failure" + if: failure() + uses: actions/upload-artifact@v4 + with: + name: "checkstyle-file" + path: ${{ github.workspace }}/checkstyle.zip + - name: "Calculate Dubbo Version" + id: dubbo-version + run: | + REVISION=`awk '/[^<]+<\/revision>/{gsub(/|<\/revision>/,"",$1);print $1;exit;}' ./dubbo/pom.xml` + echo "version=$REVISION" >> $GITHUB_OUTPUT + echo "dubbo version: $REVISION" + + unit-test-prepare: + name: " Preparation for Unit Test On ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + env: + ZOOKEEPER_VERSION: 3.7.2 + steps: + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + - name: "Set up msys2 if necessary" + if: ${{ startsWith( matrix.os, 'windows') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + uses: msys2/setup-msys2@v2 + with: + release: false # support cache, see https://github.com/msys2/setup-msys2#context + - name: "Download zookeeper binary archive in Linux OS" + if: ${{ startsWith( matrix.os, 'ubuntu') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + run: | + mkdir -p ${{ github.workspace }}/.tmp/zookeeper + wget -t 1 -T 120 -c https://archive.apache.org/dist/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c https://apache.website-solution.net/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + echo "list the downloaded zookeeper binary archive" + ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + - name: "Download zookeeper binary archive in Windows OS" + if: ${{ startsWith( matrix.os, 'windows') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + shell: msys2 {0} + run: | + mkdir -p ${{ github.workspace }}/.tmp/zookeeper + wget -t 1 -T 120 -c https://archive.apache.org/dist/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c https://apache.website-solution.net/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + echo "list the downloaded zookeeper binary archive" + ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + + unit-test: + needs: [build-source, unit-test-prepare] + name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }})" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + jdk: [ 8, 11, 17, 21 ] + env: + DISABLE_FILE_SYSTEM_TEST: true + steps: + - uses: actions/checkout@v4 + with: + ref: "3.1" + - name: "Set up JDK ${{ matrix.jdk }}" + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.jdk }} + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}- + - name: "Test with Maven with Integration Tests" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + + unit-test-fastjson2: + needs: [build-source, unit-test-prepare] + name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }}, Serialization: fastjson2)" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + jdk: [ 8, 11, 17, 21 ] + env: + DISABLE_FILE_SYSTEM_TEST: true + DUBBO_DEFAULT_SERIALIZATION: fastjson2 + MAVEN_SUREFIRE_ADD_OPENS: true + steps: + - uses: actions/checkout@v4 + - name: "Set up JDK ${{ matrix.jdk }}" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: ${{ matrix.jdk }} + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}- + - name: "Test with Maven with Integration Tests on JDK 8" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') && matrix.jdk == '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco,'!jdk15ge' -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests on JDK 8" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') && matrix.jdk == '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -P"jacoco,'!jdk15ge'" -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + - name: "Test with Maven with Integration Tests" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') && matrix.jdk != '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco,'!jdk15ge' -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') && matrix.jdk != '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -P"jacoco,'!jdk15ge'" -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + + samples-test-prepare: + runs-on: ubuntu-latest + env: + JOB_COUNT: 5 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Prepare test list" + run: | + bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: samples-test-list + path: test/jobs + samples-test-job: + needs: [build-source, samples-test-prepare] + name: "Samples Test on ubuntu-latest (JobId: ${{matrix.job_id}} JavaVer: ${{matrix.jdk}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.jdk}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + jdk: [ 8, 11 ] + job_id: [1, 2, 3, 4, 5] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Cache local Maven repository" + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: samples-test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.jdk}}" + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.jdk}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: | + cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "Upload test logs" + if: always() + uses: actions/upload-artifact@v4 + with: + name: samples-test-logs-${{matrix.jdk}}-${{matrix.job_id}} + path: test/logs/* + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: samples-test-result-${{matrix.jdk}}-${{matrix.job_id}} + path: test/jobs/*-result* + samples-test-result: + needs: [samples-test-job] + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.jdk}} + strategy: + matrix: + jdk: [ 8, 11 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: samples-test-result-${{matrix.jdk}}-* + github-token: ${{ secrets.GITHUB_TOKEN }} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + integration-test-prepare: + runs-on: ubuntu-latest + env: + JOB_COUNT: 5 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Prepare test list" + run: | + bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: integration-test-list + path: test/jobs + integration-test-job: + needs: [build-source, integration-test-prepare] + name: "Integration Test on ubuntu-latest (JobId: ${{matrix.job_id}} JavaVer: ${{matrix.jdk}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.jdk}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + jdk: [ 8, 11 ] + job_id: [1, 2, 3, 4, 5] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Cache local Maven repository" + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: integration-test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.jdk}}" + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.jdk}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: | + cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "Upload test logs" + if: always() + uses: actions/upload-artifact@v4 + with: + name: integration-test-logs-${{matrix.jdk}}-${{matrix.job_id}} + path: test/logs/* + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: integration-test-result-${{matrix.jdk}}-${{matrix.job_id}} + path: test/jobs/*-result* + integration-test-result: + needs: [integration-test-job] + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.jdk}} + strategy: + matrix: + jdk: [ 8, 11 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: integration-test-result-${{matrix.jdk}}-* + github-token: ${{ secrets.GITHUB_TOKEN }} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + error-code-inspecting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "3.1" + path: "./dubbo" + + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-test-tools' + ref: main + path: "./dubbo-test-tools" + + - name: "Set up JDK 21" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true + - name: "Run Error Code Inspecting" + env: + DUBBO_ECI_REPORT_AS_ERROR: true + run: | + cd ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector + ../mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C package exec:java -Ddubbo.eci.report-as-error=${DUBBO_ECI_REPORT_AS_ERROR} -Dmaven.test.skip=true -Dmaven.test.skip.exec=true -Ddubbo.eci.path=${{ github.workspace }}/dubbo + + - name: "Upload error code inspection result" + # always() should not be used here, since we don't need to handle the 'canceled' situation. + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v4 + with: + name: "error-inspection-result" + path: ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt + + native-image-inspecting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "3.1" + path: "./dubbo" + + - name: "Setup GraalVM environment" + uses: graalvm/setup-graalvm@v1 + with: + version: '22.3.0' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} + native-image-job-reports: 'true' + + - name: "Setup Zookeeper environment" + run: | + wget -t 1 -T 120 https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz + tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz + mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg apache-zookeeper-3.8.4-bin/conf/zoo.cfg + apache-zookeeper-3.8.4-bin/bin/zkServer.sh start + + - name: "Check environment" + run: | + java --version + native-image --version + + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true + + - name: "Compile and run Dubbo demo for native (Linux)" + run: | + cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider + ${{ github.workspace }}/dubbo/mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean package -P native -Dmaven.test.skip=true native:compile + nohup ./target/dubbo-demo-native-provider & + cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer + ${{ github.workspace }}/dubbo/mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean package -P native -Dmaven.test.skip=true native:compile + ./target/dubbo-demo-native-consumer diff --git a/.github/workflows/build-and-test-scheduled-3.2.yml b/.github/workflows/build-and-test-scheduled-3.2.yml new file mode 100644 index 00000000000..72d67ef65a1 --- /dev/null +++ b/.github/workflows/build-and-test-scheduled-3.2.yml @@ -0,0 +1,516 @@ +name: Build and Test Scheduled On 3.2 + +on: + schedule: + - cron: '0 0/6 * * *' + workflow_dispatch: + +permissions: + contents: read + +env: + FORK_COUNT: 2 + FAIL_FAST: 0 + SHOW_ERROR_DETAIL: 1 + #multi-version size limit + VERSIONS_LIMIT: 4 + ALL_REMOTE_VERSION: true + CANDIDATE_VERSIONS: ' + spring.version:5.3.24; + spring-boot.version:2.7.6; + ' + +jobs: + license: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "3.2" + - name: Check License + uses: apache/skywalking-eyes@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build-source: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.dubbo-version.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + ref: "3.2" + path: dubbo + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 8 + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + - name: "Build Dubbo with Maven" + run: | + cd ./dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean source:jar install -Pjacoco,checkstyle -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -Dmaven.test.skip=true -Dmaven.test.skip.exec=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Pack checkstyle file if failure" + if: failure() + run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r + - name: "Upload checkstyle file if failure" + if: failure() + uses: actions/upload-artifact@v4 + with: + name: "checkstyle-file" + path: ${{ github.workspace }}/checkstyle.zip + - name: "Calculate Dubbo Version" + id: dubbo-version + run: | + REVISION=`awk '/[^<]+<\/revision>/{gsub(/|<\/revision>/,"",$1);print $1;exit;}' ./dubbo/pom.xml` + echo "version=$REVISION" >> $GITHUB_OUTPUT + echo "dubbo version: $REVISION" + + unit-test-prepare: + name: " Preparation for Unit Test On ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + env: + ZOOKEEPER_VERSION: 3.7.2 + steps: + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + - name: "Set up msys2 if necessary" + if: ${{ startsWith( matrix.os, 'windows') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + uses: msys2/setup-msys2@v2 + with: + release: false # support cache, see https://github.com/msys2/setup-msys2#context + - name: "Download zookeeper binary archive in Linux OS" + if: ${{ startsWith( matrix.os, 'ubuntu') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + run: | + mkdir -p ${{ github.workspace }}/.tmp/zookeeper + wget -t 1 -T 120 -c https://archive.apache.org/dist/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c https://apache.website-solution.net/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + echo "list the downloaded zookeeper binary archive" + ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + - name: "Download zookeeper binary archive in Windows OS" + if: ${{ startsWith( matrix.os, 'windows') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + shell: msys2 {0} + run: | + mkdir -p ${{ github.workspace }}/.tmp/zookeeper + wget -t 1 -T 120 -c https://archive.apache.org/dist/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c https://apache.website-solution.net/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + echo "list the downloaded zookeeper binary archive" + ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + + unit-test: + needs: [build-source, unit-test-prepare] + name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }})" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + jdk: [ 8, 11, 17, 21 ] + env: + DISABLE_FILE_SYSTEM_TEST: true + steps: + - uses: actions/checkout@v4 + with: + ref: "3.2" + - name: "Set up JDK ${{ matrix.jdk }}" + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.jdk }} + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}- + - name: "Test with Maven with Integration Tests" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + + unit-test-fastjson2: + needs: [build-source, unit-test-prepare] + name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }}, Serialization: fastjson2)" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + jdk: [ 8, 11, 17, 21 ] + env: + DISABLE_FILE_SYSTEM_TEST: true + DUBBO_DEFAULT_SERIALIZATION: fastjson2 + MAVEN_SUREFIRE_ADD_OPENS: true + steps: + - uses: actions/checkout@v4 + - name: "Set up JDK ${{ matrix.jdk }}" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: ${{ matrix.jdk }} + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}- + - name: "Test with Maven with Integration Tests on JDK 8" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') && matrix.jdk == '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco,'!jdk15ge-add-open' -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests on JDK 8" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') && matrix.jdk == '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -P"jacoco,'!jdk15ge-add-open'" -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + - name: "Test with Maven with Integration Tests" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') && matrix.jdk != '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco,jdk15ge-simple,'!jdk15ge-add-open' -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') && matrix.jdk != '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -P"jacoco,jdk15ge-simple,'!jdk15ge-add-open'" -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + + samples-test-prepare: + runs-on: ubuntu-latest + env: + JOB_COUNT: 5 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Prepare test list" + run: | + bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: samples-test-list + path: test/jobs + samples-test-job: + needs: [build-source, samples-test-prepare] + name: "Samples Test on ubuntu-latest (JobId: ${{matrix.job_id}} JavaVer: ${{matrix.jdk}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.jdk}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + jdk: [ 8, 11, 17, 21 ] + job_id: [1, 2, 3, 4, 5] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Cache local Maven repository" + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: samples-test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.jdk}}" + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.jdk}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: | + cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "Upload test logs" + if: always() + uses: actions/upload-artifact@v4 + with: + name: samples-test-logs-${{matrix.jdk}}-${{matrix.job_id}} + path: test/logs/* + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: samples-test-result-${{matrix.jdk}}-${{matrix.job_id}} + path: test/jobs/*-result* + samples-test-result: + needs: [samples-test-job] + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.jdk}} + strategy: + matrix: + jdk: [ 8, 11, 17, 21 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: samples-test-result-${{matrix.jdk}}-* + github-token: ${{ secrets.GITHUB_TOKEN }} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + integration-test-prepare: + runs-on: ubuntu-latest + env: + JOB_COUNT: 5 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Prepare test list" + run: | + bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: integration-test-list + path: test/jobs + integration-test-job: + needs: [build-source, integration-test-prepare] + name: "Integration Test on ubuntu-latest (JobId: ${{matrix.job_id}} JavaVer: ${{matrix.jdk}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.jdk}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + jdk: [ 8, 11, 17, 21 ] + job_id: [1, 2, 3, 4, 5] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Cache local Maven repository" + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: integration-test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.jdk}}" + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.jdk}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: | + cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "Upload test logs" + if: always() + uses: actions/upload-artifact@v4 + with: + name: integration-test-logs-${{matrix.jdk}}-${{matrix.job_id}} + path: test/logs/* + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: integration-test-result-${{matrix.jdk}}-${{matrix.job_id}} + path: test/jobs/*-result* + integration-test-result: + needs: [integration-test-job] + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.jdk}} + strategy: + matrix: + jdk: [ 8, 11, 17, 21 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: integration-test-result-${{matrix.jdk}}-* + github-token: ${{ secrets.GITHUB_TOKEN }} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + error-code-inspecting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "3.2" + path: "./dubbo" + + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-test-tools' + ref: main + path: "./dubbo-test-tools" + + - name: "Set up JDK 21" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true + - name: "Run Error Code Inspecting" + env: + DUBBO_ECI_REPORT_AS_ERROR: true + run: | + cd ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector + ../mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C package exec:java -Ddubbo.eci.report-as-error=${DUBBO_ECI_REPORT_AS_ERROR} -Dmaven.test.skip=true -Dmaven.test.skip.exec=true -Ddubbo.eci.path=${{ github.workspace }}/dubbo + + - name: "Upload error code inspection result" + # always() should not be used here, since we don't need to handle the 'canceled' situation. + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v4 + with: + name: "error-inspection-result" + path: ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt + + native-image-inspecting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "3.2" + path: "./dubbo" + + - name: "Setup GraalVM environment" + uses: graalvm/setup-graalvm@v1 + with: + version: '22.3.0' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} + native-image-job-reports: 'true' + + - name: "Setup Zookeeper environment" + run: | + wget -t 1 -T 120 https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz + tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz + mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg apache-zookeeper-3.8.4-bin/conf/zoo.cfg + apache-zookeeper-3.8.4-bin/bin/zkServer.sh start + + - name: "Check environment" + run: | + java --version + native-image --version + + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true + + - name: "Compile and run Dubbo demo for native (Linux)" + run: | + cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider + ${{ github.workspace }}/dubbo/mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean package -P native -Dmaven.test.skip=true native:compile + nohup ./target/dubbo-demo-native-provider & + cd ${{ github.workspace }}/dubbo/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer + ${{ github.workspace }}/dubbo/mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean package -P native -Dmaven.test.skip=true native:compile + ./target/dubbo-demo-native-consumer diff --git a/.github/workflows/build-and-test-scheduled-3.3.yml b/.github/workflows/build-and-test-scheduled-3.3.yml new file mode 100644 index 00000000000..944cbfa9247 --- /dev/null +++ b/.github/workflows/build-and-test-scheduled-3.3.yml @@ -0,0 +1,529 @@ +name: Build and Test Scheduled On 3.3 + +on: + schedule: + - cron: '0 0/6 * * *' + workflow_dispatch: + +permissions: + contents: read + +env: + FORK_COUNT: 2 + FAIL_FAST: 0 + SHOW_ERROR_DETAIL: 1 + #multi-version size limit + VERSIONS_LIMIT: 4 + ALL_REMOTE_VERSION: true + CANDIDATE_VERSIONS: ' + spring.version:5.3.24,6.1.5; + spring-boot.version:2.7.6,3.2.3; + ' + +jobs: + license: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "3.3" + - name: Check License + uses: apache/skywalking-eyes@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build-source: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.dubbo-version.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + ref: "3.3" + path: dubbo + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + - name: "Build Dubbo with Maven" + run: | + cd ./dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean source:jar install -Pjacoco,checkstyle -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -Dmaven.test.skip=true -Dmaven.test.skip.exec=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Pack checkstyle file if failure" + if: failure() + run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r + - name: "Upload checkstyle file if failure" + if: failure() + uses: actions/upload-artifact@v4 + with: + name: "checkstyle-file" + path: ${{ github.workspace }}/checkstyle.zip + - name: "Calculate Dubbo Version" + id: dubbo-version + run: | + REVISION=`awk '/[^<]+<\/revision>/{gsub(/|<\/revision>/,"",$1);print $1;exit;}' ./dubbo/pom.xml` + echo "version=$REVISION" >> $GITHUB_OUTPUT + echo "dubbo version: $REVISION" + + unit-test-prepare: + name: " Preparation for Unit Test On ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + env: + ZOOKEEPER_VERSION: 3.7.2 + steps: + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + - name: "Set up msys2 if necessary" + if: ${{ startsWith( matrix.os, 'windows') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + uses: msys2/setup-msys2@v2 + with: + release: false # support cache, see https://github.com/msys2/setup-msys2#context + - name: "Download zookeeper binary archive in Linux OS" + if: ${{ startsWith( matrix.os, 'ubuntu') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + run: | + mkdir -p ${{ github.workspace }}/.tmp/zookeeper + wget -t 1 -T 120 -c https://archive.apache.org/dist/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c https://apache.website-solution.net/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + echo "list the downloaded zookeeper binary archive" + ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + - name: "Download zookeeper binary archive in Windows OS" + if: ${{ startsWith( matrix.os, 'windows') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + shell: msys2 {0} + run: | + mkdir -p ${{ github.workspace }}/.tmp/zookeeper + wget -t 1 -T 120 -c https://archive.apache.org/dist/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c https://apache.website-solution.net/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120-c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + echo "list the downloaded zookeeper binary archive" + ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + + unit-test: + needs: [build-source, unit-test-prepare] + name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }})" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + jdk: [ 8, 11, 17, 21 ] + env: + DISABLE_FILE_SYSTEM_TEST: true + steps: + - uses: actions/checkout@v4 + with: + ref: "3.3" + - name: "Set up JDK ${{ matrix.jdk }}" + uses: actions/setup-java@v1 + with: + java-version: ${{ matrix.jdk }} + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}- + - name: "Test with Maven with Integration Tests" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + + unit-test-fastjson2: + needs: [build-source, unit-test-prepare] + name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }}, Serialization: fastjson2)" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + jdk: [ 8, 11, 17, 21 ] + env: + DISABLE_FILE_SYSTEM_TEST: true + DUBBO_DEFAULT_SERIALIZATION: fastjson2 + MAVEN_SUREFIRE_ADD_OPENS: true + steps: + - uses: actions/checkout@v4 + - name: "Set up JDK ${{ matrix.jdk }}" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: ${{ matrix.jdk }} + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}- + - name: "Test with Maven with Integration Tests on JDK 8" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') && matrix.jdk == '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco,'!jdk15ge-add-open' -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests on JDK 8" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') && matrix.jdk == '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -P"jacoco,'!jdk15ge-add-open'" -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + - name: "Test with Maven with Integration Tests" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') && matrix.jdk != '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco,jdk15ge-simple,'!jdk15ge-add-open' -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') && matrix.jdk != '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -P"jacoco,jdk15ge-simple,'!jdk15ge-add-open'" -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + + samples-test-prepare: + runs-on: ubuntu-latest + env: + JOB_COUNT: 5 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Prepare test list" + run: | + bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: samples-test-list + path: test/jobs + samples-test-job: + needs: [build-source, samples-test-prepare] + name: "Samples Test on ubuntu-latest (JobId: ${{matrix.job_id}} JavaVer: ${{matrix.jdk}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.jdk}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + jdk: [ 8, 11, 17, 21 ] + job_id: [1, 2, 3, 4, 5] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Cache local Maven repository" + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: samples-test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.jdk}}" + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.jdk}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: | + cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "Upload test logs" + if: always() + uses: actions/upload-artifact@v4 + with: + name: samples-test-logs-${{matrix.jdk}}-${{matrix.job_id}} + path: test/logs/* + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: samples-test-result-${{matrix.jdk}}-${{matrix.job_id}} + path: test/jobs/*-result* + samples-test-result: + needs: [samples-test-job] + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.jdk}} + strategy: + matrix: + jdk: [ 8, 11, 17, 21 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: samples-test-result-${{matrix.jdk}}-* + github-token: ${{ secrets.GITHUB_TOKEN }} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + integration-test-prepare: + runs-on: ubuntu-latest + env: + JOB_COUNT: 5 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Prepare test list" + run: | + bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: integration-test-list + path: test/jobs + integration-test-job: + needs: [build-source, integration-test-prepare] + name: "Integration Test on ubuntu-latest (JobId: ${{matrix.job_id}} JavaVer: ${{matrix.jdk}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.jdk}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + jdk: [ 8, 11, 17, 21 ] + job_id: [1, 2, 3, 4, 5] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Cache local Maven repository" + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: integration-test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.jdk}}" + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.jdk}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: | + cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "Upload test logs" + if: always() + uses: actions/upload-artifact@v4 + with: + name: integration-test-logs-${{matrix.jdk}}-${{matrix.job_id}} + path: test/logs/* + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: integration-test-result-${{matrix.jdk}}-${{matrix.job_id}} + path: test/jobs/*-result* + integration-test-result: + needs: [integration-test-job] + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.jdk}} + strategy: + matrix: + jdk: [ 8, 11, 17, 21 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: integration-test-result-${{matrix.jdk}}-* + github-token: ${{ secrets.GITHUB_TOKEN }} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + error-code-inspecting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: "3.3" + path: "./dubbo" + + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-test-tools' + ref: main + path: "./dubbo-test-tools" + + - name: "Set up JDK 21" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true + - name: "Run Error Code Inspecting" + env: + DUBBO_ECI_REPORT_AS_ERROR: true + run: | + cd ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector + ../mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C package exec:java -Ddubbo.eci.report-as-error=${DUBBO_ECI_REPORT_AS_ERROR} -Dmaven.test.skip=true -Dmaven.test.skip.exec=true -Ddubbo.eci.path=${{ github.workspace }}/dubbo + + - name: "Upload error code inspection result" + # always() should not be used here, since we don't need to handle the 'canceled' situation. + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v4 + with: + name: "error-inspection-result" + path: ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt + + native-image-inspecting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: "./dubbo" + - name: "Set up GraalVM environment" + uses: graalvm/setup-graalvm@v1 + with: + version: '22.3.0' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} + native-image-job-reports: 'true' + - name: "Set up Zookeeper environment" + run: | + wget -t 1 -T 120 https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz + tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz + mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg apache-zookeeper-3.8.4-bin/conf/zoo.cfg + apache-zookeeper-3.8.4-bin/bin/zkServer.sh start + - name: "Check environment" + run: | + java --version + native-image --version + - name: "Set current date as env variable" + run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: "Restore local Maven repository cache" + uses: actions/cache/restore@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true + - name: "Checkout dubbo-samples repository" + uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + path: "./dubbo-samples" + - name: "Compile and run Dubbo native image demo" + run: | + MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true" + cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider + $MVNW clean package -P native native:compile + nohup ./target/dubbo-samples-native-image-provider & + sleep 10 + curl \ + --header "Content-Type: application/json" \ + --data '{"name":"Dubbo"}' \ + http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/ diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml new file mode 100644 index 00000000000..e010b7e8335 --- /dev/null +++ b/.github/workflows/release-test.yml @@ -0,0 +1,510 @@ +name: Release Test + +on: + push: + branches: + - '**-release' + workflow_dispatch: + +permissions: + contents: read + +env: + FORK_COUNT: 2 + FAIL_FAST: 0 + SHOW_ERROR_DETAIL: 1 + #multi-version size limit + VERSIONS_LIMIT: 4 + ALL_REMOTE_VERSION: true + CANDIDATE_VERSIONS: ' + spring.version:5.3.24,6.1.5; + spring-boot.version:2.7.6,3.2.3; + ' + +jobs: + license: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Check License + uses: apache/skywalking-eyes@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + build-source: + runs-on: ubuntu-latest + outputs: + version: ${{ steps.dubbo-version.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + path: dubbo + - uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: 21 + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + - name: "Build Dubbo with Maven" + run: | + cd ./dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean source:jar install -Pjacoco,checkstyle -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -Dmaven.test.skip=true -Dmaven.test.skip.exec=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Pack checkstyle file if failure" + if: failure() + run: 7z a ${{ github.workspace }}/checkstyle.zip *checkstyle* -r + - name: "Upload checkstyle file if failure" + if: failure() + uses: actions/upload-artifact@v4 + with: + name: "checkstyle-file" + path: ${{ github.workspace }}/checkstyle.zip + - name: "Calculate Dubbo Version" + id: dubbo-version + run: | + REVISION=`awk '/[^<]+<\/revision>/{gsub(/|<\/revision>/,"",$1);print $1;exit;}' ./dubbo/pom.xml` + echo "version=$REVISION" >> $GITHUB_OUTPUT + echo "dubbo version: $REVISION" + unit-test-prepare: + name: " Preparation for Unit Test On ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + env: + ZOOKEEPER_VERSION: 3.7.2 + steps: + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + - name: "Set up msys2 if necessary" + if: ${{ startsWith( matrix.os, 'windows') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + uses: msys2/setup-msys2@v2 + with: + release: false # support cache, see https://github.com/msys2/setup-msys2#context + - name: "Download zookeeper binary archive in Linux OS" + if: ${{ startsWith( matrix.os, 'ubuntu') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + run: | + mkdir -p ${{ github.workspace }}/.tmp/zookeeper + wget -t 1 -T 120 -c https://archive.apache.org/dist/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120-c https://apache.website-solution.net/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + echo "list the downloaded zookeeper binary archive" + ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + - name: "Download zookeeper binary archive in Windows OS" + if: ${{ startsWith( matrix.os, 'windows') && steps.cache-zookeeper.outputs.cache-hit != 'true' }} + shell: msys2 {0} + run: | + mkdir -p ${{ github.workspace }}/.tmp/zookeeper + wget -t 1 -T 120 -c https://archive.apache.org/dist/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c https://apache.website-solution.net/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://ftp.jaist.ac.jp/pub/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://apache.mirror.cdnetworks.com/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz || + wget -t 1 -T 120 -c http://mirror.apache-kr.org/apache/zookeeper/zookeeper-${{ env.ZOOKEEPER_VERSION }}/apache-zookeeper-${{ env.ZOOKEEPER_VERSION }}-bin.tar.gz -O ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + echo "list the downloaded zookeeper binary archive" + ls -al ${{ github.workspace }}/.tmp/zookeeper/apache-zookeeper-bin.tar.gz + unit-test: + needs: [build-source, unit-test-prepare] + name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }})" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + jdk: [ 8, 11, 17, 21 ] + env: + DISABLE_FILE_SYSTEM_TEST: true + steps: + - uses: actions/checkout@v4 + - name: "Set up JDK ${{ matrix.jdk }}" + uses: actions/setup-java@v4 + with: + java-version: ${{ matrix.jdk }} + distribution: 'zulu' + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}- + - name: "Test with Maven with Integration Tests" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + + unit-test-fastjson2: + needs: [build-source, unit-test-prepare] + name: "Unit Test On ${{ matrix.os }} (JDK: ${{ matrix.jdk }}, Serialization: fastjson2)" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, windows-latest ] + jdk: [ 8, 11, 17, 21 ] + env: + DISABLE_FILE_SYSTEM_TEST: true + DUBBO_DEFAULT_SERIALIZATION: fastjson2 + MAVEN_SUREFIRE_ADD_OPENS: true + steps: + - uses: actions/checkout@v4 + - name: "Set up JDK ${{ matrix.jdk }}" + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: ${{ matrix.jdk }} + - uses: actions/cache@v3 + name: "Cache local Maven repository" + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - uses: actions/cache@v3 + name: "Cache zookeeper binary archive" + id: "cache-zookeeper" + with: + path: ${{ github.workspace }}/.tmp/zookeeper + key: zookeeper-${{ runner.os }}-${{ env.ZOOKEEPER_VERSION }} + restore-keys: | + zookeeper-${{ runner.os }}- + - name: "Test with Maven with Integration Tests on JDK 8" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') && matrix.jdk == '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco,'!jdk15ge-add-open' -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests on JDK 8" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') && matrix.jdk == '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -P"jacoco,'!jdk15ge-add-open'" -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + - name: "Test with Maven with Integration Tests" + timeout-minutes: 70 + if: ${{ startsWith( matrix.os, 'ubuntu') && matrix.jdk != '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -Pjacoco,jdk15ge-simple,'!jdk15ge-add-open' -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=5 -DskipTests=false -DskipIntegrationTests=false -Dcheckstyle.skip=false -Dcheckstyle_unix.skip=false -Drat.skip=false -Dmaven.javadoc.skip=true -DembeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper + - name: "Test with Maven without Integration Tests" + timeout-minutes: 90 + if: ${{ startsWith( matrix.os, 'windows') && matrix.jdk != '8' }} + run: ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean test verify -P"jacoco,jdk15ge-simple,'!jdk15ge-add-open'" -D"http.keepAlive=false" -D"maven.wagon.http.pool=false" -D"maven.wagon.httpconnectionManager.ttlSeconds=120" -D"maven.wagon.http.retryHandler.count=5" -DskipTests=false -DskipIntegrationTests=true -D"checkstyle.skip=false" -D"checkstyle_unix.skip=true" -D"rat.skip=false" -D"maven.javadoc.skip=true" -D"embeddedZookeeperPath=${{ github.workspace }}/.tmp/zookeeper" + + samples-test-prepare: + runs-on: ubuntu-latest + env: + JOB_COUNT: 5 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Prepare test list" + run: | + bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: samples-test-list + path: test/jobs + samples-test-job: + needs: [build-source, samples-test-prepare] + name: "Samples Test on ubuntu-latest (JobId: ${{matrix.job_id}} JavaVer: ${{matrix.jdk}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.jdk}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + jdk: [ 8, 11, 17, 21 ] + job_id: [1, 2, 3, 4, 5] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Cache local Maven repository" + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: samples-test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.jdk}}" + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.jdk}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: | + cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: samples-test-result-${{matrix.jdk}}-${{matrix.job_id}} + path: test/jobs/*-result* + samples-test-result: + needs: [samples-test-job] + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.jdk}} + strategy: + matrix: + jdk: [ 8, 11, 17, 21 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: samples-test-result-${{matrix.jdk}}-* + github-token: ${{ secrets.GITHUB_TOKEN }} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + integration-test-prepare: + runs-on: ubuntu-latest + env: + JOB_COUNT: 5 + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Prepare test list" + run: | + bash ./test/scripts/prepare-test.sh + - name: "Upload test list" + uses: actions/upload-artifact@v4 + with: + name: integration-test-list + path: test/jobs + integration-test-job: + needs: [build-source, integration-test-prepare] + name: "Integration Test on ubuntu-latest (JobId: ${{matrix.job_id}} JavaVer: ${{matrix.jdk}})" + runs-on: ubuntu-latest + timeout-minutes: 90 + env: + JAVA_VER: ${{matrix.jdk}} + TEST_CASE_FILE: jobs/testjob_${{matrix.job_id}}.txt + strategy: + fail-fast: false + matrix: + jdk: [ 8, 11, 17, 21 ] + job_id: [1, 2, 3, 4, 5] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Cache local Maven repository" + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Restore Dubbo cache" + uses: actions/cache@v3 + with: + path: ~/.m2/repository/org/apache/dubbo + key: ${{ runner.os }}-dubbo-snapshot-${{ github.sha }}-${{ github.run_id }} + restore-keys: | + ${{ runner.os }}-dubbo-snapshot-${{ github.sha }} + ${{ runner.os }}-dubbo-snapshot- + - name: "Download test list" + uses: actions/download-artifact@v4 + with: + name: integration-test-list + path: test/jobs/ + - name: "Set up JDK ${{matrix.jdk}}" + uses: actions/setup-java@v1 + with: + java-version: ${{matrix.jdk}} + - name: "Init Candidate Versions" + run: | + DUBBO_VERSION="${{needs.build-source.outputs.version}}" + CANDIDATE_VERSIONS="dubbo.version:$DUBBO_VERSION;compiler.version:$DUBBO_VERSION;$CANDIDATE_VERSIONS;dubbo.compiler.version:$DUBBO_VERSION" + echo "CANDIDATE_VERSIONS=$CANDIDATE_VERSIONS" >> $GITHUB_ENV + - name: "Build test image" + run: | + cd test && bash ./build-test-image.sh + - name: "Run tests" + run: cd test && bash ./run-tests.sh + - name: "Upload test result" + if: always() + uses: actions/upload-artifact@v4 + with: + name: integration-test-result-${{matrix.jdk}}-${{matrix.job_id}} + path: test/jobs/*-result* + integration-test-result: + needs: [integration-test-job] + if: always() + runs-on: ubuntu-latest + env: + JAVA_VER: ${{matrix.jdk}} + strategy: + matrix: + jdk: [ 8, 11, 17, 21 ] + steps: + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-integration-cases' + ref: main + - name: "Download test result" + uses: actions/download-artifact@v4 + with: + pattern: integration-test-result-${{matrix.jdk}}-* + github-token: ${{ secrets.GITHUB_TOKEN }} + path: test/jobs/ + merge-multiple: true + - name: "Merge test result" + run: ./test/scripts/merge-test-results.sh + + error-code-inspecting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: "./dubbo" + + - uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-test-tools' + ref: main + path: "./dubbo-test-tools" + + - name: "Set up JDK 21" + uses: actions/setup-java@v4 + with: + java-version: 21 + distribution: 'zulu' + + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true + - name: "Run Error Code Inspecting" + env: + DUBBO_ECI_REPORT_AS_ERROR: true + run: | + cd ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector + ../mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C package exec:java -Ddubbo.eci.report-as-error=${DUBBO_ECI_REPORT_AS_ERROR} -Dmaven.test.skip=true -Dmaven.test.skip.exec=true -Ddubbo.eci.path=${{ github.workspace }}/dubbo + - name: "Upload error code inspection result" + # always() should not be used here, since we don't need to handle the 'canceled' situation. + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v4 + with: + name: "error-inspection-result" + path: ${{ github.workspace }}/dubbo-test-tools/dubbo-error-code-inspector/error-inspection-result.txt + + native-image-inspecting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + path: "./dubbo" + - name: "Set up GraalVM environment" + uses: graalvm/setup-graalvm@v1 + with: + version: '22.3.0' + java-version: '17' + components: 'native-image' + github-token: ${{ secrets.GITHUB_TOKEN }} + native-image-job-reports: 'true' + - name: "Set up Zookeeper environment" + run: | + wget -t 1 -T 120 https://dlcdn.apache.org/zookeeper/zookeeper-3.8.4/apache-zookeeper-3.8.4-bin.tar.gz + tar -zxvf apache-zookeeper-3.8.4-bin.tar.gz + mv apache-zookeeper-3.8.4-bin/conf/zoo_sample.cfg apache-zookeeper-3.8.4-bin/conf/zoo.cfg + apache-zookeeper-3.8.4-bin/bin/zkServer.sh start + - name: "Check environment" + run: | + java --version + native-image --version + - name: "Set current date as env variable" + run: echo "TODAY=$(date +'%Y%m%d')" >> $GITHUB_ENV + - name: "Restore local Maven repository cache" + uses: actions/cache/restore@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ env.TODAY }} + restore-keys: | + ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + ${{ runner.os }}-maven- + - name: "Compile Dubbo (Linux)" + run: | + cd ${{ github.workspace }}/dubbo + ./mvnw ${{ env.MAVEN_ARGS }} -T 2C clean install -P skip-spotless -Dmaven.test.skip=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true + - name: "Checkout dubbo-samples repository" + uses: actions/checkout@v4 + with: + repository: 'apache/dubbo-samples' + ref: master + path: "./dubbo-samples" + - name: "Compile and run Dubbo native image demo" + run: | + MVNW="${{ github.workspace }}/dubbo-samples/mvnw ${{ env.MAVEN_ARGS }} -Dmaven.test.skip=true" + cd ${{ github.workspace }}/dubbo-samples/2-advanced/dubbo-samples-native-image/dubbo-samples-native-image-provider + $MVNW clean package -P native native:compile + nohup ./target/dubbo-samples-native-image-provider & + sleep 10 + curl \ + --header "Content-Type: application/json" \ + --data '{"name":"Dubbo"}' \ + http://localhost:50052/org.apache.dubbo.nativeimage.DemoService/sayHello/ diff --git a/.gitignore b/.gitignore index 86a00a39f67..a3061c17008 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,18 @@ # maven ignore target/ *.jar -!.mvn/wrapper/* *.war *.zip *.tar *.tar.gz +.flattened-pom.xml # eclipse ignore .settings/ .project .classpath +.externalToolBuilders +maven-eclipse.xml # idea ignore .idea/ @@ -18,6 +20,9 @@ target/ *.iml *.iws +# visual-studio-code ignore +.vscode/ + # temp ignore *.log *.cache @@ -28,4 +33,25 @@ target/ # system ignore .DS_Store Thumbs.db +*.orig + +# license check result +license-list + +# grpc compiler +compiler/gradle.properties +compiler/build/* +compiler/.gradle/* + +# protobuf +dubbo-serialization/dubbo-serialization-protobuf/build/* +dubbo-demo/dubbo-demo-triple/build/* + +# global registry center +.tmp + +.git.exec.error + +# log files generated by testcase. +dubbo-rpc/dubbo-rpc-api/custom-access.log* diff --git a/.licenserc.yaml b/.licenserc.yaml new file mode 100644 index 00000000000..d2f629f01a1 --- /dev/null +++ b/.licenserc.yaml @@ -0,0 +1,254 @@ +header: + license: + spdx-id: Apache-2.0 + content: | + 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. + + paths-ignore: + - '**/*.versionsBackup' + - '**/.idea/' + - '**/*.iml' + - '**/.settings/*' + - '**/.classpath' + - '**/.project' + - '**/target/**' + - '**/generated/**' + - '**/*.log' + - '**/codestyle/*' + - '**/resources/META-INF/**' + - '**/resources/mockito-extensions/**' + - '**/*.proto' + - '**/*.cache' + - '**/*.txt' + - '**/*.load' + - '**/*.flex' + - '**/*.fc' + - '**/*.javascript' + - '**/*.properties' + - '**/*.sh' + - '**/*.bat' + - '**/*.md' + - '**/*.svg' + - '**/*.png' + - '**/*.json' + - '**/*.conf' + - '**/*.ftl' + - '**/*.tpl' + - '**/*.factories' + - '**/*.handlers' + - '**/*.schemas' + - '**/*.nojekyll' + - '.git/' + - '.github/**' + - '**/.gitignore' + - '**/.helmignore' + - '.repository/' + - 'compiler/**' + - '.gitmodules' + - '.mvn' + - 'mvnw' + - 'mvnw.cmd' + - 'LICENSE' + - 'NOTICE' + - 'CNAME' + - 'Jenkinsfile' + - '**/vendor/**' + - '**/src/test/resources/certs/**' + - '**/src/test/resources/definition/**' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/threadlocal/InternalThreadLocal.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/threadlocal/InternalThreadLocalMap.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/timer/Timeout.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/timer/Timer.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/timer/TimerTask.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/utils/CIDRUtils.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/utils/Utf8Utils.java' + - 'dubbo-config/dubbo-config-spring/src/test/java/org/apache/dubbo/config/spring/EmbeddedZooKeeper.java' + - 'dubbo-test/dubbo-test-common/src/main/java/org/apache/dubbo/test/common/utils/TestSocketUtils.java' + - 'dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TriHttp2RemoteFlowController.java' + - 'dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/rest/cors/CorsHeaderFilter.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/serial/SerializingExecutor.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/AbstractAotMojo.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/AbstractDependencyFilterMojo.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/CommandLineBuilder.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/DependencyFilter.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/Exclude.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/ExcludeFilter.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/FilterableDependency.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/Include.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/IncludeFilter.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/JavaCompilerPluginConfiguration.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/JavaExecutable.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/JavaProcessExecutor.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/MatchingGroupIdFilter.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/RunArguments.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/aot/RunProcess.java' + - 'dubbo-plugin/dubbo-native/src/main/java/org/apache/dubbo/aot/generate/BasicJsonWriter.java' + - 'dubbo-plugin/dubbo-native/src/main/java/org/apache/dubbo/aot/api/ExecutableMode.java' + - 'dubbo-plugin/dubbo-native/src/main/java/org/apache/dubbo/aot/api/MemberCategory.java' + - 'dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/aggregate/DubboMergingDigest.java' + - 'dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/aggregate/DubboAbstractTDigest.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/logger/helpers/FormattingTuple.java' + - 'dubbo-common/src/main/java/org/apache/dubbo/common/logger/helpers/MessageFormatter.java' + - 'dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/protoc/DubboProtocCompilerMojo.java' + - 'dubbo-plugin/dubbo-compiler/src/main/java/org/apache/dubbo/gen/utils/ProtoTypeMap.java' + + comment: on-failure + + license-location-threshold: 130 + +dependency: + files: + - pom.xml + - dubbo-dependencies-bom/pom.xml + licenses: + - name: com.fasterxml.jackson.core:jackson-annotations + license: Apache-2.0 + - name: com.fasterxml.jackson.core:jackson-core + license: Apache-2.0 + - name: com.fasterxml.jackson.core:jackson-databind + license: Apache-2.0 + - name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml + license: Apache-2.0 + - name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310 + license: Apache-2.0 + - name: com.google.code.gson:gson + license: Apache-2.0 + - name: com.google.guava:listenablefuture + license: Apache-2.0 + - name: com.salesforce.servicelibs:grpc-contrib + license: BSD 3-clause + - name: com.squareup.okhttp3:logging-interceptor + license: Apache-2.0 + - name: com.squareup.okhttp3:okhttp + license: Apache-2.0 + - name: com.squareup.okio:okio + license: Apache-2.0 + - name: com.sun.xml.fastinfoset:FastInfoset + license: Apache-2.0 + - name: io.envoyproxy.controlplane:api + license: Apache-2.0 + - name: io.swagger:swagger-annotations + license: Apache-2.0 + - name: io.swagger:swagger-models + license: Apache-2.0 + - name: org.springframework.boot:spring-boot + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-actuator + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-autoconfigure + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-configuration-processor + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter-actuator + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter-logging + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter-tomcat + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter-web + license: Apache-2.0 + - name: org.slf4j:slf4j-api + license: MIT + - name: org.slf4j:slf4j-log4j12 + license: MIT + - name: org.jboss.resteasy:resteasy-jaxrs + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-client + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-netty4 + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-jdk-http + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-jackson-provider + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-jaxb-provider + license: Apache-2.0 + - name: net.jcip:jcip-annotations + license: Apache-2.0 + - name: org.apache.zookeeper:zookeeper + license: Apache-2.0 + - name: org.apache.zookeeper:zookeeper-jute + license: Apache-2.0 + - name: net.bytebuddy:byte-buddy + license: Apache-2.0 + - name: javax.enterprise:cdi-api + license: Apache-2.0 + - name: org.codehaus.plexus:plexus-component-annotations + license: Apache-2.0 + - name: org.slf4j:jcl-over-slf4j + license: Apache-2.0 + - name: org.slf4j:jul-to-slf4j + license: Apache-2.0 + - name: org.codehaus.plexus:plexus-interpolation + license: Apache-2.0 + - name: org.sonatype.plexus:plexus-sec-dispatcher + license: Apache-2.0 + - name: org.sonatype.plexus:plexus-cipher + license: Apache-2.0 + - name: com.alibaba.csp:sentinel-apache-dubbo3-adapter + license: Apache-2.0 + - name: com.alibaba.csp:sentinel-transport-simple-http + license: Apache-2.0 + - name: com.alibaba.csp:sentinel-transport-common + license: Apache-2.0 + - name: com.alibaba.csp:sentinel-datasource-extension + license: Apache-2.0 + - name: com.alibaba.csp:sentinel-core + license: Apache-2.0 + - name: com.google.protobuf:protobuf-java + license: BSD 3-clause + - name: com.google.protobuf:protobuf-java-util + license: BSD 3-clause + - name: org.antlr:antlr4 + license: BSD 3-clause + - name: org.antlr:antlr-runtime + license: BSD 3-clause + - name: org.antlr:ST4 + license: BSD 3-clause + # multi license + - name: org.javassist:javassist + license: Apache-2.0 + - name: javax.annotation:javax.annotation-api + license: CDDL-1.0 + - name: com.salesforce.servicelibs:jprotoc + license: CDDL-1.0 + - name: org.checkerframework:checker-compat-qual + license: MIT + - name: ch.qos.logback:logback-classic + license: EPL-1.0 + - name: ch.qos.logback:logback-core + license: EPL-1.0 + - name: javax.servlet:javax.servlet-api + license: CDDL-1.1 + - name: com.sun.activation:javax.activation + license: CDDL-1.1 + - name: javax.activation:activation + license: CDDL-1.1 + - name: jakarta.annotation:jakarta.annotation-api + license: EPL-2.0 + - name: org.glassfish:jakarta.el + license: EPL-2.0 + - name: org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec + license: CDDL-1.1 + - name: org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_2.1_spec + license: EPL-2.0 + - name: org.jboss.spec.javax.annotation:jboss-annotations-api_1.3_spec + license: EPL-2.0 + excludes: + - name: javax.xml.bind:jsr173_api diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 00000000000..40d5472ed5a --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1,3 @@ +-Dfile.encoding=UTF-8 +-Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 +-Dstdout.encoding=UTF-8 -Dstderr.encoding=UTF-8 \ No newline at end of file diff --git a/.mvn/wrapper/maven-wrapper.jar b/.mvn/wrapper/maven-wrapper.jar deleted file mode 100755 index 41c70a7e0b7..00000000000 Binary files a/.mvn/wrapper/maven-wrapper.jar and /dev/null differ diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 56bb0164ec1..b252b8d0e2e 100755 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -1 +1,18 @@ -distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip \ No newline at end of file +# 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 +# +# https://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. +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9764b2b5df2..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: java -jdk: - - oraclejdk8 - - openjdk7 - -script: mvn clean package diff --git a/CHANGES.md b/CHANGES.md new file mode 100644 index 00000000000..2983d19539d --- /dev/null +++ b/CHANGES.md @@ -0,0 +1,513 @@ +# Release Notes + +Please refer to https://github.com/apache/dubbo/releases for notes of future releases. + +## 2.7.6 + +### Features +* Support Service Authentication https://github.com/apache/dubbo/issues/5461 + +### Enhancement +* Removing the internal JDK API from FileSystemDynamicConfiguration +* Refactor the APT test-cases implementation of dubbo-metadata-processor in Java 9+ +* Remove feature envy +* JsonRpcProtocol support Generalization +* Reduce object allocation for ProtocolUtils.serviceKey +* Reduce object allocation for ContextFilter.invoke + +### Bugfixes +* Fixed bugs reported from 2.7.5 or lower versions, check [2.7.6 milestone](https://github.com/apache/dubbo/milestone/30) for details. + +### Compatibility +1. Filter refactor, the callback method `onResponse` annotated as @Deprecated has been removed, users of lower versions that +have extended Filter implementations and enabled Filter callbacks should be careful of this change. +2. RpcContext added some experimental APIs to support generic Object transmission. + +## 2.7.5 + +### Features +* Support HTTP/2 through gRPC, offers all features supported by HTTP/2 and gRPC + * Stream communication: client stream, server stream and bi-stream. + * Reactive stream style RPC call. + * Back pressure based on HTTP/2 flow-control mechanism. + * TLS secure transport layer. + * Define service using IDL +* Protobuf support for native Dubbo + * Define service using IDL + * Protobuf serialization +* TLS for netty4 server +* New SPI for dynamically adding extra parameters into provider URL, especially env parameters. +* **[BETA]** Brand new Service Discovery mechanism: Service Reflection - instance (application) level service discovery. +* **[BETA]** Brand new API for bootstraping Dubbo projects + +### Performance Tuning +* Overall performance improved by nearly 30% compared to v2.7.3 (by QPS in certain circumstances) +* Improved consumer side thread model to avoid thread allocation and context switch, especially useful for services serving big traffic. + +### Enhancement +* Load balance strategy among multiple registries: + * Preferred + * Same zone first + * Weighted LB + * The first one available +* New callback SPI for receiving address change notifications +* Refactoring of config module + +### Bugfixes +check 2.7.5 milestone for details. + +## 2.7.4.1 + +### Enhancement + +* Enhance ProtobufTypeBuilder support generate type definition which contains Bytes List or Bytes Map. #5083 +* Using the ID of Dubbo Config as the alias of Bean. #5094 +* tag router supports anyhost. #4431 +* optimize generic invoke. #4076 +* dubbo zookeeper registry too slow #4828 +* use consul with group and version. #4755 +* qos support host config. #4720 +* migrate http protocol #4781 +* Some unit test optimization. #5026 #4803 #4687 + +### Bugfixes + +* Apollo namespace optimization. #5105 +* Simplify dubbo-common transitive dependencies. #5107 +* Delete 'config.' prefix for url generated from ConfigCenterConfig. #5001 +* fix set generic method error. #5079 +* Add support for overriding Map properties in AbstractConfig.refresh. #4882 +* Fix travis javax.ex dependency issue. (unit test) +* Fix: ExtensionLoader load duplicate filter,no log or exception. #4340 +* When the provider interrupts abnormally, the consumer cannot return quickly and still waits for the timeout to end. #4694 +* Fix register config not take effect because of url simplified。 #4397 +* Don't support metadata for generic service. #4641 +* Avoid resize in ClassUtils.java. #5009 +* default attribute in doesn't work as expected. #4412 +* make RegistryDirectory can refresh the invokers when providers number become 0 when using nacos registry. #4793 +* Multiple @Reference annotations only have one effect #4674 +* Fix RpcContext.getContext().getRemoteApplicationName() returns null #4351 +* Security issue: upgrade fastjson version to 1.2.60. #5018 +* nacos-registry:serviceName split error #4974 +* AbstractConfig.java-getMetaData set default depend on getmethod sequence #4678 +* fix protocol register set false not work. #4776 +* Fix: In Rest protocol, the limitation of Dubbo-Attachments. #4898 +* The logic of org.apache.dubbo.config.MonitorConfig#isValid is incorrect #4892 +* protostuff return stackoverflow and other error msg #4861 +* fix method parameter bean generation. #3796 +* replace hardcode with regex pattern #4810 +* Fix warm up issue when provider's timestamp is bigger than local machine's timestamp. #4870 +* Fix use generic invocation via API , lost #4238 ion" value #4784 +* In consumer side the app cannot catch the exception from provider that is configured serialization="kryo". #4238 +* fix StringUtils#isBlank #4725 +* when the interfaceName of the Reference annotation has duplicated,the exception is puzzled #4160 +* when anonymity bean is defined in spring context,dubbo throw npe # +* add Thread ContextClassLoader #4712 +* Fix judgment ipv4 address #4729 +* The compilation of static methods should be excluded when generating the proxy. #4647 +* check EOF of inputstream in IOUtils.write #4648 + + +## 2.7.3 + +### Change List + +1. Asynchronous support + * Unified asynchronous and synchronous callback process, exception scenario triggers onError callback, #4401 + * Performance degradation caused by CompletableFuture.get() in JDK1.8 environment, #4279 + +2. Configuration Center + * ConfigCenter custom namespace does not take effect, #4411 + * Unify the models implemented by several configuration centers such as Zookeeper, Nacos, and Etcd. Please refer to the description for possible incompatibility issues, #4388 + * Adjust Override Coverage Rule Center Priority: Service Level > Application Level, #4175 + +3. 2.6.x compatibility + * Support Zipkin tracing feature provided by Zipkin officially, #3728, #4471 + * DubboComponentScan supports simultaneous scanning of annotations under the `com.alibaba.*` and `org.apache.*` packages, #4330 + +4. The Nacos Registration Center only subscribes to the address list and no longer subscribes to configuration information, #4454. + +5. Support to read the environment configuration from the specified location, which can be specified by -D or OS VARIABLE. Please refer to [automatically loading environment variables](http://dubbo.apache.org/en-us/docs/user/configuration/environment-variables.html) + +6. Fix consumer cannot downgrade to providers with no tags when there's no tagged providers can match, #4525 + +7. Some other bugfixes, #4346 #4338 #4349 #4377 + +### Change List + +1. 异步支æŒç›¸å…³ + + - ç»Ÿä¸€å¼‚æ­¥å’ŒåŒæ­¥çš„回调æµç¨‹ï¼Œå¼‚常场景触å‘onError回调 #4401 + - CompletableFuture.get()在JDK1.8环境下带æ¥çš„æ€§èƒ½ä¸‹é™é—®é¢˜ #4279 + +2. é…置中心相关 + + - ConfigCenter自定义namespaceä¸ç”Ÿæ•ˆçš„问题 #4411 + - 统一Zookeeperã€Nacosã€Etcd等几个é…置中心实现的模型,å¯èƒ½å¸¦æ¥çš„ä¸å…¼å®¹æ€§é—®é¢˜è¯·å‚è§è¯´æ˜Žã€‚相关修改:#4388 + - 调整Override覆盖规则中心优先级:æœåŠ¡çº§åˆ« > 应用级别 #4175 + +3. 2.6.x兼容性 + + - 兼容zipkin官方æä¾›çš„基于Dubbo-2.6 APIçš„é›†æˆ #3728, #4471 + - DubboComponentScan支æŒåŒæ—¶æ‰«æ `com.alibaba.*` å’Œ `org.apache.*` 两个包下的注解 #4330 + +4. Nacos注册中心åªè®¢é˜…地å€åˆ—表,ä¸å†è®¢é˜…é…ç½®ä¿¡æ¯ #4454 + +5. 支æŒä»ŽæŒ‡å®šä½ç½®è¯»å–环境é…置,å¯é€šè¿‡-D或OS VARIABLE指定,具体请å‚è§[使用说明](http://dubbo.apache.org/zh-cn/docs/user/configuration/environment-variables.html) + +6. æ ‡ç­¾è·¯ç”±åœ¨æ¶ˆè´¹ç«¯ä½¿ç”¨é™æ€æ‰“æ ‡æ–¹å¼æ—¶ï¼Œæ— æ³•实现自动é™çº§ä»¥æ¶ˆè´¹æ— æ ‡ç­¾æä¾›è€… #4525 + +7. 其他一些bugfix,#4346 #4338 #4349 #4377 + +## 2.7.2 + +### New Features + +- nacos config center / metadata center support. [#3846](https://github.com/apache/dubbo/issues/3846) +- Etcd support as config center and metadata center [#3653](https://github.com/apache/dubbo/issues/3653) +- Support Redis cluster in Metadata Report. [#3817](https://github.com/apache/dubbo/issues/3817) +- add new module for Dubbo Event. [#4096](https://github.com/apache/dubbo/issues/4096) +- Support multiple registry that including some effective registry, such as zk, redis [#3599](https://github.com/apache/dubbo/issues/3599) +- support nacos metadata [#4025](https://github.com/apache/dubbo/issues/4025) +- Dubbo support Google Protobuf generic reference [#3829](https://github.com/apache/dubbo/issues/3829) +- Merge serialization-native-hessian-for-apache-dubbo into incubator-dubbo [#3961](https://github.com/apache/dubbo/issues/3961) +- Merge rpc-native-thrift-for-apache-dubbo into incubator-dubbo [#3960](https://github.com/apache/dubbo/issues/3960) +- add socks5 proxy support [#3624](https://github.com/apache/dubbo/issues/3624) +- Integrate with SOFARegistry [#3874](https://github.com/apache/dubbo/issues/3874) +- Introduce CompletableFuture $invokeAsync for GenericService, now, for generic call, you can use: + $invoke for sync method call with normal return type. + $invokeAsync for async method call with CompletableFuture signature. [#3163](https://github.com/apache/dubbo/issues/3163) + +### Enhancement + +- Performance tuning for TimeoutTask in DefaultFuture. [#4129](https://github.com/apache/dubbo/issues/4129) +- Add a script to check dependencies license. [#3840](https://github.com/apache/dubbo/issues/3840) +- Change DynamicConfiguration definition to better adapt to Apollo's namespace storage model.[#3266](https://github.com/apache/dubbo/issues/3266) +- use equal explicit class to replace anonymous class [#4027](https://github.com/apache/dubbo/issues/4027) +- Separate Constants.java into some SubConstants Class [#3137](https://github.com/apache/dubbo/issues/3137) +- Need to enhance DecodeableRpcResult error message [#3994](https://github.com/apache/dubbo/issues/3994) +- Provide more meaningful binary releases. [#2491](https://github.com/apache/dubbo/issues/2491) +- remove useless module-dubbo-test-integration [#3573](https://github.com/apache/dubbo/issues/3573) +- complete lookup method of consul registry and add integration test [#3890](https://github.com/apache/dubbo/issues/3890) +- Metrics Service [#3702](https://github.com/apache/dubbo/issues/3702) +- Update nacos-client to 1.0.0 [#3804](https://github.com/apache/dubbo/issues/3804) +- Fluent style builder API support [#3431](https://github.com/apache/dubbo/issues/3431) +- Update readme to remove the incubator prefix [#4159](https://github.com/apache/dubbo/issues/4159) +- update erlang link [#4100](https://github.com/apache/dubbo/issues/4100) +- optimize array code style [#4031](https://github.com/apache/dubbo/issues/4031) +- optimize some code style [#4006](https://github.com/apache/dubbo/issues/4006) +- remove useless module-dubbo-test-integration [#3989](https://github.com/apache/dubbo/issues/3989) +- optimize constant naming style [#3970](https://github.com/apache/dubbo/issues/3970) +- Use maven CI friendly versions: revision. [#3851](https://github.com/apache/dubbo/issues/3851) +- remove-parse-error-log [#3862](https://github.com/apache/dubbo/issues/3862) +- Complete xsd definition for ConfigCenterConfig. [#3854](https://github.com/apache/dubbo/issues/3854) +- add remoteApplicationName field in RpcContext [#3816](https://github.com/apache/dubbo/issues/3816) + +### Bugfixes + +- @Reference can't match the local @Service beans. [#4071](https://github.com/apache/dubbo/issues/4071) +- remove some illegal licence: jcip-annotations, jsr173_api. [#3790](https://github.com/apache/dubbo/issues/3790) +- Qos port can't be disabled by externalized property. [#3958](https://github.com/apache/dubbo/issues/3958) +- Fix consumer will generate wrong stackTrace. [#4137](https://github.com/apache/dubbo/issues/4137) +- nacos registry serviceName may conflict. [#4111](https://github.com/apache/dubbo/issues/4111) +- The client loses the listener when the network is reconnected. [#4115](https://github.com/apache/dubbo/issues/4115) +- fix registry urls increase forever when recreate reference proxy. [#4109](https://github.com/apache/dubbo/issues/4109) +- In dubbo 2.7.1,the watcher processor of zookeeper client throw Nullpointexception. [#3866](https://github.com/apache/dubbo/issues/3866) +- ReferenceConfig initialized not changed to false once subscribe throws exception [#4068](https://github.com/apache/dubbo/issues/4068) +- dubbo registry extension compatibility with dubbo 2.6.x. [#3882](https://github.com/apache/dubbo/issues/3882) +- Annotation mode cannot set service parameters in 2.7.0. [#3778](https://github.com/apache/dubbo/issues/3778) +- compatibility with Zipkin. [#3728](https://github.com/apache/dubbo/issues/3728) +- do local export before register any listener. [#3669](https://github.com/apache/dubbo/issues/3669) +- Cannot recognize 2.6.x compatible rules from dubbo-admin. [#4059](https://github.com/apache/dubbo/issues/4059) +- In Dubbo 2.7.0, the provider can't be configured to async [#3650](https://github.com/apache/dubbo/issues/3650) +- dubbox compatibility [#3991](https://github.com/apache/dubbo/issues/3991) +- dubbo-2.7.1 providers repeat register [#3785](https://github.com/apache/dubbo/issues/3785) +- consul registry: NullPointerException [#3923](https://github.com/apache/dubbo/issues/3923) +- cannot publish local ip address when local ip and public ip exist at the same time [#3802](https://github.com/apache/dubbo/issues/3802) +- roll back change made by 3520. [#3935](https://github.com/apache/dubbo/issues/3935) +- dubbo-registry-nacos module is not bundled into Apache Dubbo 2.7.1 [#3797](https://github.com/apache/dubbo/issues/3797) +- switch from CopyOnWriteArrayList to regular list in order to avoid potential UnsupportedOperationException [#3242](https://github.com/apache/dubbo/issues/3242) +- Serialization ContentTypeId conflict between avro protocol and protocoluff protocol [#3926](https://github.com/apache/dubbo/issues/3926) +- delay export function doesn't work. [#3952](https://github.com/apache/dubbo/issues/3952) +- org.apache.dubbo.rpc.support.MockInvoker#getInterface should not return null [#3713](https://github.com/apache/dubbo/issues/3713) +- dubbo TagRouter does not work with dubbo:parameter [#3875](https://github.com/apache/dubbo/issues/3875) +- make protocols a mutable list (a concrete ArrayList) [#3841](https://github.com/apache/dubbo/issues/3841) +- javadoc lint issue [#3646](https://github.com/apache/dubbo/issues/3646) +- The etcd3 lease should be recycled correctly [#3684](https://github.com/apache/dubbo/issues/3684) +- telnet can't work when parameter has no nullary constructor and some fields is primitive [#4007](https://github.com/apache/dubbo/issues/4007) +- Sort added router list before set the 'routers' field of the RouterChain [#3969](https://github.com/apache/dubbo/issues/3969) +- fix injvm and local call [#3638](https://github.com/apache/dubbo/issues/3638) +- spelling error in org.apache.dubbo.common.extension.AdaptiveClassCodeGenerator#generateReturnAndInovation [#3933](https://github.com/apache/dubbo/issues/3933) +- metadata report doesn't support redis with password [#3826](https://github.com/apache/dubbo/issues/3826) +- The dubbo protostuff protocol serializes the bug of java.sql.Timestamp [#3914](https://github.com/apache/dubbo/issues/3914) +- do not filter thread pool by port [#3919](https://github.com/apache/dubbo/issues/3919) +- 'dubbo-serialization-gson' maven package error [#3903](https://github.com/apache/dubbo/issues/3903) +- AbstractRegistry will be endless loop, when doSaveProperties method have no permission to save the file [#3746](https://github.com/apache/dubbo/issues/3746) +- fix fastjson serialization with generic return type [#3771](https://github.com/apache/dubbo/issues/3771) +- The dubbo-serialization -api modules should not dependency on third-party jar packages [#3762](https://github.com/apache/dubbo/issues/3762) +- when using protostuff to serialize, there is not to check whether the data is null [#3727](https://github.com/apache/dubbo/issues/3727) +- bugfix and enhancement for async [#3287](https://github.com/apache/dubbo/issues/3287) + +## 2.7.1 + +### Notice + +'zkclient' extension for 'org.apache.dubbo.remoting.zookeeper.ZookeeperTransporter' is removed from Dubbo 2.7.1, and 'curator' extension becomes the default extension. If you happen to config your application to use 'zkclient' explicitly, pls. switch to use 'curator' instead. + +### New Features + +- service register support on nacos [#3582](https://github.com/apache/dubbo/issues/3582) +- support consul as registry center, config center and metadata center [#983](https://github.com/apache/dubbo/issues/983) +- service registry support/config center support on etcd [#808](https://github.com/apache/dubbo/issues/808) +- metrics support in dubbo 2.7.1 [#3598](https://github.com/apache/dubbo/issues/3598) +- @Argument @Method support [#2405](https://github.com/apache/dubbo/issues/2045) + +### Enhancement + +- [Enhancement] @EnableDubboConfigBinding annotates @Repeatable [#1770](https://github.com/apache/dubbo/issues/1770) +- [Enhancement] Change the default behavior of @EnableDubboConfig.multiple() [#3193](https://github.com/apache/dubbo/issues/3193) +- Should make annotation easier to use in multiple items circumstance [#3039](https://github.com/apache/dubbo/issues/3039) +- NoSuchMethodError are thrown when add custom Filter using dubbo2.6.5 and JDK1.6 and upgrade to dubbo2.7.0 [#3570](https://github.com/apache/dubbo/issues/3570) +- introduce dubbo-dependencies-zookeeper [#3607](https://github.com/apache/dubbo/pull/3607) +- Zookeeper ConfigCenter reuse the client abstraction and connection session [#3288](https://github.com/apache/dubbo/issues/3288) +- [Survey] Is it necessary to continue to maintain zkclient in dubbo project? [#3569](https://github.com/apache/dubbo/issues/3569) +- Start to use IdleStateHandler in Netty4 [#3341](https://github.com/apache/dubbo/pull/3341) +- Support multiple shared links [#2457](https://github.com/apache/dubbo/pull/2457) +- Optimize heartbeat [#3299](https://github.com/apache/dubbo/pull/3299) +- AccessLogFilter simple date format reduce instance creation [#3026](https://github.com/apache/dubbo/issues/3026) +- Support wildcard ip for tag router rule. [#3289](https://github.com/apache/dubbo/issues/3289) +- ScriptRouter should cache CompiledScript [#390](https://github.com/apache/dubbo/issues/390) +- Optimize compareTo in Router to guarantee consistent behaviour. [#3302](https://github.com/apache/dubbo/issues/3302) +- RMI protocol doesn't support generic invocation [#2779](https://github.com/apache/dubbo/issues/2779) +- a more elegant way to enhance HashedWheelTimer [#3567](https://github.com/apache/dubbo/pull/3567) +- obtain local address incorrectly sometimes in dubbo [#538](https://github.com/apache/dubbo/issues/538) +- implement pull request #3412 on master branch [#3418](https://github.com/apache/dubbo/pull/3418) +- enhancement for event of response (follow up for pull request #3043) [#3244](https://github.com/apache/dubbo/issues/3244) +- bump up hessian-lite version #3423 [#3513](https://github.com/apache/dubbo/pull/3513) +- [Dubbo-3610]make snakeyaml transitive, should we do this? [#3659](https://github.com/apache/dubbo/pull/3659) + +### Bugfixes + +- cannot register REST service in 2.7 due to the changes in RestProtoco#getContextPath [#3445](https://github.com/apache/dubbo/issues/3445) +- Conflict between curator client and dubbo [#3574](https://github.com/apache/dubbo/issues/3574) +- is there a problem in NettyBackedChannelBuffer.setBytes(...)? [#2619](https://github.com/apache/dubbo/issues/2619) +- [Dubbo - client always reconnect offline provider] Dubbo client bug [#3158](https://github.com/apache/dubbo/issues/3158) +- fix heartbeat internal [#3579](https://github.com/apache/dubbo/pull/3579) +- logic issue in RedisRegistry leads to services cannot be discovered. [#3291](https://github.com/apache/dubbo/pull/3291) +- Multicast demo fails with message "Can't assign requested address" [#2423](https://github.com/apache/dubbo/issues/2423) +- Fix thrift protocol, use path to locate exporter. [#3331](https://github.com/apache/dubbo/pull/3331) +- cannot use override to modify provider's configuration when hessian protocol is used [#900](https://github.com/apache/dubbo/issues/900) +- Condition is not properly used ? [#1917](https://github.com/apache/dubbo/issues/1917) +- connectionMonitor in RestProtocol seems not work [#3237](https://github.com/apache/dubbo/issues/3237) +- fail to parse config text with white space [#3367](https://github.com/apache/dubbo/issues/3367) +- @Reference check=false doesn't take effect [#195](https://github.com/apache/dubbo/issues/195) +- [Issue] SpringStatusChecker execute errors on non-XML Spring configuration [#3615](https://github.com/apache/dubbo/issues/3615) +- monitor's cluster config is set to failsafe and set to failsafe only [#274](https://github.com/apache/dubbo/issues/274) +- A question for ReferenceConfigCache. [#1293](https://github.com/apache/dubbo/issues/1293) +- referenceconfig#destroy never invoke unregister [#3294](https://github.com/apache/dubbo/issues/3294) +- Fix when qos is disable,log will print every time [#3397](https://github.com/apache/dubbo/pull/3397) +- service group is not supported in generic direct invocation [#3555](https://github.com/apache/dubbo/issues/3555) +- setOnreturn doesn't take effect in async generic invocation [#208](https://github.com/apache/dubbo/issues/208) +- Fix timeout filter not work in async way [#3174](https://github.com/apache/dubbo/pull/3174) +- java.lang.NumberFormatException: For input string: "" [#3069](https://github.com/apache/dubbo/issues/3069) +- NPE occurred when the configuration was deleted [#3533](https://github.com/apache/dubbo/issues/3533) +- NPE when package of interface is empty [#3556](https://github.com/apache/dubbo/issues/3556) +- NPE when exporting rest service using a given path. [#3477](https://github.com/apache/dubbo/issues/3477) +- NullPointerException happened when using SpringContainer.getContext() [#3476](https://github.com/apache/dubbo/issues/3476) +- Why does not tomcat throw an exception when `server.start` failed with a socket binding error. [#3236](https://github.com/apache/dubbo/issues/3236) +- No such extension org.apache.dubbo.metadata.store.MetadataReportFactory by name redis [#3514](https://github.com/apache/dubbo/issues/3514) +- dubbo 2.7.1-SNAPSHOT NoClassDefFoundError when use springboot [#3426](https://github.com/apache/dubbo/issues/3426) +- NPE occurs when use @Reference in junit in spring boot application [#3429](https://github.com/apache/dubbo/issues/3429) +- When refer the same service with more than one @References(with different configs) on consumer side, only one take effect [#1306](https://github.com/apache/dubbo/issues/1306) +- consumer always catch java.lang.reflect.UndeclaredThrowableException for the exception thrown from provider [#3386](https://github.com/apache/dubbo/issues/3386) +- dubbo2.7.0 com.alibaba.com.caucho.hessian.io.HessianProtocolException: 'com.alibaba.dubbo.common.URL' could not be instantiated [#3342](https://github.com/apache/dubbo/issues/3342) +- Close Resources Properly [#3473](https://github.com/apache/dubbo/issues/3473) +- SPI entires dup by 3 times. [#2842](https://github.com/apache/dubbo/issues/2842) +- provider gets wrong interface name from attachment when use generic invocation in 2.6.3 [#2981](https://github.com/apache/dubbo/issues/2981) +- HashedWheelTimer's queue gets full [#3449](https://github.com/apache/dubbo/issues/3449) +- Modify MetadataReportRetry ThreadName [#3550](https://github.com/apache/dubbo/pull/3550) +- Keep interface key in the URL in simplify mode when it's different from path. [#3478](https://github.com/apache/dubbo/issues/3478) +- nc is not stable in dubbo's bootstrap script [#936](https://github.com/apache/dubbo/issues/936) + +## 2.7.0 + +Requirements: **Java 8+** required + +Please check [here](https://github.com/apache/dubbo/blob/2.7.0-release/CHANGES.md#upgrading-and-compatibility-notifications) for notes and possible compatibility issues for upgrading from 2.6.x or lower to 2.7.0. + +### New Features + +- Enhancement of service governance rules. + - Enriched Routing Rules. + 1. Conditional Routing. Supports both application-level and service-level conditions. + 2. Tag Routing. Newly introduced to better support traffic isolation, such as grey deployment. + - Decoupling governance rules with the registry, making it easier to extend. Apollo and Zookeeper are available in this version. Nacos support is on the way... + - Application-level Dynamic Configuration support. + - Use YAML as the configuration language, which is more friendly to read and use. + +- Externalized Configuration. Supports reading `dubbo.properties` hosted in remote centralized configuration center - centralized configuration. + +- Simplified registry URL. With lower Registry memory use and less notification pressure from Service Directory, separates Configuration notification from Service Discovery. + +- Metadata Center. A totally new concept since 2.7.0, used to store service metadata including static configuration, service definition, method signature, etc.. By default, Zookeeper and Redis are supported as the backend storage. Will work as the basis of service testing, mock and other service governance features going to be supported in [Dubbo-Admin](https://github.com/apache/dubbo-admin). + +- Asynchronous Programming Model (only works for Dubbo protocol now) + - Built-in support for the method with CompletableFuture signature. + - Server-side asynchronous support, with an AsyncContext API works like Servlet 3.0. + - Asynchronous filter chain callback. + +- Serialization Extension: Protobuf. + +- Caching Policy Extension: Expiring Cache. + +### Enhancements / Bugfixes + +- Load Balancing strategy enhancement: ConsitentHash #2190, LeastActive #2171, Random #2597, RoundRobin #2650. + +- Third-party dependency upgrading. + - Switch default remoting to Netty 4. + - Switch default Zookeeper client to Curator. + - Upgrade Jetty to 9.x. + +- IPV6 support #2079. + +- Performance tuning, check hanging requests on a closed channel, make them return directly #2185. + +- Fixed the serialization problem of JDK primitive types in Kryo #2178. + +- Fixed the problem of failing to notify Consumer as early as possible after the Provider side deserialization failed #1903. + +### Upgrading and Compatibility Notifications + +We have always keep compatibility in mind during the whole process of 2.7.0. We even want old users to upgrade with only on pom version upgrade, but it's hard to achieve that, especially when considering that we have the package renamed in this version, so we had some tradeoffs. If you only used the Dubbo's most basic features, you may have little problems of upgrading, but if you have used some advanced features or have some SPI extensions inside, you'd better read the upgrade notifications carefully. The compatibility issues can be classified into the following 5 categories, for each part, there will have detailed dos and don'ts published later in the official website. + +1. Interoperability between 2.7.0 and lower versions + +2. Package renaming + + com.alibaba.dubbo -> org.apache.dubbo + +3. Simplification of registered URLs + +4. Service Governance Rules + +5. Configuration + +## 2.6.6 + +Enhancement / New feature: + +* tag route. #3065 +* Use Netty4 as default Netty version. #3029 +* upporting Java 8 Date/Time type when serializing with Kryo #3519 +* support config telnet #3511 +* add annotation driven in MethodConfig and ArgumentConfig #2603 +* add nacos-registry module #3296 +* add `protocol` attribute in `@Rerefence` #3555 +*support the hierarchical interface in @Service #3251 +* change the default behavior in `@EnableDubboConfig.multiple()` #3193 +* inline source code of `spring-context-support` #3192 +* Simplify externalized configuration of Dubbo Protocol name #3189 + +BugFix: + +* update hessian-lite to 2.3.5, fix unnecessary class load #3538 +* Fix unregister when client destroyed(referenceconfig#destroy) #3502 +* SPI entires dup by 3 times #3315 +* fix Consumer throws RpcException after RegistryDirectory notify in high QPS #2016 +* fix NPE in @Reference when using Junit to test dubbo service #3429 +* fix consumer always catch java.lang.reflect.UndeclaredThrowableException for any exception throws in provider #3386 +* fix the priority of `DubboConfigConfigurationSelector ` #2897 +* fix `@Rerefence#parameters()` not work #2301 + +## 2.6.5 + +Enhancements / Features: + +- Reactor the generation rule for @Service Bean name [#2235](https://github.com/apache/dubbo/issues/2235) +- Introduce a new Spring ApplicationEvent for ServiceBean exporting [#2251](https://github.com/apache/dubbo/issues/2251) +- [Enhancement] the algorithm of load issue on Windows. [#1641](https://github.com/apache/dubbo/issues/1641) +- add javadoc to dubbo-all module good first issue. [#2600](https://github.com/apache/dubbo/issues/2600) +- [Enhancement] Reactor the generation rule for @Service Bean name type/enhancement [#2235](https://github.com/apache/dubbo/issues/2235) +- Optimize LeastActiveLoadBalance and add weight test case. [#2540](https://github.com/apache/dubbo/issues/2540) +- Smooth Round Robin selection. [#2578](https://github.com/apache/dubbo/issues/2578) [#2647](https://github.com/apache/dubbo/pull/2647) +- [Enhancement] Resolve the placeholders for sub-properties. [#2297](https://github.com/apache/dubbo/issues/2297) +- Add ability to turn off SPI auto injection, special support for generic Object type injection. [#2681](https://github.com/apache/dubbo/pull/2681) + + +Bugfixes: + +- @Service(register=false) is not work. [#2063](https://github.com/apache/dubbo/issues/2063) +- Our customized serialization id exceeds the maximum limit, now it cannot work on 2.6.2 anymore. [#1903](https://github.com/apache/dubbo/issues/1903) +- Consumer throws RpcException after RegistryDirectory notify in high QPS. [#2016](https://github.com/apache/dubbo/issues/2016) +- Annotation @Reference can't support to export a service with a sync one and an async one . [#2194](https://github.com/apache/dubbo/issues/2194) +- `org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor#generateReferenceBeanCacheKey` has a bug. [#2522](https://github.com/apache/dubbo/issues/2522) +- 2.6.x Spring Event & Bugfix. [#2256](https://github.com/apache/dubbo/issues/2256) +- Fix incorrect descriptions for dubbo-serialization module. [#2665](https://github.com/apache/dubbo/issues/2665) +- A empty directory dubbo-config/dubbo-config-spring/src/test/resources/work after package source tgz. [#2560](https://github.com/apache/dubbo/issues/2560) +- Fixed 2.6.x branch a minor issue with doConnect not using getConnectTimeout() in NettyClient. (*No issue*). [#2622](https://github.com/apache/dubbo/pull/2622) +- Bean name of @service annotated class does not resolve placeholder. [#1755](https://github.com/apache/dubbo/issues/1755) + + + +Issues and Pull Requests, check [milestone-2.6.5](https://github.com/apache/dubbo/milestone/21). + +## 2.6.4 + +Enhancements / Features + +- Support access Redis with password, [#2146](https://github.com/apache/dubbo/pull/2146) +- Support char array for GenericService, [#2137](https://github.com/apache/dubbo/pull/2137) +- Direct return when the server goes down abnormally, [#2451](https://github.com/apache/dubbo/pull/2451) +- Add log for trouble-shooting when qos start failed, [#2455](https://github.com/apache/dubbo/pull/2455) +- PojoUtil support subclasses of java.util.Date, [#2502](https://github.com/apache/dubbo/pull/2502) +- Add ip and application name for MonitorService, [#2166](https://github.com/apache/dubbo/pull/2166) +- New ASCII logo, [#2402](https://github.com/apache/dubbo/pull/2402) + +Bugfixes + +- Change consumer retries default value from 0 to 2, [#2303](https://github.com/apache/dubbo/pull/2303) +- Fix the problem that attachment is lost when retry, [#2024](https://github.com/apache/dubbo/pull/2024) +- Fix NPE when telnet get a null parameter, [#2453](https://github.com/apache/dubbo/pull/2453) + +UT stability + +- Improve the stability by changing different port, setting timeout to 3000ms, [#2501](https://github.com/apache/dubbo/pull/2501) + +Issues and Pull Requests, check [milestone-2.6.4](https://github.com/apache/dubbo/milestone/19). + +## 2.6.3 + +Enhancements / Features + +- Support implicit delivery of attachments from provider to consumer, #889 +- Support inject Spring bean to SPI by bean type, #1837 +- Add generic invoke and attachments support for http&hessian protocol, #1827 +- Get the real methodname to support consistenthash for generic invoke, #1872 +- Remove validation key from provider url on Consumer side, config depedently, #1386 +- Introducing the Bootstrap module as a unified entry for Dubbo startup and resource destruction, #1820 +- Open TCP_NODELAY on Netty 3, #1746 +- Support specify proxy type on provider side, #1873 +- Support dbindex in redis, #1831 +- Upgrade tomcat to 8.5.31, #1781 + +Bugfixes + +- ExecutionDispatcher meet with user docs, #1089 +- Remove side effects of Dubbo custom loggers on Netty logger, #1717 +- Fix isShutdown() judge of Dubbo biz threadpool always return true, #1426 +- Selection of invoker node under the critical condition of only two nodes, #1759 +- Listener cann't be removed during unsubscribe when use ZK as registry, #1792 +- URL parsing problem when user filed contains '@', #1808 +- Check null in CacheFilter to avoid NPE, #1828 +- Fix potential deadlock in DubboProtocol, #1836 +- Restore the bug that attachment has not been updated in the RpcContext when the Dubbo built-in retry mechanism is triggered, #1453 +- Some other small bugfixes + +Performance Tuning + +- ChannelState branch prediction optimization. #1643 +- Optimize AtomicPositiveInteger, less memory and compute cost, #348 +- Introduce embedded Threadlocal to replace the JDK implementation, #1745 + +Hessian-lite diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..b7c31c2e8d1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at dev@dubbo.apache.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dd9ba965c18..a1f163a36b5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,25 +1,76 @@ -## Contributing to dubbo -Dubbo is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. If you want to contribute even something trivial please do not hesitate, but follow the guidelines below. +## Contributing to Dubbo +Dubbo is released under the non-restrictive Apache 2.0 licenses and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master. Contributions of all form to this repository is acceptable, as long as it follows the prescribed community guidelines enumerated below. + ### Sign the Contributor License Agreement -Before we accept a non-trivial patch or pull request we will need you to sign the Contributor License Agreement. Signing the contributor’s agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors might be asked to join the core team, and given the ability to merge pull requests. -### Code Conventions -Our code style is almost in line with the standard java conventions(Popular IDE's default setting satisfy this), only changed the following two restricts: -1. Classes under 'com.alibaba.*' and 'com.taobao.*' package are grouped separately, and put on top of all other 'imports'. -2. If there are more than 120 characters in current line, start a new line. +Before we accept a non-trivial patch or pull request (PRs), we will need you to sign the Contributor License Agreement. Signing the contributors' agreement does not grant anyone commits rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do. Active contributors may get invited to join the core team that will grant them privileges to merge existing PRs. + +### Contact + +#### Mailing list + +The mailing list is the recommended way of pursuing a discussion on almost anything related to Dubbo. Please refer to this [guide](https://github.com/apache/dubbo/wiki/Mailing-list-subscription-guide) for detailed documentation on how to subscribe. -We provide a template file [dubbo_codestyle_for_idea.xml](https://github.com/alibaba/dubbo/tree/master/codestyle/dubbo_codestyle_for_idea.xml) for IntelliJ idea, you can import it to you IDE. If you use Eclipse you can config manually by referencing the same file. +- [dev@dubbo.apache.org](mailto:dev-subscribe@dubbo.apache.org): the developer mailing list where you can ask questions about an issue you may have encountered while working with Dubbo. +- [commits@dubbo.apache.org](mailto:commits-subscribe@dubbo.apache.org): the commit updates will get broadcasted on this mailing list. You can subscribe to it, should you be interested in following Dubbo's development. +- [notifications@dubbo.apache.org](mailto:notifications-subscribe@dubbo.apache.org): all the Github [issue](https://github.com/apache/dubbo/issues) updates and [pull request](https://github.com/apache/dubbo/pulls) updates will be sent to this mailing list. -* Make sure all new .java files to have a simple Javadoc class comment with at least an @author tag identifying you, and a @date tag identifying birth, and preferably at least a paragraph on what the class is for. +### Reporting issue + +Please follow the [template](https://github.com/apache/dubbo/issues/new?template=dubbo-issue-report-template.md) for reporting any issues. + +### Code Conventions +Our code style is almost in line with the standard java conventions (Popular IDE's default setting satisfy this), with the following additional restricts: +* If there are more than 120 characters in the current line, begin a new line. + +* Make sure all new .java files to have a simple Javadoc class comment with at least a @date tag identifying birth, and preferably at least a paragraph on the intended purpose of the class. * Add the ASF license header comment to all new .java files (copy from existing files in the project) -* Add yourself as an @author to the .java files that you modify substantially (more than cosmetic changes). +* Make sure no @author tag gets appended to the file you contribute to as the @author tag is incompatible with Apache. Rest assured, other ways, including CVS, will ensure transparency, fairness in recording your contributions. * Add some Javadocs and, if you change the namespace, some XSD doc elements. -* A few unit tests should be added for a new feature or an important bugfix. +* Sufficient unit-tests should accompany new feature development or non-trivial bug fixes. + +* If no-one else is using your branch, please rebase it against the current master (or another target branch in the main project). + +* When writing a commit message, please follow the following conventions: should your commit address an open issue, please add Fixes #XXX at the end of the commit message (where XXX is the issue number). + +### Contribution flow + +A rough outline of an ideal contributors' workflow is as follows: + +* Fork the current repository +* Create a topic branch from where to base the contribution. Mostly, it's the master branch. +* Make commits of logical units. +* Make sure the commit messages are in the proper format (see below). +* Push changes in a topic branch to your forked repository. +* Follow the checklist in the [pull request template](https://github.com/apache/dubbo/blob/master/PULL_REQUEST_TEMPLATE.md) +* Before sending out the pull request, please sync your forked repository with the remote repository to ensure that your PR is elegant, concise. Reference the guide below: +``` +git remote add upstream git@github.com:apache/dubbo.git +git fetch upstream +git rebase upstream/master +git checkout -b your_awesome_patch +... add some work +git push origin your_awesome_patch +``` +* Submit a pull request to apache/dubbo and wait for the reply. + +Thanks for contributing! + +### Code style + +We provide a template file [dubbo_codestyle_for_idea.xml](https://github.com/apache/dubbo/tree/master/codestyle/dubbo_codestyle_for_idea.xml) for IntelliJ idea that you can import it to your workplace. +If you use Eclipse, you can use the IntelliJ Idea template for manually configuring your file. + +**NOTICE** + +It's critical to set the dubbo_codestyle_for_idea.xml to avoid the failure of your Travis CI builds. Steps to configure the code styles are as follows: -* If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project). +1. Enter `Editor > Code Style` +2. To manage a code style scheme, in the Code Style page, select the desired scheme from the drop-down list, and click on ![manage profiles](codestyle/manage_profiles.png). +From the drop-down list, select `Import Scheme`, then choose the option `IntelliJ IDEA code style XML` to import the scheme. +3. In the Scheme field, type the name of the new scheme and press ⎠to save the changes. -* When writing a commit message please follow these conventions, if you are fixing an existing issue please add Fixes #XXX at the end of the commit message (where XXX is the issue number). diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000000..15eda401fe4 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,138 @@ +import groovy.json.JsonSlurper + +pipeline { + agent { + node { + label 'ubuntu' + } + } + + options { + buildDiscarder(logRotator(daysToKeepStr: '14', artifactNumToKeepStr: '10')) + } + + environment { + JAVA_HOME = "${tool 'JDK 1.8 (latest)'}" + } + + tools { + maven 'Maven 3 (latest)' + jdk 'JDK 1.8 (latest)' + } + + triggers { + cron '''TZ=Asia/Shanghai + H 2,14 * * *''' + pollSCM '''TZ=Asia/Shanghai + H H/2 * * *''' + } + + + stages { + stage('Clone') { + steps { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', noTags: true, reference: '', shallow: true]], gitTool: 'Default', submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/apache/dubbo.git']]]) + } + } + + stage('Duplicate deploy check') { + steps { + script { + def deployedCommitId = sh(returnStdout: true, script: "curl --silent https://builds.apache.org/job/Apache%20Dubbo/job/${env.JOB_BASE_NAME}/lastSuccessfulBuild/artifact/DEPLOY_COMMIT_ID || true").trim() + env.DEPLOYED_COMMIT_ID = deployedCommitId + def commitId = sh(returnStdout: true, script: 'git rev-parse HEAD').trim() + env.COMMIT_ID = commitId + + if (commitId == deployedCommitId) { + env.STATUS_CHECK = "false" + println "Latest deployed commit id is $deployedCommitId, Skip deployment this time" + } else { + env.STATUS_CHECK = "true" + println "Current commit id hasn't been deployed, continue" + } + } + } + } + + stage('Commit status check') { + when { + expression { + return env.STATUS_CHECK == "true"; + } + } + steps { + script { + def commitId = env.COMMIT_ID + println "Current commit id: $commitId" + + def commitStatusJson = sh(script: "curl --silent https://api.github.com/repos/apache/dubbo/commits/$commitId/status", returnStdout: true).trim() + println "Commit status: \r\n$commitStatusJson" + + def jsonSlurper = new JsonSlurper() + def jsonObject = jsonSlurper.parseText(commitStatusJson) + + def status = jsonObject.state + + println "Current commit status is $status" + + if (status == "success") { + env.STATUS_CHECK = "true" + println "Continue to deploy snapshot" + } else { + env.STATUS_CHECK = "false" + println "Current commit status not allow to deploy snapshot" + } + } + } + } + + stage('Snapshot version check') { + when { + expression { + return env.STATUS_CHECK == "true"; + } + } + steps { + sh 'env' + sh 'java -version' + sh './mvnw clean install -pl "dubbo-dependencies-bom" && ./mvnw clean install -DskipTests=true && ./mvnw clean validate -Psnapshot-ci-deploy -pl "dubbo-all"' + } + } + + stage('Deploy snapshot') { + when { + expression { + return env.STATUS_CHECK == "true"; + } + } + steps { + timeout(40) { + sh './mvnw --version' + sh './mvnw clean package deploy -pl dubbo-dependencies-bom && ./mvnw clean source:jar javadoc:jar package deploy -DskipTests=true' + } + } + } + + stage('Save deployed commit id') { + steps { + script { + if (env.STATUS_CHECK != "true") { + println "Not pass status check" + env.COMMIT_ID = env.DEPLOYED_COMMIT_ID + } + } + writeFile file: 'DEPLOY_COMMIT_ID', text: "${env.COMMIT_ID}" + archiveArtifacts 'DEPLOY_COMMIT_ID' + } + } + } + + post { + failure { + mail bcc: '', body: '''Project: ${env.JOB_NAME} + Build Number: ${env.BUILD_NUMBER} + URL: ${env.BUILD_URL}''', cc: '', from: '', replyTo: '', subject: 'Apache Dubbo snapshot deployment fail', to: 'dev@dubbo.apache.org' + } + } + +} diff --git a/Jenkinsfile.sonar b/Jenkinsfile.sonar new file mode 100644 index 00000000000..79230bcf99d --- /dev/null +++ b/Jenkinsfile.sonar @@ -0,0 +1,51 @@ +/* + * + * 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. + * + */ +pipeline { + agent { + label 'ubuntu' + } + + tools { + maven 'maven_3_latest' + jdk 'jdk_11_latest' + } + + stages { + stage('Code Quality') { + steps { + echo 'Checking Code Quality on SonarCloud' + script { + // Main parameters + def sonarcloudParams="" + if ( env.BRANCH_NAME.startsWith("PR-") ) { + // this is a pull request + withCredentials([string(credentialsId: 'sonarcloud-token', variable: 'SONAR_TOKEN')]) { + sh './mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean verify sonar:sonar -Dmaven.test.skip=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_dubbo -Dsonar.coverage.jacoco.xmlReportPaths=dubbo-test/dubbo-dependencies-all/target/site/jacoco-aggregate/jacoco.xml -Dsonar.pullrequest.branch=${CHANGE_BRANCH} -Dsonar.pullrequest.base=${CHANGE_TARGET} -Dsonar.pullrequest.key=${CHANGE_ID} -Dsonar.login=${SONAR_TOKEN}' + } + } else { + // this is just a branch + withCredentials([string(credentialsId: 'sonarcloud-token', variable: 'SONAR_TOKEN')]) { + sh './mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast clean verify sonar:sonar -Dmaven.test.skip=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache_dubbo -Dsonar.coverage.jacoco.xmlReportPaths=dubbo-test/dubbo-dependencies-all/target/site/jacoco-aggregate/jacoco.xml -Dsonar.branch.name=${BRANCH_NAME} -Dsonar.login=${SONAR_TOKEN}' + } + } + } + } + } + } +} diff --git a/LICENSE b/LICENSE index 5471dc10377..3716d3930ed 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,4 @@ - Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -201,3 +200,98 @@ 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. + + +Apache Dubbo Submodules: + +Apache Dubbo includes a number of submodules with separate copyright notices +and license terms. Your use of these submodules is subject to the terms and +conditions of the following licenses. + +For the package org.apache.dubbo.common.threadlocal and org.apache.dubbo.common.timer: + +This product contains a modified portion of 'Netty', an event-driven asynchronous network application framework also + under a "Apache License 2.0" license, see https://github.com/netty/netty/blob/4.1/LICENSE.txt: + + * io.netty.util.concurrent.FastThreadLocal + * io.netty.util.internal.InternalThreadLocalMap + * io.netty.util.Timer + * io.netty.util.TimerTask + * io.netty.util.Timeout + * io.netty.util.HashedWheelTimer + +For the org.apache.dubbo.common.utils.CIDRUtils : + +This product contains a modified portion of 'edazdarevic.commons.net.CIDRUtils' published at +https://github.com/edazdarevic/CIDRUtils. The project is licensed under a MIT License: + * The MIT License + * + * Copyright (c) 2013 Edin Dazdarevic (edin.dazdarevic@gmail.com) + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + +For the file org.apache.dubbo.common.utils.Utf8Utils.java: + +This product contains a portion of the Protocol Buffers project, which is published at +https://developers.google.com/protocol-buffers/ and is licensed under the following License: + + Copyright 2008 Google Inc. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Code generated by the Protocol Buffer compiler is owned by the owner + of the input file used when generating it. This code is not + standalone and requires a support library to be linked with it. This + support library is itself covered by the above license. + +For the ca.proto in dubbo-registry-xds: + +This product contains a modified portion of 'Istio', an open platform to connect, manage, and secure microservices also + under a "Apache License 2.0" license, see https://github.com/istio/api/blob/master/LICENSE: + + * security/v1alpha1/ca.proto + +For the file dubbo-plugin/dubbo-rest-openapi/src/main/resources/META-INF/resources/swagger-ui/index.html: + +Under a "Apache License 2.0" license, see https://github.com/swagger-api/swagger-ui/blob/master/LICENSE + +For the file dubbo-plugin/dubbo-rest-openapi/src/main/resources/META-INF/resources/redoc/index.html: + +Under a "MIT License" license, see https://github.com/Redocly/redoc/blob/main/LICENSE diff --git a/NOTICE b/NOTICE index 43342a61374..a36c5557a15 100644 --- a/NOTICE +++ b/NOTICE @@ -1,170 +1,38 @@ -Copyright 1999-2012 Alibaba Group. - -Licensed 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. - -================================================================ -Dependencies: - -Spring: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://www.springsource.org - -Javassist: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://www.jboss.org/javassist - -Netty: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://netty.io - -Mina: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://mina.apache.org - -Grizzly: - - * LICENSE: - * http://www.gnu.org/licenses/gpl-2.0.html (General Public License 2.0) - * HOMEPAGE: - * http://grizzly.java.net - -HttpClient: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://hc.apache.org - -Hessian: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://hessian.caucho.com - -XStream: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://xstream.codehaus.org - -FastJson: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://code.alibabatech.com/wiki/fastjson - -Zookeeper: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://zookeeper.apache.org - -Jedis: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://code.google.com/p/jedis - -XMemcached: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://code.google.com/p/xmemcached - -Jetty: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://jetty.mortbay.org - -Thrift: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://thrift.apache.org - -CXF: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://cxf.apache.org - -ZKClient: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * https://github.com/sgroschupf/zkclient - -Curator - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * https://github.com/Netflix/curator - -JFreeChart: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://www.jfree.org - -HibernateValidator: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://www.hibernate.org/subprojects/validator.html - -CommonsLogging: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://commons.apache.org/logging - -SLF4J: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://www.slf4j.org - -Log4j: - - * LICENSE: - * http://www.apache.org/licenses/LICENSE-2.0 (Apache License 2.0) - * HOMEPAGE: - * http://log4j.apache.org +Apache Dubbo +Copyright 2018-2024 The Apache Software Foundation + +This product includes software developed at +The Apache Software Foundation (http://www.apache.org/). + +This product contains code form the Netty Project: + +The Netty Project +================= +Please visit the Netty web site for more information: + * http://netty.io/ + +Copyright 2014 The Netty Project + +This product contains code form the t-digest Project: +The code for the t-digest was originally authored by Ted Dunning +Adrien Grand contributed the heart of the AVLTreeDigest (https://github.com/jpountz) + +This product contains the following code copied from Maven Protocol Buffers Plugin: +dubbo-maven-plugin/src/main/java/org/apache/dubbo/maven/plugin/protoc/DubboProtocCompilerMojo.java + +Maven Protocol Buffers Plugin +============================= +Copyright (c) 2016 Maven Protocol Buffers Plugin Authors. All rights reserved. + +This product contains the following code copied from grpc-java-contrib: +dubbo-plugin/dubbo-compiler/src/main/java/org/apache/dubbo/gen/utils/ProtoTypeMap.java +Some portions of this file Copyright (c) 2019, Salesforce.com, Inc. and licensed under the BSD 3-Clause License + +grpc-java-contrib +==================== +Copyright (c) 2019, Salesforce.com, Inc. +All rights reserved. + + + + diff --git a/README.md b/README.md index 19486cbdfb2..56f43e9a670 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,138 @@ -[![Build Status](https://travis-ci.org/alibaba/dubbo.svg?branch=master)](https://travis-ci.org/alibaba/dubbo) -[![Gitter](https://badges.gitter.im/alibaba/dubbo.svg)](https://gitter.im/alibaba/dubbo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -![](https://img.shields.io/github/license/alibaba/dubbo.svg) -![](https://img.shields.io/maven-central/v/com.alibaba/dubbo.svg) -Pls. visit [dubbo.io](http://dubbo.io) for more information. +# Apache Dubbo Project + +[![Build and Test For PR](https://github.com/apache/dubbo/actions/workflows/build-and-test-pr.yml/badge.svg)](https://github.com/apache/dubbo/actions/workflows/build-and-test-pr.yml) +[![Codecov](https://codecov.io/gh/apache/dubbo/branch/3.3/graph/badge.svg)](https://codecov.io/gh/apache/dubbo) +[![Maven](https://img.shields.io/github/v/release/apache/dubbo.svg?sort=semver)](https://github.com/apache/dubbo/releases) +[![License](https://img.shields.io/github/license/apache/dubbo.svg)](https://github.com/apache/dubbo/blob/3.3/LICENSE) +[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/apache/dubbo.svg)](http://isitmaintained.com/project/apache/dubbo) +[![Percentage of issues still open](http://isitmaintained.com/badge/open/apache/dubbo.svg)](http://isitmaintained.com/project/apache/dubbo) + +Apache Dubbo is a powerful and user-friendly Web and RPC framework. It supports multiple language implementations such as Java, [Go](https://github.com/apache/dubbo-go), [Python](https://github.com/dubbo/py-client-for-apache-dubbo), [PHP](https://github.com/apache/dubbo-php-framework), [Erlang](https://github.com/apache/dubbo-erlang), [Rust](https://github.com/apache/dubbo-rust), and [Node.js/Web](https://github.com/apache/dubbo-js). + +Dubbo provides solutions for communication, service discovery, traffic management, observability, security, tooling, and best practices for building enterprise-grade microservices. + +> 🚀 We're collecting user info to improve Dubbo. Help us out here: [Who's using Dubbo](https://github.com/apache/dubbo/discussions/13842) + +--- + +## 🧱 Architecture + +![Architecture](https://dubbo.apache.org/imgs/architecture.png) + +- Communication between consumers and providers is done via RPC protocols like Triple, TCP, REST, etc. +- Consumers dynamically discover provider instances from registries (e.g., Zookeeper, Nacos) and manage traffic using defined strategies. +- Built-in support for dynamic config, metrics, tracing, security, and a visualized console. + +--- + +## 🚀 Getting Started + +### 📦 Lightweight RPC API + +Start quickly with our [5-minute guide](https://cn.dubbo.apache.org/zh-cn/overview/mannual/java-sdk/tasks/framework/lightweight-rpc/) + +Dubbo allows you to build RPC services using a minimal codebase and a lightweight SDK. It supports protocols like: + +- [Triple (gRPC-compatible)](https://dubbo.apache.org/zh-cn/overview/reference/protocols/triple/) +- Dubbo2 (TCP) +- REST +- Custom protocols + +### 🌱 Microservices with Spring Boot + +Kickstart your project using [Spring Boot Starter](https://cn.dubbo.apache.org/zh-cn/overview/mannual/java-sdk/tasks/develop/springboot/). + +Using just a dependency and a YAML config, you can unlock the full power of Dubbo: service discovery, observability, tracing, etc. + +âž¡ï¸ Learn how to [deploy](https://dubbo.apache.org/zh-cn/overview/tasks/deploy/), [monitor](https://dubbo.apache.org/zh-cn/overview/tasks/observability/), and [manage traffic](https://dubbo.apache.org/zh-cn/overview/tasks/traffic-management/) for Dubbo services. + +--- + +## ðŸ› ï¸ More Features + +Explore more through our hands-on tasks: + +- [Launch a Dubbo project](https://dubbo.apache.org/zh-cn/overview/tasks/develop/template/) +- [RPC protocols](https://dubbo.apache.org/zh-cn/overview/core-features/protocols/) +- [Traffic management](https://dubbo.apache.org/zh-cn/overview/core-features/traffic/) +- [Service discovery](https://dubbo.apache.org/zh-cn/overview/core-features/service-discovery/) +- [Observability](https://dubbo.apache.org/zh-cn/overview/core-features/observability/) +- [Extensibility](https://dubbo.apache.org/zh-cn/overview/core-features/extensibility/) +- [Security](https://dubbo.apache.org/zh-cn/overview/core-features/security/) +- [Visualized Console](https://dubbo.apache.org/zh-cn/overview/reference/admin/) +- [Kubernetes & Service Mesh](https://dubbo.apache.org/zh-cn/overview/core-features/service-mesh/) + +--- + +## 📦 Which Dubbo Version Should I Use? + +### Dubbo3 + +## 📦 Version Compatibility + +| Version | JDK Support | Dependencies | Highlights | +|----------|-------------|--------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------| +| **3.3.2** | 1.8 – 21 | [View Dependencies](https://github.com/apache/dubbo/blob/dubbo-3.3.2/dubbo-dependencies-bom/pom.xml#L92) | ✅ Actively Maintained
✅ Triple Protocol (gRPC/cURL)
✅ REST Support
✅ Spring Boot Starters | +| **3.2.16** | 1.8 – 17 | [View Dependencies](https://github.com/apache/dubbo/blob/dubbo-3.2.5/dubbo-dependencies-bom/pom.xml#L94) | ✅ Actively Maintained
✅ Metrics & Tracing
✅ Thread Pool Isolation
✅ +30% Performance
✅ Native Image Support | +| **3.1.11** | 1.8 – 17 | [View Dependencies](https://github.com/apache/dubbo/blob/dubbo-3.2.11/dubbo-dependencies-bom/pom.xml#L90) | âš ï¸ Stable, but Not Actively Maintained | + +### Dubbo2 + +| Version | JDK | Dependencies | Description | +|-------------|-----------|--------------------------------------------------------------------------------------------------------|-------------| +| 2.7.23 | 1.8 | [dependency list](https://github.com/apache/dubbo/blob/dubbo-2.7.23/dubbo-dependencies-bom/pom.xml#L92) | ⌠EOL | +| 2.6.x, 2.5.x| 1.6 - 1.7 | [dependency list](https://github.com/apache/dubbo/blob/dubbo-2.6.12/dependencies-bom/pom.xml#L90) | ⌠EOL | + +--- + +## 🤠Contributing + +See our [CONTRIBUTING](https://github.com/apache/dubbo/blob/master/CONTRIBUTING.md) guide to get started! + +### 🔠Community Collaboration + +- **Issues**: For bugs or tasks – [GitHub Issues](https://github.com/apache/dubbo/issues) +- **Discussions**: For questions, ideas – [GitHub Discussions](https://github.com/apache/dubbo/discussions) +- **PRs**: For merging your contributions – [GitHub Pull Requests](https://github.com/apache/dubbo/pulls) +- **Project Board**: [Dubbo Project Board](https://github.com/orgs/apache/projects/337) + +### 💡 How You Can Help + +- Check out "help wanted" issues: [Project Board](https://github.com/orgs/apache/projects/337) +- Join [mailing list discussions](https://github.com/apache/dubbo/wiki/Mailing-list-subscription-guide) +- Engage in [discussions](https://github.com/apache/dubbo/discussions) +- Fix [bugs](https://github.com/apache/dubbo/issues) or review [pull requests](https://github.com/apache/dubbo/pulls) +- Enhance the [website](https://github.com/apache/dubbo-website) +- Improve [dubbo-admin](https://github.com/apache/dubbo-admin) +- Contribute to the [ecosystem](https://github.com/apache/?q=dubbo&type=all&language=&sort=) + +If you're interested in contributing, email us at [dev@dubbo.apache.org](mailto:dev@dubbo.apache.org). + +--- + +## 🞠Reporting Issues + +Please use our [issue template](https://github.com/apache/dubbo/issues/new?template=dubbo-issue-report-template.md) when reporting bugs. + +--- + +## 🔠Reporting Security Vulnerabilities + +Please report vulnerabilities **privately** to [security@dubbo.apache.org](mailto:security@dubbo.apache.org). + +--- + +## 📬 Contact + +- **WeChat**: `apachedubbo` +- **DingTalk**: Group ID `37290003945` +- **Mailing List**: [Contact Guide](https://dubbo.apache.org/zh-cn/contact/) +- **Twitter**: [@ApacheDubbo](https://twitter.com/ApacheDubbo) +- **Security**: [security@dubbo.apache.org](mailto:security@dubbo.apache.org) + +--- + +## 📄 License + +Apache Dubbo is licensed under the [Apache License 2.0](https://github.com/apache/dubbo/blob/3.3/LICENSE). diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000000..815a736ead2 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,34 @@ +# Security Policy + +## Supported Versions + +Below is a table that shows versions that we accept security fixes. + +| Version | Supported | +|---------| ------------------ | +| 3.3.x | :white_check_mark: | +| 3.2.x | :white_check_mark: | +| 3.1.x | :white_check_mark: | +| 3.0.x | :x: | +| 2.7.x | :x: | +| 2.6.x | :x: | +| 2.5.x | :x: | + +## Reporting a Vulnerability + +The Apache Software Foundation takes a rigorous standpoint in annihilating the security issues in its software projects. Apache Dubbo is highly sensitive and forthcoming to issues pertaining to its features and functionality. + +If you have apprehensions regarding Dubbo's security or you discover vulnerability or potential threat, don’t hesitate to get in touch with the Apache Dubbo Security Team by dropping a mail at security@dubbo.apache.org. In the email, specify the description of the issue or potential threat. You are also urged to recommend the way to reproduce and replicate the issue. The Dubbo community will get back to you after assessing and analysing the findings. + +PLEASE PAY ATTENTION to report the security issue on the security email before disclosing it on public domain. + +## Vulnerability Handling + +An overview of the vulnerability handling process is: + +* The reporter reports the vulnerability privately to Apache. +* The appropriate project's security team works privately with the reporter to resolve the vulnerability. +* A new release of the Apache product concerned is made that includes the fix. +* The vulnerability is publicly announced. + +A more detailed description of the process can be found [here](https://www.apache.org/security/committers.html). diff --git a/build b/build new file mode 100755 index 00000000000..e5ae2bb75dc --- /dev/null +++ b/build @@ -0,0 +1,119 @@ +#!/bin/sh + +# +# 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. +# + +set -eu + +cd "$(dirname "$0")" + +export MAVEN_OPTS="\ +-Xms2g \ +-Xmx2g \ +-XX:+UseG1GC \ +-XX:InitiatingHeapOccupancyPercent=45 \ +-XX:+UseStringDeduplication \ +-XX:-TieredCompilation \ +-XX:TieredStopAtLevel=1 \ +-Dmaven.build.cache.enabled=true \ +-Dmaven.build.cache.lazyRestore=true \ +-Dmaven.compiler.useIncrementalCompilation=false \ +-Dmaven.test.skip=true \ +-Dcheckstyle.skip=true \ +-Dcheckstyle_unix.skip=true \ +-Drat.skip=true \ +-Dmaven.javadoc.skip=true +" + +CMD="./mvnw -e --batch-mode --no-snapshot-updates --fail-fast -T 2C" +ARGS="" +MODULES="" +PROFILES="sources,skip-spotless" +DEFAULT_MODULES="dubbo-distribution/dubbo-all,dubbo-spring-boot/dubbo-spring-boot-starter" + +print_help() { + echo "Usage: $0 [options]" + echo "Fast local compilation with incremental build and caching" + echo "Options:" + echo " -c Execute clean goal (removes build artifacts)" + echo " -p Execute compile goal (compiles the source code)" + echo " -i Execute install goal (builds and installs the project)" + echo " -t Execute test goal (runs the tests)" + echo " -s Execute spotless:apply (format the code)" + echo " -d Execute dependency:tree (displays the dependency tree)" + echo " -m Specify modules, default is $DEFAULT_MODULES" + echo " -f Specify profiles, default is $PROFILES" + echo " -h Display this help message" + echo "" + echo "Examples:" + echo " $0 Execute install goal compilation" + echo " $0 -m Execute a minimal compilation" + echo " $0 -ci Execute clean, install goals compilation" + echo " $0 -s Execute spotless:apply" + echo " $0 -d Display the dependency tree" + echo " $0 -t -m dubbo-config Execute test goal for dubbo-config module" + echo " $0 -cp -m dubbo-common Execute clean, compile the dubbo-common module" + exit 0 +} + +while getopts ":cpitstdm:f:h" opt; do + case $opt in + c) + ARGS="$ARGS clean" + ;; + p) + ARGS="$ARGS compile" + ;; + i) + ARGS="$ARGS install" + ;; + t) + ARGS="$ARGS test" + export MAVEN_OPTS=$(echo "$MAVEN_OPTS" | sed 's/-Dmaven\.test\.skip=true/-Dmaven.test.skip=false/') + ;; + s) + ARGS="$ARGS spotless:apply" + PROFILES="sources" + ;; + d) + ARGS="$ARGS dependency:tree" + ;; + m) + MODULES=" -pl $OPTARG -am" + ;; + f) + PROFILES="$OPTARG" + ;; + h) + print_help + ;; + *) + if [ "$OPTARG" = "m" ]; then + MODULES=" -pl $DEFAULT_MODULES -am" + else + ARGS="$ARGS $@" + fi + ;; + esac +done + +if [ -z "$ARGS" ] ; then + ARGS=" install" +fi + +set -x +$CMD$ARGS$MODULES -P $PROFILES diff --git a/build.cmd b/build.cmd new file mode 100644 index 00000000000..a7595982d1d --- /dev/null +++ b/build.cmd @@ -0,0 +1,117 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one or more +@REM contributor license agreements. See the NOTICE file distributed with +@REM this work for additional information regarding copyright ownership. +@REM The ASF licenses this file to You under the Apache License, Version 2.0 +@REM (the "License"); you may not use this file except in compliance with +@REM the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, software +@REM distributed under the License is distributed on an "AS IS" BASIS, +@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@REM See the License for the specific language governing permissions and +@REM limitations under the License. +@REM ---------------------------------------------------------------------------- + +@echo off +setlocal enabledelayedexpansion + +set MAVEN_OPTS=^ +-Xms2g ^ +-Xmx2g ^ +-XX:+UseG1GC ^ +-XX:InitiatingHeapOccupancyPercent=45 ^ +-XX:+UseStringDeduplication ^ +-XX:-TieredCompilation ^ +-XX:TieredStopAtLevel=1 ^ +-Dmaven.build.cache.enabled=true ^ +-Dmaven.build.cache.lazyRestore=true ^ +-Dmaven.compiler.useIncrementalCompilation=false ^ +-Dcheckstyle.skip=true ^ +-Dcheckstyle_unix.skip=true ^ +-Drat.skip=true ^ +-Dmaven.javadoc.skip=true + +set CMD=mvnw.cmd -e --batch-mode --no-snapshot-updates --fail-fast -T 2C +set ARGS= +set MODULES= +set PROFILES=sources,skip-spotless +set DEFAULT_MODULES=dubbo-distribution/dubbo-all,dubbo-spring-boot/dubbo-spring-boot-starter +set TEST_SKIP=true + +goto parse_args + +:print_help +echo Usage: %~n0 [options] +echo Fast local compilation with incremental build and caching +echo Options: +echo -c Execute clean goal (removes build artifacts) +echo -p Execute compile goal (compiles the source code) +echo -i Execute install goal (builds and installs the project) +echo -t Execute test goal (runs the tests) +echo -s Execute spotless:apply (format the code) +echo -d Execute dependency:tree (displays the dependency tree) +echo -m Specify modules, default is %DEFAULT_MODULES% +echo -f Specify profiles, default is %PROFILES% +echo -h Display this help message +echo. +echo Examples: +echo %~n0 Execute install goal compilation +echo %~n0 -m Execute a minimal compilation +echo %~n0 -c -i Execute clean, install goals compilation +echo %~n0 -s Execute spotless:apply +echo %~n0 -d Display the dependency tree +echo %~n0 -t -m dubbo-config Execute test goal for dubbo-config module +echo %~n0 -c -p -m dubbo-common Execute clean, compile the dubbo-common module +exit /b + +:parse_args +set ARG=%~1 +if "%ARG%"=="" goto check_args +if "%ARG%"=="-c" ( + set ARGS=%ARGS% clean +) else if "%ARG%"=="-p" ( + set ARGS=%ARGS% compile +) else if "%ARG%"=="-i" ( + set ARGS=%ARGS% install +) else if "%ARG%"=="-t" ( + set ARGS=%ARGS% test + set TEST_SKIP=false +) else if "%ARG%"=="-s" ( + set ARGS=%ARGS% spotless:apply + set PROFILES=sources +) else if "%ARG%"=="-d" ( + set ARGS=%ARGS% dependency:tree +) else if "%ARG%"=="-m" ( + if "%~2"=="" ( + set MODULES= -pl %DEFAULT_MODULES% -am + ) else ( + set MODULES= -pl %~2 -am + shift + ) +) else if "%ARG%"=="-f" ( + set PROFILES=%~2 + shift +) else if "%ARG%"=="-h" ( + goto print_help +) else ( + set ARGS=%ARGS% %ARG% +) + +shift +goto parse_args + +:check_args +if "%TEST_SKIP%"=="true" ( + set MAVEN_OPTS=%MAVEN_OPTS% -Dmaven.test.skip=true +) +if "%ARGS%"=="" ( + set ARGS= install +) + +@echo on +%CMD%%ARGS%%MODULES% -P %PROFILES% + +endlocal diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000000..c266ead21ce --- /dev/null +++ b/codecov.yml @@ -0,0 +1,33 @@ +# 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. +# +codecov: + require_ci_to_pass: false + notify: + wait_for_ci: false +coverage: + status: + # pull-requests only + patch: + default: + threshold: 0.1% +ignore: + - "**/aot/**/*" + - "dubbo-demo/**/*" + - "dubbo-compiler/**/*" + - "dubbo-test/**/*" + - "dubbo-compatible/**/*" + - "dubbo-native/**/*" + - "dubbo-maven-plugin/**/*" diff --git a/codestyle/checkstyle-suppressions.xml b/codestyle/checkstyle-suppressions.xml new file mode 100644 index 00000000000..c3415cd97bc --- /dev/null +++ b/codestyle/checkstyle-suppressions.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/codestyle/checkstyle.xml b/codestyle/checkstyle.xml new file mode 100644 index 00000000000..413cc720f6e --- /dev/null +++ b/codestyle/checkstyle.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/codestyle/checkstyle_unix.xml b/codestyle/checkstyle_unix.xml new file mode 100644 index 00000000000..589c7d7af6a --- /dev/null +++ b/codestyle/checkstyle_unix.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/codestyle/dubbo_codestyle_for_idea.xml b/codestyle/dubbo_codestyle_for_idea.xml index 2ecc06d680d..1f87caa7135 100644 --- a/codestyle/dubbo_codestyle_for_idea.xml +++ b/codestyle/dubbo_codestyle_for_idea.xml @@ -3,9 +3,7 @@