Skip to content

Commit 5fab9b7

Browse files
committed
[KYUUBI #4274] [FOLLOWUP] Increase maximum degree of concurrency for mvnd in CI jobs
### _Why are the changes needed?_ - concurrent execution and smart builder is shipped with `mvnd`, but the CI log shows they are not activated - increase maximum degree of concurrency and utilize `SmartBuilder` feature in `mvnd`. `-Dmvnd.minThreads` is set as fallback and it will be ignored if `--threads` or `-Dmvnd.threads` is used. #### Before: (https://github.com/apache/kyuubi/actions/runs/4276652363/jobs/7444896450#step:6:64) ``` [INFO] Build maximum degree of concurrency is 1 ``` #### After: (https://github.com/apache/kyuubi/actions/runs/4279322563/jobs/7449912132#step:8:64) ``` [INFO] Using the SmartBuilder implementation with a thread count of 4 [INFO] Build maximum degree of concurrency is 4 ``` (https://github.com/apache/kyuubi/actions/runs/4279322563/jobs/7449912132#step:8:553) ``` [INFO] Segment walltime 13 s, segment projects service time 36 s, effective/maximum degree of concurrency 2.63/4 ``` ### _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/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4420 from bowenliang123/mvnd-smart. Closes #4274 64f0cc5 [liangbowen] update 391da26 [liangbowen] quite in dep and style jobs c776356 [liangbowen] use -Dmvnd.minThreads d10bfb7 [liangbowen] use -Dmvnd.minThreads f793d2b [liangbowen] warn bbb929f [liangbowen] quiet a5e6d49 [liangbowen] logging warn level 3cfbaad [liangbowen] enable quite option and cancel redirect stderr 09442ff [liangbowen] update ca5f855 [liangbowen] try to redirect stderr 0ebdd18 [liangbowen] set completion and print MAVEN_CLI_OPTS d3b2c96 [liangbowen] revert explicitly setting `mvnd.noBuffering` e2eca01 [liangbowen] revert explicitly setting `mvnd.noBuffering` dba25e3 [liangbowen] explicitly set `mvnd.noBuffering` to false prevent displaying events continuously b7583f9 [liangbowen] shell d60ebd0 [liangbowen] change mvnd cache key 2cc576e [liangbowen] dep bbd6414 [liangbowen] move multithread setting to mvnd's MAVEN_CLI_OPTS 347b58c [liangbowen] increase concurrency for spotless check 15c5519 [liangbowen] increase concurrency Authored-by: liangbowen <liangbowen@gf.com.cn> Signed-off-by: liangbowen <liangbowen@gf.com.cn>
1 parent efbaaff commit 5fab9b7

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

.github/actions/setup-mvnd/action.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
name: 'setup-mvnd'
1919
description: 'Setup the maven daemon'
20+
continue-on-error: true
2021
runs:
2122
using: composite
2223
steps:
@@ -26,7 +27,10 @@ runs:
2627
path: |
2728
build/maven-mvnd-*
2829
build/apache-maven-*
29-
key: setup-mvnd-${{ runner.os }}-mvnd
30+
key: setup-mvnd-${{ runner.os }}
31+
- name: Check Maven
32+
run: build/mvn -v
33+
shell: bash
3034
- name: Check Mvnd
3135
run: build/mvnd -v
3236
shell: bash

.github/workflows/dep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Check kyuubi modules available
5151
id: modules-check
5252
run: >-
53-
build/mvnd dependency:resolve validate
53+
build/mvnd dependency:resolve validate -q
5454
-DincludeGroupIds="org.apache.kyuubi" -DincludeScope="compile"
5555
-Pfast -Denforcer.skip=false
5656
-pl kyuubi-ctl,kyuubi-server,kyuubi-assembly -am

.github/workflows/style.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
cache: 'pip'
5555
- name: Check kyuubi modules available
5656
id: modules-check
57-
run: build/mvnd dependency:resolve -DincludeGroupIds="org.apache.kyuubi" -DincludeScope="compile" -DexcludeTransitive=true ${{ matrix.profiles }}
57+
run: build/mvnd dependency:resolve -DincludeGroupIds="org.apache.kyuubi" -DincludeScope="compile" -DexcludeTransitive=true -q ${{ matrix.profiles }}
5858
continue-on-error: true
5959

6060
- name: Install
@@ -69,7 +69,7 @@ jobs:
6969
7070
- name: Scalastyle with maven
7171
id: scalastyle-check
72-
run: build/mvnd scalastyle:check ${{ matrix.profiles }}
72+
run: build/mvnd scalastyle:check -q ${{ matrix.profiles }}
7373
- name: Print scalastyle error report
7474
if: failure() && steps.scalastyle-check.outcome != 'success'
7575
run: >-
@@ -83,7 +83,7 @@ jobs:
8383
run: |
8484
SPOTLESS_BLACK_VERSION=$(build/mvn help:evaluate -Dexpression=spotless.python.black.version -q -DforceStdout)
8585
pip install black==$SPOTLESS_BLACK_VERSION
86-
build/mvnd spotless:check ${{ matrix.profiles }} -Pspotless-python
86+
build/mvnd spotless:check -q ${{ matrix.profiles }} -Pspotless-python
8787
- name: setup npm
8888
uses: actions/setup-node@v3
8989
with:

build/mvnd

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ _CALLING_DIR="$(pwd)"
2525
_COMPILE_JVM_OPTS="-Xms2g -Xmx2g -XX:ReservedCodeCacheSize=1g -Xss128m"
2626

2727
if [ "$CI" ]; then
28-
export MAVEN_CLI_OPTS="--no-transfer-progress --errors --fail-fast"
28+
export MAVEN_CLI_OPTS="-Dmvnd.minThreads=8 --no-transfer-progress --errors --fail-fast -Dstyle.color=always"
2929
fi
3030

3131
# Installs any application tarball given a URL, the expected tarball name,
@@ -131,4 +131,9 @@ cd "${_CALLING_DIR}"
131131
export MAVEN_OPTS=${MAVEN_OPTS:-"$_COMPILE_JVM_OPTS"}
132132

133133
echo "Using \`mvnd\` from path: $MVND_BIN" 1>&2
134+
135+
if [ "$MAVEN_CLI_OPTS" != "" ]; then
136+
echo "MAVEN_CLI_OPTS=$MAVEN_CLI_OPTS"
137+
fi
138+
134139
${MVND_BIN} $MAVEN_CLI_OPTS "$@"

0 commit comments

Comments
 (0)