Loading .github/workflows/SonarCloud.ymldeleted 100644 → 0 +0 −51 Original line number Diff line number Diff line # # 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: SonarCloud on: [push, pull_request] jobs: sonarCloudTrigger: name: SonarCloud Trigger runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: java-version: 8 - uses: actions/cache@v1 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-sonarqube restore-keys: | ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-sonarqube ${{ runner.os }}-maven- - name: Maven clean run: mvn clean - name: Run SonarCloud analyse run: > mvn clean --batch-mode org.jacoco:jacoco-maven-plugin:prepare-agent verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dmaven.test.skip=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache-dolphinscheduler -Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} .github/workflows/ci_ut.yml +12 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,18 @@ jobs: export MAVEN_OPTS='-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g' mvn test -Dmaven.test.skip=false cobertura:cobertura CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash) - name: Run SonarCloud analysis run: > mvn clean --batch-mode verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.1.1688:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache-dolphinscheduler -Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Collect logs run: | mkdir -p ${LOG_DIR} Loading dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/MonitorService.java +6 −14 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import static org.apache.dolphinscheduler.common.utils.Preconditions.*; /** * monitor service */ Loading Loading @@ -116,20 +118,10 @@ public class MonitorService extends BaseService{ } public List<Server> getServerListFromZK(boolean isMaster){ List<Server> servers = new ArrayList<>(); ZookeeperMonitor zookeeperMonitor = null; try{ zookeeperMonitor = new ZookeeperMonitor(); checkNotNull(zookeeperMonitor); ZKNodeType zkNodeType = isMaster ? ZKNodeType.MASTER : ZKNodeType.WORKER; servers = zookeeperMonitor.getServersList(zkNodeType); }catch (Exception e){ throw e; }finally { if(zookeeperMonitor != null){ zookeeperMonitor.close(); } } return servers; return zookeeperMonitor.getServersList(zkNodeType); } } dolphinscheduler-common/pom.xml +0 −5 Original line number Diff line number Diff line Loading @@ -330,11 +330,6 @@ </exclusions> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> Loading dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/ClickHouseDataSource.java +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ */ package org.apache.dolphinscheduler.common.job.db; import org.apache.commons.lang3.StringUtils; import org.apache.dolphinscheduler.common.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Loading Loading
.github/workflows/SonarCloud.ymldeleted 100644 → 0 +0 −51 Original line number Diff line number Diff line # # 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: SonarCloud on: [push, pull_request] jobs: sonarCloudTrigger: name: SonarCloud Trigger runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions/setup-java@v1 with: java-version: 8 - uses: actions/cache@v1 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-sonarqube restore-keys: | ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-sonarqube ${{ runner.os }}-maven- - name: Maven clean run: mvn clean - name: Run SonarCloud analyse run: > mvn clean --batch-mode org.jacoco:jacoco-maven-plugin:prepare-agent verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dmaven.test.skip=true -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache-dolphinscheduler -Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
.github/workflows/ci_ut.yml +12 −0 Original line number Diff line number Diff line Loading @@ -49,6 +49,18 @@ jobs: export MAVEN_OPTS='-Dmaven.repo.local=.m2/repository -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g' mvn test -Dmaven.test.skip=false cobertura:cobertura CODECOV_TOKEN="09c2663f-b091-4258-8a47-c981827eb29a" bash <(curl -s https://codecov.io/bash) - name: Run SonarCloud analysis run: > mvn clean --batch-mode verify org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.1.1688:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=apache -Dsonar.projectKey=apache-dolphinscheduler -Dsonar.login=e4058004bc6be89decf558ac819aa1ecbee57682 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - name: Collect logs run: | mkdir -p ${LOG_DIR} Loading
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/MonitorService.java +6 −14 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import static org.apache.dolphinscheduler.common.utils.Preconditions.*; /** * monitor service */ Loading Loading @@ -116,20 +118,10 @@ public class MonitorService extends BaseService{ } public List<Server> getServerListFromZK(boolean isMaster){ List<Server> servers = new ArrayList<>(); ZookeeperMonitor zookeeperMonitor = null; try{ zookeeperMonitor = new ZookeeperMonitor(); checkNotNull(zookeeperMonitor); ZKNodeType zkNodeType = isMaster ? ZKNodeType.MASTER : ZKNodeType.WORKER; servers = zookeeperMonitor.getServersList(zkNodeType); }catch (Exception e){ throw e; }finally { if(zookeeperMonitor != null){ zookeeperMonitor.close(); } } return servers; return zookeeperMonitor.getServersList(zkNodeType); } }
dolphinscheduler-common/pom.xml +0 −5 Original line number Diff line number Diff line Loading @@ -330,11 +330,6 @@ </exclusions> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> Loading
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/job/db/ClickHouseDataSource.java +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ */ package org.apache.dolphinscheduler.common.job.db; import org.apache.commons.lang3.StringUtils; import org.apache.dolphinscheduler.common.utils.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; Loading