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

snuyanzin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/master by this push:
     new cc5f0540c6b [FLINK-41276][ci] Run the License task in parallel and 
regroup its log so the license checks still work
cc5f0540c6b is described below

commit cc5f0540c6b259f545affff2a08b094439c9f5e1
Author: Sergey Nuyanzin <[email protected]>
AuthorDate: Fri Oct 30 18:21:11 2026 +0100

    [FLINK-41276][ci] Run the License task in parallel and regroup its log so 
the license checks still work
---
 tools/ci/compile.sh | 38 ++++++++++++++++++++++++++++----------
 1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/tools/ci/compile.sh b/tools/ci/compile.sh
index 2ca9a0afad9..201df3f4215 100755
--- a/tools/ci/compile.sh
+++ b/tools/ci/compile.sh
@@ -60,20 +60,38 @@ EXIT_CODE=0
 
 # Maven QA-check args: dependency convergence, the deploy that stages jars for 
the license check, and the shade DEBUG log the bundled-optional check parses. 
Default runs full QA; the fast compile job and e2e pass 
MVN_LICENSE_CHECK_ARGS="" to build only (QA runs in the license_check job). 
Non-empty also enables the structural QA + license blocks below.
 MVN_LICENSE_CHECK_ARGS="${MVN_LICENSE_CHECK_ARGS-deploy 
-DaltDeploymentRepository=validation_repository::default::file:$MVN_VALIDATION_DIR
 -Dflink.convergence.phase=install -Pcheck-convergence 
-Dorg.slf4j.simpleLogger.log.org.apache.maven.plugins.shade=DEBUG}"
+MVN_COMPILE_THREADS="${MVN_COMPILE_THREADS:-1C}"
+
 if [[ -n "$MVN_LICENSE_CHECK_ARGS" ]]; then
-    BUILD_GOAL_ARGS="$MVN_LICENSE_CHECK_ARGS"
-    MVN_COMPILE_THREADS="${MVN_COMPILE_THREADS:-1}"
+    # Our output parsers (bundled-optional/shade/deploy) need each module's 
plugin output contiguous.
+    # Log the thread name, then regroup the multi-threaded output per thread 
(a thread builds one module at a time) and drop the thread name again.
+    MVN_RAW_OUT="/tmp/clean_compile_raw.out"
+    $MVN clean ${MVN_LICENSE_CHECK_ARGS} 
-Dorg.slf4j.simpleLogger.showThreadName=true \
+        -Dmaven.javadoc.skip=true -U -DskipTests "${@}" 
-T${MVN_COMPILE_THREADS} | tee $MVN_RAW_OUT
+    EXIT_CODE=${PIPESTATUS[0]}
+    awk '
+        # Unprefixed lines go to a separate group so they cannot split another 
thread'"'"'s plugin block.
+        { thread = "" }
+        match($0, /^([0-9:.]+ )?\[[^]]*\] \[/) {
+            prefix = substr($0, 1, RLENGTH - 1)
+            thread = substr(prefix, index(prefix, "[") + 1)
+            sub(/\] $/, "", thread)
+            $0 = substr(prefix, 1, index(prefix, "[") - 1) substr($0, RLENGTH)
+        }
+        {
+            if (!(thread in count)) { order[++threads] = thread; count[thread] 
= 0 }
+            lines[thread, ++count[thread]] = $0
+        }
+        END {
+            for (t = 1; t <= threads; t++)
+                for (i = 1; i <= count[order[t]]; i++) print lines[order[t], i]
+        }' $MVN_RAW_OUT > $MVN_CLEAN_COMPILE_OUT || [ $EXIT_CODE != 0 ] || { 
echo "Regrouping Maven output failed."; exit 1; }
 else
-    BUILD_GOAL_ARGS="install"
-    MVN_COMPILE_THREADS="${MVN_COMPILE_THREADS:-1C}"
+    $MVN clean install \
+        -Dmaven.javadoc.skip=true -U -DskipTests "${@}" 
-T${MVN_COMPILE_THREADS} | tee $MVN_CLEAN_COMPILE_OUT
+    EXIT_CODE=${PIPESTATUS[0]}
 fi
 
-# Default -T1 because our output parsers (bundled-optional/shade) don't 
support multi-threaded builds; the fast compile job sets MVN_COMPILE_THREADS=1C 
together with MVN_LICENSE_CHECK_ARGS="" so those parsing checks are skipped.
-$MVN clean ${BUILD_GOAL_ARGS} \
-    -Dmaven.javadoc.skip=true -U -DskipTests "${@}" -T${MVN_COMPILE_THREADS} | 
tee $MVN_CLEAN_COMPILE_OUT
-
-EXIT_CODE=${PIPESTATUS[0]}
-
 if [ $EXIT_CODE != 0 ]; then
     echo 
"=============================================================================="
     echo "Compiling Flink failed."

Reply via email to