Skip to content
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

[incubator-kie-issues-1613] Add .rat-excludes file to each repository #6149

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

tkobayas
Copy link
Contributor

@tkobayas tkobayas force-pushed the rat-excludes branch 3 times, most recently from f164a69 to 5095a4d Compare November 13, 2024 07:25

- name: Run Apache RAT
run: |
java -jar apache-rat-0.16.1.jar -d . -E .rat-excludes | grep "== File:" && echo "The files listed above are missing license headers." && exit 1 || echo "All files have license headers."
Copy link
Contributor Author

@tkobayas tkobayas Nov 13, 2024

Choose a reason for hiding this comment

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

If a file doesn't have a license header and it's not listed in .rat-excludes, this GHA fails.

Copy link
Contributor

Choose a reason for hiding this comment

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

nice

pom.xml Outdated
Comment on lines 136 to 141
<configuration>
<excludes>
<exclude>.rat-excludes</exclude>
<exclude>.gitignore</exclude>
<exclude>DISCLAIMER-WIP</exclude>
<exclude>**/ui-bundle.zip</exclude>
Copy link
Contributor Author

@tkobayas tkobayas Nov 13, 2024

Choose a reason for hiding this comment

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

Unfortunately, we cannot share the same .rat-excludes file for java -jar apache-rat-0.16.1.jar -E command line and <excludesFile> in apache-rat-plugin, because command line expects that the exclude files is written with regular expression (e.g. .*\.csv) while apache-rat-plugin expects the exclude files is written with glob pattern (e.g. **/*.csv). Maintaining both configurations is a little cumbersome.

With this PR, we can check license headers with GHA and also with command line locally. Shall I remove apache-rat-plugin from pom.xml? @baldimir

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure, I am fine removing the plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Removing the plugin...

@tkobayas tkobayas marked this pull request as ready for review November 13, 2024 08:33
@tkobayas
Copy link
Contributor Author

GHA kogito-runtimes : flaky. reported in zulip https://kie.zulipchat.com/#narrow/channel/382044-kogito-dev/topic/StandaloneBPMNProcessTest.2EtestEventBasedSplit2.20is.20flaky

2024-11-13T16:18:22.0808275Z [ERROR] Tests run: 49, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 5.691 s <<< FAILURE! -- in org.jbpm.bpmn2.StandaloneBPMNProcessTest
2024-11-13T16:18:22.0815151Z [ERROR] org.jbpm.bpmn2.StandaloneBPMNProcessTest.testEventBasedSplit2 -- Time elapsed: 0.526 s <<< FAILURE!
2024-11-13T16:18:22.0816661Z org.opentest4j.AssertionFailedError:
2024-11-13T16:18:22.0817251Z
2024-11-13T16:18:22.0817497Z expected: 2
2024-11-13T16:18:22.0817966Z  but was: 1
2024-11-13T16:18:22.0819009Z    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2024-11-13T16:18:22.0821058Z    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
2024-11-13T16:18:22.0824247Z    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
2024-11-13T16:18:22.0826314Z    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
2024-11-13T16:18:22.0828273Z    at org.jbpm.bpmn2.StandaloneBPMNProcessTest.testEventBasedSplit2(StandaloneBPMNProcessTest.java:405)

@tkobayas tkobayas merged commit b9e069a into apache:main Nov 14, 2024
9 of 10 checks passed
Comment on lines +25 to +27
* antora ui-bundle
Downloaded from: https://github.com/stephengold/antora-ui-bundle
License: Mozilla Public License 2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

cool, thank you for keeping mind to update all aspects of the codebase, just sharing, you probably noticed already, we will need to refactor and move content from NOTICE to LICENSE apache/incubator-kie-issues#1616 and apache/incubator-kie-issues#1618

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the heads-up!

@yesamer yesamer linked an issue Nov 15, 2024 that may be closed by this pull request
6 tasks
rgdoliveira pushed a commit to rgdoliveira/drools that referenced this pull request Nov 18, 2024
…apache#6149)

* [incubator-kie-issues-1613] Add .rat-excludes file to each repository

* removing apache-rat-plugin as we can check it with command line
tkobayas added a commit to tkobayas/drools that referenced this pull request Nov 21, 2024
…apache#6149)

* [incubator-kie-issues-1613] Add .rat-excludes file to each repository

* removing apache-rat-plugin as we can check it with command line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add .rat-excludes file to each repository
4 participants