Skip to content

Commit

Permalink
Merge branch 'develop' into issues_8512
Browse files Browse the repository at this point in the history
  • Loading branch information
847850277 committed Sep 26, 2024
2 parents a9000ca + daf3d1a commit f6bfa38
Show file tree
Hide file tree
Showing 119 changed files with 2,372 additions and 596 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
- develop
- bazel

permissions:
actions: write

jobs:
build:
name: "bazel-compile (${{ matrix.os }})"
Expand All @@ -23,13 +20,4 @@ jobs:
- name: Build
run: bazel build --config=remote //...
- name: Run Tests
run: bazel test --config=remote //...
- name: Retry if failed
# if it failed , retry 2 times at most
if: failure() && fromJSON(github.run_attempt) < 3
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Attempting to retry workflow..."
gh workflow run rerun-workflow.yml -F run_id=${{ github.run_id }}
run: bazel test --config=remote //...
45 changes: 45 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run Integration Tests
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [master, develop]

jobs:
it-test:
name: "maven-compile (${{ matrix.os }}, JDK-${{ matrix.jdk }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
jdk: [8]
steps:
- name: Cache Maven Repos
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
distribution: "adopt"
cache: "maven"

- name: Run integration tests with Maven
run: mvn clean verify -Pit-test -Pskip-unit-tests

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: 'test/target/failsafe-reports/TEST-*.xml'
annotate_only: true
include_passed: true
detailed_summary: true
24 changes: 1 addition & 23 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
push:
branches: [master, develop, bazel]

permissions:
actions: write

jobs:
java_build:
name: "maven-compile (${{ matrix.os }}, JDK-${{ matrix.jdk }})"
Expand All @@ -30,9 +27,6 @@ jobs:
- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Run tests with increased memory and debug info
run: mvn test -X -Dparallel=none -DargLine="-Xmx1024m -XX:MaxPermSize=256m"

- name: Upload Auth JVM crash logs
if: failure()
uses: actions/upload-artifact@v4
Expand All @@ -41,26 +35,10 @@ jobs:
path: /Users/runner/work/rocketmq/rocketmq/auth/hs_err_pid*.log
retention-days: 1

- name: Check for broker JVM crash logs
if: failure()
run: |
echo "Checking for JVM crash logs..."
ls -al /Users/runner/work/rocketmq/rocketmq/broker/
- name: Upload broker JVM crash logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: jvm-crash-logs
path: /Users/runner/work/rocketmq/rocketmq/broker/hs_err_pid*.log
retention-days: 1

