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

davsclaus 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 976a8ec25348 chore: ci - Scalpel ignores root-level files that do not 
affect the build (#29636)
976a8ec25348 is described below

commit 976a8ec25348a0127d8508fff6882df2f0d4331d
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Nov 11 15:00:24 2026 +0100

    chore: ci - Scalpel ignores root-level files that do not affect the build 
(#29636)
    
    Since Scalpel 0.5.0 (#29611) a changed root-level file that no module owns 
triggers a full build, even with an empty fullBuildTriggers, and 
incremental-build.sh then drops Scalpel's module list. Add the root-level doc 
and repository files (CLAUDE.md, AGENTS.md, README.md, Jenkinsfile*, ...) to 
-Dscalpel.excludePaths. mvnw, mvnw.cmd and pom.xml still trigger a full build.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    Signed-off-by: Claus Ibsen <[email protected]>
---
 .github/CI-ARCHITECTURE.md                             | 2 ++
 .github/actions/incremental-build/incremental-build.sh | 9 ++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/.github/CI-ARCHITECTURE.md b/.github/CI-ARCHITECTURE.md
index 9e0279944e49..6c6ecc620664 100644
--- a/.github/CI-ARCHITECTURE.md
+++ b/.github/CI-ARCHITECTURE.md
@@ -238,6 +238,8 @@ The comparison is apples-to-apples: the current approach's 
reactor is filtered t
 
 The script overrides `fullBuildTriggers` to empty 
(`-Dscalpel.fullBuildTriggers=`) because Scalpel's default (`.mvn/**`) would 
trigger a full build whenever `.mvn/extensions.xml` itself changes (e.g., 
Dependabot bumping Scalpel).
 
+It also passes `-Dscalpel.excludePaths` with `.github/**` and the root-level 
files that do not affect the build (`AGENTS.md`, `CLAUDE.md`, `README.md`, 
`KEYS`, `LICENSE.txt`, `Jenkinsfile*`, `.gitignore`, ...). Since Scalpel 0.5.0 
a changed root-level file that no module owns triggers a full build, which the 
script treats as a Scalpel failure, so a PR that touches `CLAUDE.md` would lose 
Scalpel's module list. `mvnw`, `mvnw.cmd` and `pom.xml` are not excluded: a 
change to them should stil [...]
+
 The grep-based script fetches the PR diff via the GitHub REST API. When the 
API does not return it (HTTP 406 for a PR beyond the GitHub diff limits, such 
as more than 300 files), the diff is computed from the local checkout against 
its merge base with the base branch, fetching the base branch when the checkout 
does not have it (camel-spring-boot runs this action after a depth-1 checkout); 
without either, the step fails rather than pass without testing (`pr_diff.sh`). 
Scalpel uses local g [...]
 
 ## Manual Integration Test Advisories
diff --git a/.github/actions/incremental-build/incremental-build.sh 
b/.github/actions/incremental-build/incremental-build.sh
index bd311a37a0dc..2c9a10bf51fc 100755
--- a/.github/actions/incremental-build/incremental-build.sh
+++ b/.github/actions/incremental-build/incremental-build.sh
@@ -245,6 +245,12 @@ runScalpelDetection() {
   # - explain=true: add per-module evidence[] to the report (exact 
file/property/dep that triggered each module)
   # - fullBuildTriggers="": override .mvn/** default (Scalpel lives in 
.mvn/extensions.xml)
   # - fetchBaseBranch=false: base branch is pre-fetched by the CI workflow
+  # - excludePaths: .github/** plus the root-level files that do not affect 
the build.
+  #   Since Scalpel 0.5.0 a changed root-level file that no module owns 
triggers a full
+  #   build, so a PR that only edits CLAUDE.md or README.md would lose its 
module list.
+  #   mvnw, mvnw.cmd and pom.xml are left out on purpose: they do affect the 
build.
+  #   A pattern without a "/" also matches at any depth (e.g. a module's 
README.md);
+  #   the file-path step above still picks up the module of such a file.
   # - skipTestsForDownstreamModules: derived from EXCLUSION_LIST — tells 
Scalpel which
   #   downstream modules should not run tests in skip-tests mode (for shadow 
comparison)
   # Strip the Maven "!:" prefix from each entry to get bare artifact IDs for 
Scalpel.
@@ -253,7 +259,8 @@ runScalpelDetection() {
   # Always pass baseBranch explicitly — relying on Scalpel's 
env.GITHUB_BASE_REF
   # auto-detection is fragile across Maven wrappers and CI rerun contexts.
   local base_branch="origin/${GITHUB_BASE_REF:-main}"
-  local scalpel_args="-Dscalpel.enabled=true -Dscalpel.mode=report 
-Dscalpel.explain=true -Dscalpel.fullBuildTriggers= 
-Dscalpel.fetchBaseBranch=false -Dscalpel.baseBranch=${base_branch} 
-Dscalpel.excludePaths=.github/** 
-Dscalpel.skipTestsForDownstreamModules=${skip_downstream}"
+  local 
exclude_paths=".github/**,AGENTS.md,CLAUDE.md,CONTRIBUTING.md,README.md,SECURITY.md,KEYS,LICENSE.txt,NOTICE.txt,doap.rdf,Jenkinsfile*,.asf.yaml,.gitattributes,.gitignore,.gitmodules,.sdkmanrc,jbang-catalog.json"
+  local scalpel_args="-Dscalpel.enabled=true -Dscalpel.mode=report 
-Dscalpel.explain=true -Dscalpel.fullBuildTriggers= 
-Dscalpel.fetchBaseBranch=false -Dscalpel.baseBranch=${base_branch} 
-Dscalpel.excludePaths=${exclude_paths} 
-Dscalpel.skipTestsForDownstreamModules=${skip_downstream}"
 
   # Verify merge base is reachable (pre-fetched by the CI workflow step)
   if ! git merge-base HEAD "${base_branch}" >/dev/null 2>&1; then

Reply via email to