xiangfu0 opened a new pull request, #19649:
URL: https://github.com/apache/pinot/pull/19649

   ## Summary
   
   Apache parent 40 (#19633) bumped `apache-rat-plugin` from 0.16.1 to 
**0.18**. Since then, CI builds with `-T 16` intermittently fail in *Build 
Project* before any test runs. Example from the #19568 run 
([job](https://github.com/apache/pinot/actions/runs/35925987578/job/107401081098)):
   
   ```
   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
   ```
   
   ## Root cause
   
   RAT 0.17/0.18 mark `check` as `threadSafe = true`, but executions share 
mutable state across the JVM:
   - [RAT-553](https://issues.apache.org/jira/browse/RAT-553) (affects 0.18): a 
cached singleton `GitIgnoreBuilder` is mutated by every module, which throws 
the `ConcurrentModificationException`/NPE.
   - [RAT-573](https://issues.apache.org/jira/browse/RAT-573): 
`OptionCollection.parseCommands()` and the `Arg` enum's commons-cli 
`OptionGroup`s are shared and unsynchronized.
   
   Both are fixed only in RAT 1.0.0, which is not released yet (0.18 is the 
latest).
   
   ## Local reproduction
   
   `./mvnw -T 16 -pl '!pinot-bom' org.apache.rat:apache-rat-plugin:0.18:check` 
on master:
   - **0.18**: 2 of 3 runs failed, each on a different module, with false 
`UNAPPROVED` counts. For example, `pinot-input-format` flagged `target/rat.txt` 
and `*.avsc`, both of which are excluded; another thread's option parsing had 
wiped that module's excludes. Including `pinot-bom` also produced 
`AlreadySelectedException: The option 'e' was specified but an option from this 
group has already been selected: 'input-exclude'`, even though `pinot-bom` has 
no RAT config. 0.18 also left stray `NameSet*/` temp dirs in the repo root.
   - **0.16.1** (this PR), `./mvnw -T 16 -pl '!pinot-bom' apache-rat:check`: 5 
of 5 runs passed, 83 module executions each.
   
   ## Change
   
   Override `version.apache-rat-plugin` to `0.16.1` in the root pom 
`<properties>`. Every module except `pinot-bom` inherits from the root pom, and 
`pinot-bom` binds no RAT execution, so this one property covers the whole 
reactor. `pinot-timeseries-lang`'s effective pom now resolves 0.16.1.
   
   Revert once RAT 1.0.0 is released.
   


-- 
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