-
Notifications
You must be signed in to change notification settings - Fork 3k
Build/Release: Upgrade to RAT 0.17 #15145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
about the new regex syntax.
**/build/**, matches any folder name "build"
.git/**, matches top level dir name .git and excludes all its files
dev/.rat-excludes, matches this 1 file explicitly
**/LICENSE, matches any file name "LICENSE"
**/*.sql, matches any file with .sql suffix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR upgrades the Apache RAT license-checking tool to version 0.17 and updates how license checks are invoked and configured, aiming to support newer exclusion capabilities (e.g., for subdirectories) and the missing-headers output style.
Changes:
- Bump RAT from 0.16.1 to 0.17 and simplify
dev/check-licenseto rely on RAT’s exit code and the--output-style missing-headersoption instead of parsing text output. - Switch from the old
-Eflag to--input-exclude-filein the license check script and adjust logging behavior. - Rewrite
dev/.rat-excludespatterns, attempting to use**-style patterns for directories and extensions (e.g.,**/build/**,**/*.json).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| dev/check-license | Updates RAT version to 0.17 and modernizes the invocation including exclusion file flag, output style, and logging, with direct use of the tool’s exit status. |
| dev/.rat-excludes | Replaces previous regex-like exclusion entries with **-style path and extension patterns to control which files and directories RAT scans. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| mkdir -p build | ||
| $java_cmd -jar "$rat_jar" --scan-hidden-directories -E "$FWDIR"/dev/.rat-excludes -d "$FWDIR" > build/rat-results.txt | ||
| $java_cmd -jar "$rat_jar" \ | ||
| --input-exclude-file "$FWDIR"/dev/.rat-excludes \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why we are not scanning hidden directories any more?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, we should!
Upgrades RAT to version 0.17, which has new regex for exclusion expression that would allow us to exclude subdir and unblock #15144
--input-exclude-filebecause-E,--exclude-fileis deprecated--input-include-std HIDDEN_DIRbecause--scan-hidden-directoriesis deprecated--output-style missing-headersoption for output stylingHeres the new
--helpmessage, https://gist.github.com/kevinjqliu/81ebca6bf93dd941c3156dda8bd57c56Example output
Success
https://github.com/apache/iceberg/actions/runs/21370993207/job/61515189315?pr=15145
Failure
https://github.com/apache/iceberg/actions/runs/21371129112/job/61515658994?pr=15145
Previous upgrade #9579