# 🔍 Description ## Issue References 🔗 This pull request fixes #5941 ## Describe Your Solution 🔧 Originally aims to support Spark On Kubernetes Shuffle Data Clean, limitations became more and more apparent over time, so let's drop this. ## Types of changes 🔖 - [ ] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests --- # Checklist 📝 - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes #5942 from zwangsheng/KYUUBI#5941. Closes #5941 23bf14f37 [Cheng Pan] Update docs/tools/spark_block_cleaner.md 1c3350186 [zwangsheng] fix comment 0bdbb1104 [zwangsheng] nit 0a5aa2bfa [zwangsheng] fix comments Lead-authored-by: zwangsheng <binjieyang@apache.org> Co-authored-by: Cheng Pan <pan3793@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
146 lines
5.8 KiB
YAML
146 lines
5.8 KiB
YAML
#
|
|
# 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: Style
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- branch-*
|
|
|
|
concurrency:
|
|
group: linter-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
linter:
|
|
name: Style check
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
matrix:
|
|
profiles:
|
|
- '-Pflink-provided,hive-provided,spark-provided,spark-3.5,spark-3.4,spark-3.3,spark-3.2,tpcds,kubernetes-it'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup JDK 8
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 8
|
|
cache: 'maven'
|
|
check-latest: false
|
|
- name: Setup Maven
|
|
uses: ./.github/actions/setup-maven
|
|
- name: Setup Python 3
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.9'
|
|
cache: 'pip'
|
|
- name: Check kyuubi modules avaliable
|
|
id: modules-check
|
|
run: build/mvn dependency:resolve -DincludeGroupIds="org.apache.kyuubi" -DincludeScope="compile" -DexcludeTransitive=true ${{ matrix.profiles }}
|
|
continue-on-error: true
|
|
|
|
- name: Install
|
|
# When a continue-on-error step fails, the outcome is failure, but the final conclusion is success.
|
|
# for more details, please visit: https://github.com/actions/toolkit/issues/399#issuecomment-666147717
|
|
if: steps.modules-check.conclusion == 'success' && steps.modules-check.outcome == 'failure'
|
|
run: |
|
|
MVN_OPT="-DskipTests -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -Dmaven.javadoc.skip=true -Drat.skip=true -Dscalastyle.skip=true -Dspotless.check.skip"
|
|
build/mvn clean install ${MVN_OPT} -Pflink-provided,hive-provided,spark-provided,spark-3.2,tpcds
|
|
build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-extension-spark-3-1 -Pspark-3.1
|
|
build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-extension-spark-3-3,extensions/spark/kyuubi-spark-connector-hive -Pspark-3.3
|
|
build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-extension-spark-3-4 -Pspark-3.4
|
|
build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-extension-spark-3-5 -Pspark-3.5
|
|
|
|
- name: Scalastyle with maven
|
|
id: scalastyle-check
|
|
# Check with Spark 3.1 profile separately as it use Iceberg 1.3.1 which is not compatible with Spark 3.5+
|
|
run: |
|
|
build/mvn scalastyle:check ${{ matrix.profiles }}
|
|
build/mvn scalastyle:check -Pflink-provided,hive-provided,spark-provided,spark-3.1
|
|
- name: Print scalastyle error report
|
|
if: failure() && steps.scalastyle-check.outcome != 'success'
|
|
run: >-
|
|
for log in `find * -name "scalastyle-output.xml"`;
|
|
do
|
|
if grep -q "error" $log; then
|
|
cat $log;
|
|
fi
|
|
done
|
|
- name: Spotless style check
|
|
run: |
|
|
SPOTLESS_BLACK_VERSION=$(build/mvn help:evaluate -Dexpression=spotless.python.black.version -q -DforceStdout)
|
|
pip install black==$SPOTLESS_BLACK_VERSION
|
|
build/mvn spotless:check ${{ matrix.profiles }} -Pspotless-python,spark-3.1
|
|
- name: setup npm
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
- name: Web UI Style with node
|
|
run: |
|
|
cd ./kyuubi-server/web-ui
|
|
npm install pnpm@8 -g
|
|
pnpm install
|
|
pnpm run lint
|
|
echo "---------------------------------------Notice------------------------------------"
|
|
echo "If this style check fail, you should follow these commands for a tentative fix"
|
|
echo "* cd ./kyuubi-server/web-ui"
|
|
echo "* npm run lint-fix"
|
|
echo "Following the above steps can solve many style problems. "
|
|
echo "If there is a problem that cannot be fixed by the command, "
|
|
echo "you need to manually fix it by following the information told by the command above"
|
|
echo "---------------------------------------------------------------------------------"
|
|
|
|
shellcheck:
|
|
name: Super Linter and Shellcheck
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Super Linter Checks
|
|
uses: github/super-linter/slim@v5
|
|
env:
|
|
CREATE_LOG_FILE: true
|
|
ERROR_ON_MISSING_EXEC_BIT: true
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
IGNORE_GENERATED_FILES: true
|
|
IGNORE_GITIGNORED_FILES: true
|
|
LINTER_RULES_PATH: /
|
|
LOG_LEVEL: NOTICE
|
|
SUPPRESS_POSSUM: true
|
|
VALIDATE_BASH_EXEC: true
|
|
VALIDATE_ENV: true
|
|
VALIDATE_JSONC: true
|
|
VALIDATE_POWERSHELL: true
|
|
VALIDATE_XML: true
|
|
- name: Upload Super Linter logs
|
|
if: failure()
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: super-linter-log
|
|
path: super-linter.log
|
|
- name: check bin directory
|
|
uses: ludeeus/action-shellcheck@1.1.0
|
|
with:
|
|
# TODO: enable for all folders step by step
|
|
scandir: './bin'
|
|
severity: error
|