You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ya...@apache.org on 2022/01/11 07:12:34 UTC

[incubator-kyuubi] branch master updated: [KYUUBI #1720] Extract scalastyle workflow to a single yml and disable it in other jobs

This is an automated email from the ASF dual-hosted git repository.

yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new 6411888  [KYUUBI #1720] Extract scalastyle workflow to a single yml and disable it in other jobs
6411888 is described below

commit 64118881aa95499f6c1cd27417f26e3c8a2fa248
Author: Kent Yao <ya...@apache.org>
AuthorDate: Tue Jan 11 15:12:23 2022 +0800

    [KYUUBI #1720] Extract scalastyle workflow to a single yml and disable it in other jobs
    
    <!--
    Thanks for sending a pull request!
    
    Here are some tips for you:
      1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
      2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
      3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
    -->
    
    ### _Why are the changes needed?_
    <!--
    Please clarify why the changes are needed. For instance,
      1. If you add a feature, you can talk about the use case of it.
      2. If you fix a bug, you can clarify why it is a bug.
    -->
    
    quick fail on style issue and reduce ga overhead
    
    ### _How was this patch tested?_
    - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
    
    - [ ] Add screenshots for manual tests if appropriate
    
    - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request
    
    ```
    =========dev/kyuubi-tpcds/target/scalastyle-output.xml=========
    =========dev/kyuubi-extension-spark-3-1/target/scalastyle-output.xml=========
    =========dev/kyuubi-extension-spark-common/target/scalastyle-output.xml=========
    =========dev/kyuubi-extension-spark-3-2/target/scalastyle-output.xml=========
    =========externals/kyuubi-download/target/scalastyle-output.xml=========
    =========externals/kyuubi-trino-engine/target/scalastyle-output.xml=========
    =========externals/kyuubi-spark-sql-engine/target/scalastyle-output.xml=========
    =========externals/kyuubi-flink-sql-engine/target/scalastyle-output.xml=========
    =========kubernetes/integration-tests/target/scalastyle-output.xml=========
    =========kyuubi-assembly/target/scalastyle-output.xml=========
    =========kyuubi-common/target/scalastyle-output.xml=========
      <error line="22" source="org.scalastyle.file.FileLineLengthChecker" severity="error" message="File line length exceeds 100 characters"/>
    =========kyuubi-ctl/target/scalastyle-output.xml=========
    =========kyuubi-ha/target/scalastyle-output.xml=========
    =========kyuubi-metrics/target/scalastyle-output.xml=========
    =========kyuubi-server/target/scalastyle-output.xml=========
    =========kyuubi-zookeeper/target/scalastyle-output.xml=========
    =========target/scalastyle-output.xml=========
    =========tools/spark-block-cleaner/target/scalastyle-output.xml=========
    
    ```
    
    Closes #1720 from yaooqinn/style.
    
    Closes #1720
    
    36ca3983 [Kent Yao] Extract scalastyle workflow to a single yml and disable it in other jobs
    d83b8077 [Kent Yao] Extract scalastyle workflow to a single yml and disable it in other jobs
    7366ca85 [Kent Yao] Extract scalastyle workflow to a single yml and disable it in other jobs
    a0b44e26 [Kent Yao] Extract scalastyle workflow to a single yml and disable it in other jobs
    
    Authored-by: Kent Yao <ya...@apache.org>
    Signed-off-by: Kent Yao <ya...@apache.org>
---
 .github/workflows/master.yml |  6 +++---
 .github/workflows/style.yml  | 44 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml
index a4ec82d..44f9952 100644
--- a/.github/workflows/master.yml
+++ b/.github/workflows/master.yml
@@ -76,7 +76,7 @@ jobs:
             ${{ runner.os }}-maven-io-
       - name: Build with Maven
         run: >-
-          ./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -V
+          ./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -V
           -Pspark-${{ matrix.spark }} -Pspark-hadoop-${{ matrix.spark-hadoop }} ${{ matrix.profiles }}
       - name: Code coverage
         if: ${{ matrix.codecov == 'true' }}
@@ -135,7 +135,7 @@ jobs:
             ${{ runner.os }}-maven-io-
       - name: Run TPC-DS Tests
         run: >-
-          ./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -V
+          ./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -V
           -pl kyuubi-server -am
           -Pspark-3.1
           -Dmaven.plugin.scalatest.exclude.tags=''
@@ -176,7 +176,7 @@ jobs:
         run: kubectl get pods
       - name: integration tests
         run: >-
-          ./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -V
+          ./build/mvn clean install -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -V
           -pl kubernetes/integration-tests -am
           -Pkubernetes
           -Dtest=none -DwildcardSuites=org.apache.kyuubi.kubernetes.test
diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml
new file mode 100644
index 0000000..eb423fd
--- /dev/null
+++ b/.github/workflows/style.yml
@@ -0,0 +1,44 @@
+name: Style check
+
+#
+# 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.
+#
+
+# This GitHub workflow checks Apache License v2.0 Header is added if needed
+
+
+on:
+  pull_request:
+    branches:
+      - master
+      - branch-*
+
+jobs:
+  lint-scala:
+    name: Scala style check
+    runs-on: ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+      - name: Setup JDK 8
+        uses: actions/setup-java@v2
+        with:
+          distribution: zulu
+          java-version: 8
+      - name: Scalastyle with Maven
+        run: build/mvn scalastyle:check -Ptpcds -Pspark-block-cleaner -Pkubernetes -Pspark-3.1 -Pspark-3.2
+      - name: Upload scalastyle report
+        if: failure()
+        run: for log in `find * -name "scalastyle-output.xml"`;  do echo "=========$log========="; grep "error" $log; done