gnodet opened a new pull request, #24368:
URL: https://github.com/apache/camel/pull/24368

   ## Summary
   
   - **Move** the `git fetch --deepen` logic from a dedicated workflow step 
(runs for every PR) into `runScalpelDetection()` (runs only when a `pom.xml` 
changed)
   - **Add depth=50** as first step — recent PRs where the merge base is close 
avoid fetching 200 commits upfront
   - **Progressive depths**: `50 → 200 → 1000 → full history` (last resort)
   
   ## Motivation
   
   The deepening step was taking ~5-6 minutes for every PR on the Camel repo 
(large git history). Since the majority of PRs only change Java files and never 
trigger Scalpel, this was wasted CI time. By moving the deepening into 
`runScalpelDetection()`, only PRs that actually need Scalpel (pom.xml changes) 
pay the cost.
   
   ## Changes
   
   | File | Change |
   |------|--------|
   | `pr-build-main.yml` | Remove the "Fetch base branch for Scalpel" step |
   | `incremental-build.sh` | Add progressive deepening inside 
`runScalpelDetection()` |
   | `CI-ARCHITECTURE.md` | Update documentation to reflect the new approach |
   
   ## Test plan
   
   - [ ] Java-only PR: verify no deepening occurs, no Scalpel section in comment
   - [ ] POM-changing PR: verify Scalpel runs with deepening, shadow comparison 
appears in comment
   - [ ] PR with merge base within 50 commits: verify depth=50 is sufficient
   
   _Claude Code on behalf of Guillaume Nodet_
   
   🤖 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]

Reply via email to