Jackie-Jiang opened a new pull request, #19650:
URL: https://github.com/apache/pinot/pull/19650

   ## Summary
   
   Since #19633 moved the Apache parent to 40, `apache-rat-plugin` is 0.18 (up 
from 0.16.1). 0.18 marks `check` as thread-safe, so Maven gives no warning 
under `-T`, but it keeps shared static state: the logger, the deprecation 
reporter, the `Arg` option groups mutated during argument parsing, the SPDX 
matcher, and the SCM ignore-file builders. Concurrent module executions in the 
`-T 16` CI build intermittently fail with:
   ```
   Failed to execute goal org.apache.rat:apache-rat-plugin:0.18:check (default) 
on project pinot-timeseries-lang:
   Execution default of goal org.apache.rat:apache-rat-plugin:0.18:check 
failed. ConcurrentModificationException
   ```
   This showed up within hours of the upgrade, on different modules each time:
   - [Integration Test Set 
2](https://github.com/apache/pinot/actions/runs/35925987578/job/107401081098) 
(`pinot-timeseries-lang`)
   - [Unit Test Set 
1](https://github.com/apache/pinot/actions/runs/35926425302/job/107402571319) 
(`pinot-input-format`)
   
   Upstream fixed it in apache/creadur-rat#704 (RAT-573), which is not released 
yet; 0.18 is the latest version.
   
   This PR runs RAT as a single execution from the root that scans the whole 
tree, instead of one execution per module, so nothing can race regardless of 
`-T`:
   - `<inherited>false</inherited>` keeps RAT out of the child modules.
   - `<excludeSubProjects>false</excludeSubProjects>` makes the root execution 
cover the module directories it used to skip.
   - Exclude patterns resolve against the scanned directory. RAT's built-in 
excludes and most of ours already start with `**/`, and the root-anchored ones 
(`licenses-binary/**`, `kb/**`, `helm/**`, `docker/**`, `contrib/**`, 
`doap_Pinot.rdf`, `.trivyignore`, `.github/*.md`) point at root-level paths, so 
they match the same. The IDE and GenAI tool directories 
(`.externalToolBuilders`, `.claude`, `.codex`, `.continue`, `.copilot`, 
`.cursor`, `.openai`, `.ollama`) can appear inside any module, so they now 
start with `**/` to keep matching there.
   
   This also cuts RAT work. With `parseSCMIgnoresAsExcludes` on (the default), 
every execution walks its entire subtree once per SCM type (Git, Mercurial, 
Bazaar, CVS) to find ignore files, without applying excludes. So the root 
execution already walked the whole repo (16.5s in [this Unit Test Set 2 
build](https://github.com/apache/pinot/actions/runs/35926425302/job/107402571644)),
 and the 79 module executions (38.5s summed) repeated those walks for their own 
subtrees. The single execution keeps the root's walks and adds only the header 
checks for module files.
   
   `mvn install -pl <module>` without the root in the reactor no longer runs 
RAT for that module. CI builds always include the root.
   
   🤖 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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to