ykisana opened a new pull request, #20527: URL: https://github.com/apache/druid/pull/20527
Fixes #20465. ### Description The `packaging-check` job in Static Checks CI fails intermittently in `apache-rat-plugin:0.18:check`. There have been 3 failures on master since the bump from 0.15 to 0.18 in #20000. Two are NPEs and one is a spurious `UNAPPROVED` count. In the 2026-09-30 run, `druid-cassandra-storage` reported 36 unapproved files. That module has only 8 tracked files, all of which have license headers, and the failing commit didn't touch it, so RAT was scanning generated files that `**/target/**` normally excludes. #### Stopped running RAT in the parallel `packaging-check` build Since 0.17, `apache-rat-plugin` keeps per-run state in shared static objects. When `rat:check` runs for several modules at once in one JVM, those runs can interfere with each other. This can drop a module's configured `<excludes>` or throw an NPE while parsing `.gitignore` files. Upstream tracks this as [RAT-553](https://issues.apache.org/jira/browse/RAT-553), and the fix is [RAT-573](https://issues.apache.org/jira/browse/RAT-573), which is targeted at the unreleased 1.0.0. `packaging-check.sh` hit this race because it ran `install -Prat ... -T1C`. `static-checks-maven.sh` already runs a repo-wide `apache-rat:check -Prat` without `-T` in the same workflow (added in #20297), and it covers every module, including `benchmarks` and `distribution`. The RAT run in `packaging-check` therefore added no coverage. This PR: - removes `-Prat` from both Maven invocations in `.github/scripts/packaging-check.sh`, and updates its comment. - updates the comment in `.github/scripts/static-checks-maven.sh` to say it is the only RAT pass and must stay single-threaded. Alternative considered: pin `apache-rat-plugin` back to `0.16.1` until a release that includes RAT-573 ships. That would also need a dependabot ignore rule to stop it from being bumped again, and it would still run RAT twice. Removing the duplicate run is simpler. Once RAT-573 is released, `-Prat` could be added back to `packaging-check` if wanted. #### Release note None. This is a CI-only change. <hr> ##### Key changed/added files in this PR * `.github/scripts/packaging-check.sh` * `.github/scripts/static-checks-maven.sh` <hr> This PR has: - [x] been self-reviewed. - [x] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.) - [x] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader. -- 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]
