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

asf-gitbox-commits pushed a commit to branch UNOMI-979-scheduler-lock-lease
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/UNOMI-979-scheduler-lock-lease 
by this push:
     new 8d3fe677c UNOMI-979: Skip Javadoc validation in the integration-test 
CI jobs
8d3fe677c is described below

commit 8d3fe677c947dc0d97a5e4d875cc9031c38619a5
Author: Serge Huber <[email protected]>
AuthorDate: Mon Aug 17 20:24:53 2026 +0200

    UNOMI-979: Skip Javadoc validation in the integration-test CI jobs
    
    --ci turns on Javadoc validation, which adds two extra full-reactor Maven
    invocations after the build: javadoc:javadoc and javadoc-tags-warn
    checkstyle:check. Measured on CI they cost 1.5 and 0.3 minutes. The
    integration-test job is gated on `needs: unit-tests`, so both have already
    passed on the same commit by the time it starts, and with max-parallel: 1 
the
    two legs pay for the duplication one after the other.
    
    Adds --no-javadoc to build.sh and uses it in both legs. The flag is applied 
as
    an explicit veto after argument parsing, so it wins over --ci regardless of 
the
    order the two appear in; verified for --ci --no-javadoc and --no-javadoc 
--ci.
    
    Together with the unit-test skip in the previous commit, the CI breakdown 
for
    the 10-minute unit-test step was: mvn clean 0.1, mvn install (build + unit
    tests) 7.6, javadoc 1.5, checkstyle 0.3. Summed surefire execution across 
the
    reactor was 3.0 minutes. Each IT leg should therefore drop roughly 5 
minutes,
    and since the legs run sequentially that is about 10 minutes off the total.
    
    Javadoc regressions still fail the build: they fail it in the unit-test job,
    where doclint errors are meant to be caught.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
---
 .github/workflows/unomi-ci-build-tests.yml | 16 ++++++++++------
 build.sh                                   | 14 ++++++++++++++
 2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/unomi-ci-build-tests.yml 
b/.github/workflows/unomi-ci-build-tests.yml
index febf15c73..07f2f5858 100644
--- a/.github/workflows/unomi-ci-build-tests.yml
+++ b/.github/workflows/unomi-ci-build-tests.yml
@@ -143,15 +143,19 @@ jobs:
           MAVEN_EXTRA_OPTS: >-
             -Dopensearch.port=${{ matrix.port }}
             -Delasticsearch.port=${{ matrix.port }}
-        # --skip-unit-tests: the unit-tests job above already ran them on this 
same commit, and
-        # both IT legs would otherwise run the whole suite a second and third 
time before getting
-        # to the integration tests they exist for. The flag activates the 
skip-unit-tests profile,
-        # which sets surefire's skip only -- failsafe, and therefore the ITs, 
still run.
+        # This job is gated on `needs: unit-tests`, so the unit suite and the 
Javadoc/checkstyle
+        # validation have already passed on this exact commit. Re-running 
either here is pure
+        # duplication before the integration tests this job exists for, and 
the legs run
+        # sequentially (max-parallel: 1), so it costs twice over.
+        #   --skip-unit-tests activates the skip-unit-tests profile, which 
sets surefire's skip
+        #     only: failsafe, and therefore the ITs, still run.
+        #   --no-javadoc drops the two extra full-reactor invocations --ci adds
+        #     (javadoc:javadoc and javadoc-tags-warn checkstyle:check).
         run: |
           if [ "${{ matrix.search-engine }}" = "opensearch" ]; then
-            ./build.sh --ci --integration-tests --skip-unit-tests 
--use-opensearch
+            ./build.sh --ci --integration-tests --skip-unit-tests --no-javadoc 
--use-opensearch
           else
-            ./build.sh --ci --integration-tests --skip-unit-tests
+            ./build.sh --ci --integration-tests --skip-unit-tests --no-javadoc
           fi
       # Keep only third-party dependencies in the post-job Maven cache: 
Unomi's own
       # snapshots are rebuilt every run and would only bloat the cache / risk 
staleness
diff --git a/build.sh b/build.sh
index c74fd5eb8..6c93ecb71 100755
--- a/build.sh
+++ b/build.sh
@@ -281,6 +281,7 @@ IT_SEARCH_ENGINE_LOGS=false
 IT_MEMORY_SAMPLER=true
 IT_MEMORY_INTERVAL=30
 JAVADOC=false
+NO_JAVADOC=false
 LOG_FILE=""
 LOG_FILE_ONLY=false
 
@@ -329,6 +330,7 @@ EOF
         echo -e "  ${CYAN}--no-memory-sampler${NC}        Disable JVM/system 
memory sampling during integration tests"
         echo -e "  ${CYAN}--memory-interval SEC${NC}    Memory sample interval 
in seconds (default: 30)"
         echo -e "  ${CYAN}--javadoc${NC}                  Build and validate 
Javadoc after install (doclint errors fail; public/protected tag gaps warn)"
+        echo -e "  ${CYAN}--no-javadoc${NC}               Skip 
Javadoc/checkstyle validation (overrides --ci; use when another job already ran 
it)"
         echo -e "  ${CYAN}--ci${NC}                       CI mode: no Karaf, 
non-interactive, includes Javadoc"
         echo -e "  ${CYAN}--log-file PATH${NC}            Tee all output to 
PATH (console + file)"
         echo -e "  ${CYAN}--log-file-only${NC}            With --log-file: 
write to file only, suppress console"
@@ -373,6 +375,7 @@ EOF
         echo "  --no-memory-sampler       Disable JVM/system memory sampling 
during integration tests"
         echo "  --memory-interval SEC     Memory sample interval in seconds 
(default: 30)"
         echo "  --javadoc                 Build and validate Javadoc after 
install (doclint errors fail; public/protected tag gaps warn)"
+        echo "  --no-javadoc              Skip Javadoc/checkstyle validation 
(overrides --ci; use when another job already ran it)"
         echo "  --ci                      CI mode: no Karaf, non-interactive, 
includes Javadoc"
         echo "  --log-file PATH           Tee all output to PATH (console + 
file)"
         echo "  --log-file-only           With --log-file: write to file only, 
suppress console"
@@ -549,6 +552,11 @@ while [ "$1" != "" ]; do
         --javadoc)
             JAVADOC=true
             ;;
+        --no-javadoc)
+            # Explicit veto, applied after argument parsing so it wins 
regardless of whether it
+            # appears before or after --ci (which turns Javadoc on).
+            NO_JAVADOC=true
+            ;;
         --log-file)
             shift
             LOG_FILE="$1"
@@ -1167,6 +1175,12 @@ echo "Estimated time: 3-5 minutes for build, 50-60 
minutes with integration test
 start_timer
 
 # Build phases with enhanced output
+# Apply the --no-javadoc veto now that all arguments are parsed, so it wins 
over --ci
+# regardless of flag order.
+if [ "$NO_JAVADOC" = true ]; then
+    JAVADOC=false
+fi
+
 [ "$JAVADOC" = true ] && total_steps=4 || total_steps=2
 current_step=0
 

Reply via email to