github-actions[bot] commented on code in PR #63647:
URL: https://github.com/apache/doris/pull/63647#discussion_r3339771831


##########
run-fe-ut.sh:
##########
@@ -84,6 +94,74 @@ else
     done
 fi
 
+# Try fast incremental compilation using tools/fast-compile-fe.sh.
+# Returns 0 on success, 1 if fallback to full build is needed.
+try_fast_compile() {
+    local fe_core="${DORIS_HOME}/fe/fe-core"
+    local target_classes="$fe_core/target/classes"

Review Comment:
   The fast path only inspects `fe/fe-core`, so changes in other FE modules can 
be tested against stale artifacts. For example, after editing 
`fe/fe-filesystem/fe-filesystem-s3/src/main/java/...`, `try_fast_compile` still 
succeeds because `main_src` and `test_src` point only at `fe-core`; then Maven 
is run with `surefire:test` instead of the normal reactor `test` phase, so that 
module is neither recompiled nor tested. `run-fe-ut.sh` previously covered the 
whole FE reactor, and the new option should either detect non-`fe-core` changes 
and fall back to the full build, or support incremental compilation for the 
affected modules.



##########
run-fe-ut.sh:
##########
@@ -107,22 +185,44 @@ if [[ -z "${FE_UT_PARALLEL}" ]]; then
 fi
 echo "Unit test parallel is: ${FE_UT_PARALLEL}"
 
+# Decide whether to use fast compile or full build.
+# Coverage mode requires lifecycle phases for jacoco agent setup, so always 
use full build.
+if [[ "${FAST_COMPILE}" -eq 1 ]]; then
+    if [[ "${COVERAGE}" -eq 1 ]]; then
+        echo "--fast-compile is incompatible with --coverage, will use full 
build"
+        MVN_GOAL="test"
+        MVN_OPTS=""
+    elif try_fast_compile; then
+        MVN_GOAL="surefire:test"
+        # Only test fe-core (the module fast-compile-fe.sh just compiled).
+        # Running from fe/ would trigger the full reactor including modules
+        # like hadoop-hudi-scanner, causing unnecessary downloads and builds.
+        MVN_OPTS="-pl fe-core"
+    else

Review Comment:
   This changes `run-fe-ut.sh --fast-compile --run ...` to execute only the 
`fe-core` module. FE has many tests outside `fe-core` (for example 
`fe/fe-filesystem/fe-filesystem-s3/src/test/java/org/apache/doris/filesystem/s3/S3ObjStorageTest.java`).
 With this `-pl fe-core` restriction, running such a test through the new 
option will not execute the module that owns it, whereas the existing non-fast 
command runs the reactor and can find it. Please keep the fast path from 
silently skipping non-`fe-core` FE tests, e.g. by falling back to the full 
reactor when the requested test is not under `fe-core`, or by selecting the 
owning module.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to