Skip to content

Reduce rat report by relativizing path - #9724

Merged
ebarboni merged 1 commit into
apache:deliveryfrom
ebarboni:ratquiet
Oct 22, 2026
Merged

ebarboni merged 1 commit into
apache:deliveryfrom
ebarboni:ratquiet

Conversation

@ebarboni

Copy link
Copy Markdown
Contributor

Add a few changes to rat processing for NetBeans

  • do the xml report only.
  • make path relative to netbeans folder to have less text displayed.
  • use rat xsl to make txt file on the reduced xml for later display.

will anable rat again for rc2

@ebarboni ebarboni added this to the NB32 milestone Oct 16, 2026
@ebarboni
ebarboni requested a review from mbien October 16, 2026 12:28
@ebarboni ebarboni added the build label Oct 16, 2026

@matthiasblaesing matthiasblaesing left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The generate idea makes sense, but please lets not use string replacement to modify XML. This asks for trouble the moment people how something more exotic in their path than ascii characters. The minimum problematic set are &, ", ', < and >, maybe even more when RAT writes entities.

We have the full power of the JVM at our disposal, so lets use it.

Please have a look here: matthiasblaesing@15fd667. Feel free to squash that if you agree.

@ebarboni

Copy link
Copy Markdown
Contributor Author

Thanks for the approach it's more robust.

@ebarboni ebarboni changed the title rat diet Reduce rat report by relativizing path Oct 19, 2026
@mbien

mbien commented Oct 19, 2026

Copy link
Copy Markdown
Member

was that the reason it failed? a path/classpath became too long due to concatenation of absolute paths?

@ebarboni

Copy link
Copy Markdown
Contributor Author

target of the report was also an issue, was landing in another folder than expected.

But the path length was useless too. Better to reduce IMHO.

@neilcsmith-net

Copy link
Copy Markdown
Member

At this point, it might be better to revert to older Rat on delivery and rethink the approach on master?

@ebarboni

Copy link
Copy Markdown
Contributor Author

Well I would prefer having a test for next RC. Because https://ci-builds.apache.org/job/Netbeans/job/netbeans-license/ looks ok even without this PR in. So maybe the release build has a bit more folder in it that lead to this issue.

@neilcsmith-net

Copy link
Copy Markdown
Member

Was Rat 0.15 missing something? Running rat locally on the rc1 source works fine, eventually, and after spewing a lot of text. But it feels far from ideal without additional playing with the configuration, which if Rat 0.15 isn't actually broken might be better to do in the main branch.

@ebarboni

Copy link
Copy Markdown
Contributor Author

Well, 0.18 is working ok almost everywhere except on the jenkins release job. Would like to include this fix attempt for RC2, renable rat in the job.
If it fails, for rc3 or voting candidate it will be possible to just disable rat in the build.

We are kind of backuped by https://ci-builds.apache.org/job/Netbeans/job/netbeans-license/

…ion: Switch from plain string replacing to XML parsing and attribute modification
@mbien

mbien commented Oct 22, 2026

Copy link
Copy Markdown
Member

Was Rat 0.15 missing something? Running rat locally on the rc1 source works fine, eventually, and after spewing a lot of text. But it feels far from ideal without additional playing with the configuration, which if Rat 0.15 isn't actually broken might be better to do in the main branch.

we could probably revert the rat version bump since #9717 reverted the version back to 11. However i am wondering what has less unknowns by now. If @ebarboni has a good feeling about this PR we should probably merge because:

  • this isn't mission critical, if it fails again we turn it off in jenkins and run it locally (actually what we did when it failed the first time i think)
  • it'll be fine

also gh CI is basically unuseable atm :(

@ebarboni

Copy link
Copy Markdown
Contributor Author

I take the limited risk, with at worst rat deactivted til the end of the campaign

@ebarboni
ebarboni merged commit 2ddf983 into apache:delivery Oct 22, 2026
4 checks passed
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.

4 participants