Skip to content

Periodically expire temp files and operation logs on server to avoid memeory leak by Files.deleteOnExit #13080

Periodically expire temp files and operation logs on server to avoid memeory leak by Files.deleteOnExit

Periodically expire temp files and operation logs on server to avoid memeory leak by Files.deleteOnExit #13080

Workflow file for this run

#
# 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,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,tpcds
build/mvn clean install ${MVN_OPT} -pl extensions/spark/kyuubi-extension-spark-3-3 -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,extensions/spark/kyuubi-spark-connector-hive -Pspark-3.5
- name: Scalastyle with maven
id: scalastyle-check
run: |
build/mvn scalastyle:check ${{ matrix.profiles }}
- 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
- 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 "---------------------------------------------------------------------------------"
- 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