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

Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new d32f9bf44407 ci: apply threshold to Scalpel-detected modules in 
incremental build
d32f9bf44407 is described below

commit d32f9bf4440716524dd9dd3337c0b424909813f6
Author: Guillaume Nodet <[email protected]>
AuthorDate: Tue Sep 1 23:22:13 2026 +0200

    ci: apply threshold to Scalpel-detected modules in incremental build
    
    Before Scalpel, when the -amd expansion of changed modules exceeded the
    threshold (50), the build would only test the directly changed modules.
    With Scalpel, detected dependent modules are added explicitly to -pl,
    bypassing the threshold entirely. For core module changes (camel-api,
    camel-support), this means ~591 modules get tested regardless.
    
    Strip dependency-detected modules (grep + Scalpel) from the build list
    when the threshold is exceeded, restoring the pre-Scalpel behavior.
    The test-dependents label still forces testing all dependents.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
 .github/actions/incremental-build/incremental-build.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/.github/actions/incremental-build/incremental-build.sh 
b/.github/actions/incremental-build/incremental-build.sh
index e37b10805671..6aa87cf1ae85 100755
--- a/.github/actions/incremental-build/incremental-build.sh
+++ b/.github/actions/incremental-build/incremental-build.sh
@@ -860,6 +860,21 @@ main() {
       if [[ ${totalTestableProjects} -gt ${maxNumberOfTestableProjects} ]]; 
then
         echo "Too many dependent modules (${totalTestableProjects} > 
${maxNumberOfTestableProjects}), testing only the affected modules"
         testedDependents=false
+        # Strip dependency-detected modules (grep + Scalpel) from the build 
list.
+        # These are "dependents" just like -amd expansion and should be subject
+        # to the same threshold. Without this, Scalpel-detected modules bypass
+        # the threshold and all ~N dependents get tested anyway.
+        dep_module_ids=""
+        final_pl=""
+        if [ -n "$testable_pl" ]; then
+          final_pl="$testable_pl"
+        fi
+        if [ -n "$pom_only_pl" ]; then
+          final_pl="${final_pl:+${final_pl},}${pom_only_pl}"
+        fi
+        if [ -n "$extraModules" ]; then
+          final_pl="${final_pl:+${final_pl},}${extraModules}"
+        fi
       else
         echo "Testing affected modules and their dependents 
(${totalTestableProjects} modules)"
         use_amd=true

Reply via email to