Skip to content

Commit

Permalink
Merge branch '3.2' into 3.2_feat/Upgrade_apache_parent_version
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyHZM authored Feb 29, 2024
2 parents 9ca318b + d53d8e5 commit b37a087
Show file tree
Hide file tree
Showing 62 changed files with 825 additions and 243 deletions.
52 changes: 47 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,55 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
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

# 4 space indentation
[*.{java,xml}]
indent_style = space
indent_size = 4
[*.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_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 = true
ij_java_wrap_long_lines = true
ij_java_enum_constants_wrap = split_into_lines
ij_java_method_call_chain_wrap = split_into_lines
ij_java_method_parameters_wrap = on_every_item
ij_java_extends_list_wrap = on_every_item
ij_java_extends_keyword_wrap = normal
ij_java_binary_operation_wrap = normal
ij_java_binary_operation_sign_on_next_line = true

[*.json]
tab_width = 2

[*.{yml,yaml}]
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
61 changes: 55 additions & 6 deletions .github/workflows/build-and-test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,49 @@ env:
'

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/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
core.setFailed("Formatting issues found!")
license:
name: "Check License"
needs: check-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -43,6 +85,8 @@ jobs:
mode: check

build-source:
name: "Build Dubbo"
needs: check-format
runs-on: ubuntu-latest
outputs:
version: ${{ steps.dubbo-version.outputs.version }}
Expand Down Expand Up @@ -98,6 +142,7 @@ jobs:
unit-test-prepare:
name: "Preparation for Unit Test"
needs: check-format
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -146,7 +191,7 @@ jobs:
echo "--- End Print Rsa Public Key"
unit-test:
needs: [build-source, unit-test-prepare]
needs: [check-format, build-source, unit-test-prepare]
name: "Unit Test On ubuntu-latest"
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -212,6 +257,7 @@ jobs:
path: "**/target/site/**/jacoco.xml"

samples-test-prepare:
needs: check-format
runs-on: ubuntu-latest
env:
JOB_COUNT: 3
Expand All @@ -229,7 +275,7 @@ jobs:
name: samples-test-list
path: test/jobs
samples-test-job:
needs: [build-source, samples-test-prepare]
needs: [check-format, build-source, samples-test-prepare]
name: "Samples Test on ubuntu-latest (JobId: ${{matrix.job_id}})"
runs-on: ubuntu-latest
timeout-minutes: 90
Expand Down Expand Up @@ -296,7 +342,7 @@ jobs:
name: samples-test-result
path: test/jobs/*-result*
samples-test-result:
needs: [samples-test-job]
needs: [check-format, samples-test-job]
if: always()
runs-on: ubuntu-latest
env:
Expand All @@ -315,6 +361,7 @@ jobs:
run: ./test/scripts/merge-test-results.sh

integration-test-prepare:
needs: check-format
runs-on: ubuntu-latest
env:
JOB_COUNT: 3
Expand All @@ -332,7 +379,7 @@ jobs:
name: test-list
path: test/jobs
integration-test-job:
needs: [build-source, integration-test-prepare]
needs: [check-format, build-source, integration-test-prepare]
name: "Integration Test on ubuntu-latest (JobId: ${{matrix.job_id}})"
runs-on: ubuntu-latest
timeout-minutes: 90
Expand Down Expand Up @@ -399,7 +446,7 @@ jobs:
name: test-result
path: test/jobs/*-result*
integration-test-result:
needs: [integration-test-job]
needs: [check-format, integration-test-job]
if: always()
runs-on: ubuntu-latest
env:
Expand All @@ -419,7 +466,7 @@ jobs:

jacoco-result-merge:
runs-on: ubuntu-latest
needs: [integration-test-result, samples-test-result, unit-test]
needs: [check-format, integration-test-result, samples-test-result, unit-test]
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -475,6 +522,7 @@ jobs:
verbose: true

error-code-inspecting:
needs: check-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -513,6 +561,7 @@ jobs:
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@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ There's a [README](https://github.com/apache/dubbo-samples/blob/389cd612f1ea57ee

```xml
<properties>
<dubbo.version>3.2.5</dubbo.version>
<dubbo.version>3.2.11</dubbo.version>
</properties>

<dependencies>
Expand Down
12 changes: 7 additions & 5 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
Below is a table that shows versions that we accept security fixes.

| Version | Supported |
| ------- | ------------------ |
| 3.0.x | :white_check_mark: |
| 2.7.x | :white_check_mark: |
| 2.6.x | :white_check_mark: |
|---------| ------------------ |
| 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.
Expand Down
2 changes: 1 addition & 1 deletion dubbo-build-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<properties>
<maven.deploy.skip>true</maven.deploy.skip>
<spotless-maven-plugin.version>2.41.1</spotless-maven-plugin.version>
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
<spotless.action>check</spotless.action>
<dubbo-shared-resources.version>1.0.0</dubbo-shared-resources.version>
<palantirJavaFormat.version>2.38.0</palantirJavaFormat.version>
Expand Down
Loading

0 comments on commit b37a087

Please sign in to comment.