From 0f8fc5564adafe250795bd3ad918f9cbf4aef6c2 Mon Sep 17 00:00:00 2001 From: andyziye <108652123+andyziye@users.noreply.github.com> Date: Wed, 26 Feb 2025 16:10:43 +0800 Subject: [PATCH] [Tool] Fixed oom in sonarcloud check (#56284) --- .github/workflows/ci-merged-sonarcloud-fe.yml | 7 ++++++- .github/workflows/ci-pipeline-branch.yml | 7 ++++++- .github/workflows/ci-pipeline.yml | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-merged-sonarcloud-fe.yml b/.github/workflows/ci-merged-sonarcloud-fe.yml index 586ddd10b07681..1381a0ca211060 100644 --- a/.github/workflows/ci-merged-sonarcloud-fe.yml +++ b/.github/workflows/ci-merged-sonarcloud-fe.yml @@ -12,6 +12,7 @@ jobs: sonarcloud-fe: runs-on: ubuntu-latest if: github.repository == 'StarRocks/starrocks' + timeout-minutes: 60 steps: - name: clean run: | @@ -71,4 +72,8 @@ jobs: mkdir -p thirdparty/installed/bin/ cd thirdparty/installed/bin/ && ln -s /usr/local/bin/thrift thrift cd ${{ github.workspace }}/fe - mvn -B -DskipTests verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=StarRocks_starrocks -Dsonar.pullrequest.key=${{ github.event.number }} -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.branch=${{ github.head_ref }} + export SONAR_SCANNER_OPTS="-Xms3072m -Xmx12288m" + export MAVEN_OPTS="-Xms3072m -Xmx12288m" + mvn -B -DskipTests verify org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar \ + -Dsonar.projectKey=StarRocks_starrocks -Dsonar.pullrequest.key=${{ github.event.number }} \ + -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.branch=${{ github.head_ref }} diff --git a/.github/workflows/ci-pipeline-branch.yml b/.github/workflows/ci-pipeline-branch.yml index 3d245977e3b432..003074ee1a6968 100644 --- a/.github/workflows/ci-pipeline-branch.yml +++ b/.github/workflows/ci-pipeline-branch.yml @@ -346,6 +346,7 @@ jobs: needs: fe-checker if: needs.fe-checker.outputs.output1 == 'true' && github.repository == 'StarRocks/starrocks' name: FE Sonarcloud Check + timeout-minutes: 60 env: PR_NUMBER: ${{ github.event.number }} CODE_PATH: ${{ github.workspace }} @@ -418,7 +419,11 @@ jobs: mkdir -p thirdparty/installed/bin/ cd thirdparty/installed/bin/ && ln -s /usr/local/bin/thrift thrift cd ${{ github.workspace }}/fe - mvn -B -DskipTests verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=StarRocks_starrocks -Dsonar.pullrequest.key=${{ github.event.number }} -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.branch=${{ github.head_ref }} + export SONAR_SCANNER_OPTS="-Xms3072m -Xmx12288m" + export MAVEN_OPTS="-Xms3072m -Xmx12288m" + mvn -B -DskipTests verify org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar \ + -Dsonar.projectKey=StarRocks_starrocks -Dsonar.pullrequest.key=${{ github.event.number }} \ + -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.branch=${{ github.head_ref }} fe-ut: runs-on: [self-hosted, normal] diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 4d085f905d5942..c5795119477f1b 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -441,6 +441,7 @@ jobs: needs: fe-checker if: needs.fe-checker.outputs.src_filter == 'true' && github.repository == 'StarRocks/starrocks' name: FE Sonarcloud Check + timeout-minutes: 60 env: PR_NUMBER: ${{ github.event.number }} CODE_PATH: ${{ github.workspace }} @@ -513,7 +514,11 @@ jobs: mkdir -p thirdparty/installed/bin/ cd thirdparty/installed/bin/ && ln -s /usr/local/bin/thrift thrift cd ${{ github.workspace }}/fe - mvn -B -DskipTests verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=StarRocks_starrocks -Dsonar.pullrequest.key=${{ github.event.number }} -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.branch=${{ github.head_ref }} + export SONAR_SCANNER_OPTS="-Xms3072m -Xmx12288m" + export MAVEN_OPTS="-Xms3072m -Xmx12288m" + mvn -B -DskipTests verify org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar \ + -Dsonar.projectKey=StarRocks_starrocks -Dsonar.pullrequest.key=${{ github.event.number }} \ + -Dsonar.pullrequest.base=${{ github.base_ref }} -Dsonar.pullrequest.branch=${{ github.head_ref }} fe-ut: runs-on: [self-hosted, normal]