davsclaus opened a new pull request, #31021:
URL: https://github.com/apache/camel/pull/31021
# Description
`incremental-build.sh` adds the modules that the grep and Scalpel detection
found (`dep_module_ids`) to `-pl`, next
to the `-amd` reactor of the changed modules. The threshold check
(`maxNumberOfTestableProjects`, 50) only counted the
`-amd` reactor, so the Scalpel modules went into the build without being
counted.
A change to `camel-catalog`, `camel-endpointdsl` or `camel-componentdsl`
hits this. Every component description
change regenerates those modules. They have few `-amd` dependents but about
700 downstream modules in Scalpel's graph.
For example, the CAMEL-23832 PR for camel-ai-prompt logged:
```
Scalpel detected 733 affected modules (702 would be tested, reactor: 733)
Direct: 5, Downstream tested: 700, Downstream skipped: 28
...
Testing affected modules and their dependents (38 modules)
```
The PR then tested about 700 modules: a near-full test suite for a
one-component documentation change, taking 50 to
100 minutes. It failed now and then on unrelated flaky tests in quartz,
zipfile, netty, netty-http, box, sql and
jgroups-raft. With about 40 such PRs open on 2026-11-27, they filled the CI
queue.
## Change
- A new `countTestableModules` function counts the union of the `-amd`
reactor and the dependency-detected modules,
without duplicates. The threshold check uses it.
- A PR whose Scalpel list is large now goes over the threshold. The existing
"too many dependent modules" branch then
drops the dependency-detected modules, so only the changed modules are
tested, as was already intended. The comment
there says: "Without this, Scalpel-detected modules bypass the threshold
and all ~N dependents get tested anyway."
- PRs with few dependency-detected modules behave as before.
## Tests
- New `incremental_build_count_test.sh` (5 cases), in the style of
`incremental_build_filter_test.sh`. It runs in
`pr-ci-scripts-validation.yml`, which runs every `*_test.sh` of the folder.
- `incremental_build_filter_test.sh` still passes, and `bash -n
incremental-build.sh` is clean.
- The full flow can only be checked on a real PR. A PR that changes only a
component description should report "Too
many dependent modules" and test just the changed modules.
Note: until this is merged, the `incremental-skip-tests` label gives
documentation-only PRs a short build. The full
build and the check for uncommitted generated files still run.
# Target
- [x] I checked that the commit is targeting the correct branch (Camel 4
uses the `main` branch)
# Tracking
- [x] If this is a large change, bug fix, or code improvement, I checked
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for
the change (usually before you start working on it).
# Apache Camel coding standards and style
- [x] I checked that each commit in the pull request has a meaningful
subject line and body.
# AI-assisted contributions
- [x] If this PR includes AI-generated code, commits have proper
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR
description identifies the AI tool used.
_Claude Code on behalf of davsclaus_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]