Skip to content

ci: stop running RAT in the parallel packaging-check build - #20527

Merged
FrankChen021 merged 1 commit into
apache:masterfrom
ykisana:fix-rat-parallel-packaging-check
Oct 9, 2026
Merged

FrankChen021 merged 1 commit into
apache:masterfrom
ykisana:fix-rat-parallel-packaging-check

Conversation

@ykisana

@ykisana ykisana commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

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, and the fix is 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.


Key changed/added files in this PR
  • .github/scripts/packaging-check.sh
  • .github/scripts/static-checks-maven.sh

This PR has:

  • been self-reviewed.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.

apache-rat-plugin 0.17+ keeps per-run state in shared static objects, so
running rat:check across modules under -T1C intermittently drops configured
excludes (e.g. **/target/**) or throws NPEs (RAT-553, fixed upstream by
RAT-573, not yet released). packaging-check ran RAT this way via -Prat.

static-checks-maven.sh already runs a repo-wide, single-threaded
apache-rat:check in the same workflow, so drop -Prat from packaging-check
and document that the single-threaded pass is the only RAT check.
@github-actions github-actions Bot added the GHA label Oct 8, 2026
@FrankChen021
FrankChen021 self-requested a review October 9, 2026 02:05
@FrankChen021
FrankChen021 merged commit eccfab1 into apache:master Oct 9, 2026
27 of 28 checks passed
@github-actions github-actions Bot added this to the 39.0.0 milestone Oct 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI infra: apache-rat-plugin 0.18 check fails intermittently in parallel packaging-check build

2 participants