- name: Retry if failed
# if it failed , retry 2 times at most
if: failure() && fromJSON(github.run_attempt) < 3
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Attempting to retry workflow..."
gh workflow run rerun-workflow.yml -F run_id=${{ github.run_id }}
retention-days: 1
4 changes: 2 additions & 2 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build distribution tar
run: |
mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload distribution tar
with:
name: rocketmq
Expand All @@ -30,7 +30,7 @@ jobs:
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: pr
path: pr/
22 changes: 11 additions & 11 deletions .github/workflows/pr-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
java-version: ["8"]
steps:
- name: 'Download artifact'
uses: actions/github-script@v3.1.0
uses: actions/github-script@v6
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
let artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifactRmq = artifacts.data.artifacts.filter((artifact) => {
let matchArtifactRmq = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "rocketmq"
})[0];
var download = await github.actions.downloadArtifact({
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifactRmq.id,
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
mkdir versionlist
touch versionlist/"${version}-`echo ${{ matrix.base-image }} | sed -e "s/:/-/g"`"
sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} ${DOCKER_REPO}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload distribution tar
with:
name: versionlist
Expand All @@ -85,7 +85,7 @@ jobs:
outputs:
version-json: ${{ steps.show_versions.outputs.version-json }}
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
name: Download versionlist
with:
name: versionlist
Expand All @@ -96,6 +96,7 @@ jobs:
a=(`ls versionlist`)
printf '%s\n' "${a[@]}" | jq -R . | jq -s .
echo version-json=`printf '%s\n' "${a[@]}" | jq -R . | jq -s .` >> $GITHUB_OUTPUT
deploy:
if: ${{ success() }}
name: Deploy RocketMQ
Expand Down Expand Up @@ -158,7 +159,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand Down Expand Up @@ -199,7 +200,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand Down Expand Up @@ -235,7 +236,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand All @@ -258,5 +259,4 @@ jobs:
action: "clean"
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
test-version: "${{ matrix.version }}"
job-id: ${{ strategy.job-index }}

job-id: ${{ strategy.job-index }}
14 changes: 7 additions & 7 deletions .github/workflows/push-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Build distribution tar
run: |
mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload distribution tar
with:
name: rocketmq
Expand All @@ -53,7 +53,7 @@ jobs:
repository: apache/rocketmq-docker.git
ref: master
path: rocketmq-docker
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
name: Download distribution tar
with:
name: rocketmq
Expand All @@ -72,7 +72,7 @@ jobs:
mkdir versionlist
touch versionlist/"${version}-`echo ${{ matrix.base-image }} | sed -e "s/:/-/g"`"
sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} ${DOCKER_REPO}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload distribution tar
with:
name: versionlist
Expand All @@ -90,7 +90,7 @@ jobs:
outputs:
version-json: ${{ steps.show_versions.outputs.version-json }}
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
name: Download versionlist
with:
name: versionlist
Expand Down Expand Up @@ -163,7 +163,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand Down Expand Up @@ -204,7 +204,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/rerun-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
name: Rerun workflow
on:
workflow_dispatch:
inputs:
run_id:
required: true
workflow_run:
workflows: ["Build and Run Tests by Maven" , "Build and Run Tests by Bazel"]
types:
- completed

permissions:
actions: write

jobs:
rerun:
if: github.event.workflow_run.conclusion == 'failure' && fromJSON(github.event.workflow_run.run_attempt) < 3
runs-on: ubuntu-latest
steps:
- name: rerun ${{ inputs.run_id }}
- name: rerun ${{ github.event.workflow_run.id }}
env:
GH_REPO: ${{ github.repository }}
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh run watch ${{ inputs.run_id }} > /dev/null 2>&1
gh run rerun ${{ inputs.run_id }} --failed
gh run watch ${{ github.event.workflow_run.id }} > /dev/null 2>&1
gh run rerun ${{ github.event.workflow_run.id }} --failed
10 changes: 5 additions & 5 deletions .github/workflows/snapshot-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
MAVEN_SETTINGS: ${{ github.workspace }}/.github/asf-deploy-settings.xml
run: |
mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload distribution tar
with:
name: rocketmq
Expand All @@ -91,7 +91,7 @@ jobs:
repository: apache/rocketmq-docker.git
ref: master
path: rocketmq-docker
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
name: Download distribution tar
with:
name: rocketmq
Expand All @@ -110,7 +110,7 @@ jobs:
mkdir versionlist
touch versionlist/"${version}-`echo ${{ matrix.base-image }} | sed -e "s/:/-/g"`"
sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} ${DOCKER_REPO}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload distribution tar
with:
name: versionlist
Expand All @@ -125,7 +125,7 @@ jobs:
outputs:
version-json: ${{ steps.show_versions.outputs.version-json }}
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
name: Download versionlist
with:
name: versionlist
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand Down
2 changes: 1 addition & 1 deletion acl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-all</artifactId>
<version>5.3.1-SNAPSHOT</version>
<version>5.3.2-SNAPSHOT</version>
</parent>
<artifactId>rocketmq-acl</artifactId>
<name>rocketmq-acl ${project.version}</name>
Expand Down
2 changes: 1 addition & 1 deletion auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-all</artifactId>
<version>5.3.1-SNAPSHOT</version>
<version>5.3.2-SNAPSHOT</version>
</parent>
<artifactId>rocketmq-auth</artifactId>
<name>rocketmq-auth ${project.version}</name>
Expand Down
Loading

0 comments on commit f6bfa38

Please sign in to comment.