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

kie-issues#1613: Add CI :: License headers GitHub Actions workflow #3714

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

jomarko
Copy link
Contributor

@jomarko jomarko commented Oct 10, 2024

Is a partial fix of the apache/incubator-kie-issues#1613 where we submit one PR per repository.

Closes/Fixes/Resolves #ISSUE-NUMBER

Description:

Please make sure that your PR meets the following requirements:

  • You have read the contributors guide
  • Your code is properly formatted according to this configuration
  • Pull Request title is properly formatted: Issue-XYZ Subject
  • Pull Request title contains the target branch if not targeting main: [0.9.x] Issue-XYZ Subject
  • Pull Request contains link to the JIRA issue
  • Pull Request contains link to any dependent or related Pull Request
  • Pull Request contains description of the issue
  • Pull Request does not include fixes for issues other than the main ticket
How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.

build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

@@ -1,4 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copy link
Contributor

Choose a reason for hiding this comment

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

@jomarko Not sure we can add the Apache license in the BMPN and DMN xsd files and related..., that because those are generated by OMG, therefore those should considered external assets, and not "ours".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@jomarko
Copy link
Contributor Author

jomarko commented Oct 11, 2024

Failed test:

2024-10-10T19:08:00.2886599Z [ERROR] Tests run: 49, Failures: 1, Errors: 0, Skipped: 5, Time elapsed: 5.927 s <<< FAILURE! -- in org.jbpm.bpmn2.StandaloneBPMNProcessTest
2024-10-10T19:08:00.2888692Z [ERROR] org.jbpm.bpmn2.StandaloneBPMNProcessTest.testEventBasedSplit2 -- Time elapsed: 0.531 s <<< FAILURE!
2024-10-10T19:08:00.2890152Z org.opentest4j.AssertionFailedError: 
2024-10-10T19:08:00.2890583Z 
2024-10-10T19:08:00.2890733Z expected: 2
2024-10-10T19:08:00.2891102Z  but was: 1
2024-10-10T19:08:00.2891989Z 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2024-10-10T19:08:00.2893744Z 	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
2024-10-10T19:08:00.2895699Z 	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
2024-10-10T19:08:00.2897403Z 	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
2024-10-10T19:08:00.2898780Z 	at org.jbpm.bpmn2.StandaloneBPMNProcessTest.testEventBasedSplit2(StandaloneBPMNProcessTest.java:407)
2024-10-10T19:08:00.2900004Z 	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
2024-10-10T19:08:00.2900922Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
2024-10-10T19:08:00.2901884Z 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

@kie-ci3
Copy link
Contributor

kie-ci3 commented Oct 11, 2024

PR job #3 was: UNSTABLE
Possible explanation: This should be test failures

Reproducer

build-chain build full_downstream -f 'https://raw.githubusercontent.com/${AUTHOR:apache}/incubator-kie-kogito-pipelines/${BRANCH:main}/.ci/buildchain-config-pr-cdb.yaml' -o 'bc' -p apache/incubator-kie-kogito-runtimes -u #3714 --skipParallelCheckout

NOTE: To install the build-chain tool, please refer to https://github.com/kiegroup/github-action-build-chain#local-execution

Please look here: https://ci-builds.apache.org/job/KIE/job/kogito/job/main/job/pullrequest_jobs/job/kogito-runtimes-pr/job/PR-3714/3/display/redirect

Test results:

  • PASSED: 3369
  • FAILED: 1

Those are the test failures:

org.jbpm.bpmn2.IntermediateEventTest.testEventBasedSplit2
expected: 2
but was: 1

@jomarko
Copy link
Contributor Author

jomarko commented Oct 11, 2024

Running locally mvn clean install -Dfull -Prun-code-coverage -Dtest=IntermediateEventTest does not reproduce the test failure.

Copy link
Contributor

@yesamer yesamer left a comment

Choose a reason for hiding this comment

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

LGTM, just make sure the builds are green (disregarding flaky tests)

@jomarko
Copy link
Contributor Author

jomarko commented Nov 14, 2024

This will be addressed via apache/incubator-kie-issues#1613

@jomarko jomarko closed this Nov 14, 2024
@tkobayas
Copy link
Contributor

tkobayas commented Nov 15, 2024

@jomarko You may not need to close this PR? Rather, this PR can link to apache/incubator-kie-issues#1613 and:

  • Add license headers where needed (this PR so far is valid)
  • Add .rat-excludes for ignorable files
  • Hopefully add a GHA for rat check
  • Remove apache-rat-plugin and checkstyle.header.template

WDYT? (or you may have another plan?)

@jomarko
Copy link
Contributor Author

jomarko commented Nov 15, 2024

@tkobayas ok, I can reopen the PR, I just thought it will be better to start with fresh PR, as this PR is kind of old, but you are probably right, I can update it.

@jomarko jomarko reopened this Nov 15, 2024
@jomarko jomarko changed the title NO-ISSUE: Add license header kie-issues#1613: Add license header Nov 15, 2024
@yesamer yesamer linked an issue Nov 15, 2024 that may be closed by this pull request
6 tasks
LICENSE Outdated
Comment on lines 204 to 215
------------------------------------------------------------------------------------
This product bundles various third-party components under other open source licenses.
This section summarizes those components and their licenses. See licenses/
for text of these licenses.

OMG BPMN Specification License (https://www.omg.org/spec/BPMN)
--------------------------------------------------------------
jbpm/jbpm-bpmn2/src/main/resources/META-INF/BPMN20.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/BPMNDI.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/DC.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/DI.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/Semantic.xsd
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here I need your help and proposals team. How would you proceed? I struggle to find LICENSE/NOTICE information for given files.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @jomarko , I found that BPMN 2.0 spec PDF contains "LICENSE" section. https://www.omg.org/spec/BPMN/2.0/PDF It's better to double-check with jBPM team @krisv @fjtirado

Btw, see my PR updates, IPMC prefers adding all LICENSE texts in single LICENSE file rather than having them under licenses directory. apache/incubator-kie-drools#6153

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, I have deleted the licenses folder, however, the actual license text is still a question, I do not think it is actually something from the PDF.

Currently @porcelli and @LightGuard is looking into it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pushed the "LICENSES" part from the PDF, anyone who knows what parts from the PDF should be copied into LICENSE file, please share your knowledge.

Comment on lines 40 to 42
java -jar apache-rat-0.17-20241115.065104-374.jar --input-exclude-file .rat-excludes -- . > .tmp-rat-check-output
cat .tmp-rat-check-output
grep "Files with unapproved licenses:" .tmp-rat-check-output && rm .tmp-rat-check-output && echo "There are files with missing or unapproved license headers." && exit 1 || rm .tmp-rat-check-output && echo "All files have correct license headers."
Copy link
Contributor

Choose a reason for hiding this comment

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

@jomarko Oh, it's a great catch that rat 17 supports glob pattern (https://creadur.apache.org/rat017/apache-rat/). I'll align with it in drools.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tkobayas yes, however It seems, we need an agreement of using snapshot before we proceed with this, see the discussion here apache/incubator-kie-tools#2746 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay.

@jomarko jomarko changed the title kie-issues#1613: Add license header kie-issues#1613: Add CI :: Check license headers GitHub Actions workflow Nov 18, 2024
LICENSE Outdated
Comment on lines 204 to 224
------------------------------------------------------------------------------------
for jbpm/jbpm-bpmn2/src/main/resources/META-INF/BPMN20.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/BPMNDI.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/DC.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/DI.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/Semantic.xsd

(https://www.omg.org/spec/BPMN/2.0/PDF)
The companies listed above have granted to the Object Management Group, Inc. (OMG) a nonexclusive, royalty-free,
paid up, worldwide license to copy and distribute this document and to modify this document and distribute copies of the
modified version. Each of the copyright holders listed above has agreed that no person shall be deemed to have infringed
the copyright in the included material of any such copyright holder by reason of having used the specification set forth
herein or having conformed any computer software to the specification.
Subject to all of the terms and conditions below, the owners of the copyright in this specification hereby grant you a fullypaid up, non-exclusive, nontransferable, perpetual, worldwide license (without the right to sublicense), to use this
specification to create and distribute software and special purpose specifications that are based upon this specification,
and to use, copy, and distribute this specification as provided under the Copyright Act; provided that: (1) both the
copyright notice identified above and this permission notice appear on any copies of this specification; (2) the use of the
specifications is for informational purposes and will not be copied or posted on any network computer or broadcast in any
media and will not be otherwise resold or transferred for commercial purposes; and (3) no modifications are made to this
specification. This limited permission automatically terminates without notice if you breach any of these terms or
conditions. Upon termination, you will destroy immediately any copies of the specifications in your possession or control
Copy link
Contributor

Choose a reason for hiding this comment

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

@pjfanning Could kindly give an advice about this topic? For BPMN 2.0 xsd files, we are not very sure where to find the license for them. In this PR, we take "LICENSES" section from https://www.omg.org/spec/BPMN/2.0/PDF . Do you think it's okay?

Copy link

@pjfanning pjfanning Nov 18, 2024

Choose a reason for hiding this comment

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

I would suggest creating a JIRA at https://issues.apache.org/jira/projects/LEGAL ? I am no expert but this doesn't look good to me - these terms seem unsafe for use by anyone other than Object Management Group, Inc. (OMG).

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

License for DMN spec from OMG is also being worked on apache/incubator-kie-drools#6156

This reverts commit 3e4e2f8.
LICENSE Outdated
jbpm/jbpm-bpmn2/src/main/resources/META-INF/DI.xsd
jbpm/jbpm-bpmn2/src/main/resources/META-INF/Semantic.xsd

TODO put license text for files listed above here.
Copy link
Contributor

@tkobayas tkobayas Nov 21, 2024

Choose a reason for hiding this comment

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

I don't know when https://issues.apache.org/jira/browse/LEGAL-690 will be answered, but I hope it wouldn't be a blocker for 10.0.0 release. At least for this PR, I think you can keep the "TODO", or align with drools main (https://github.com/apache/incubator-kie-drools/blob/main/LICENSE#L248-L382 , note that it was taken from DMN spec, this PR needs to take from BPMN spec). @porcelli thoughts?

@jomarko jomarko changed the title kie-issues#1613: Add CI :: Check license headers GitHub Actions workflow [DO NOT MERGE][WORK IN PROGRESS]kie-issues#1613: Add CI :: Check license headers GitHub Actions workflow Nov 21, 2024
@jomarko jomarko changed the title [DO NOT MERGE][WORK IN PROGRESS]kie-issues#1613: Add CI :: Check license headers GitHub Actions workflow kie-issues#1613: Add CI :: License headers GitHub Actions workflow Nov 22, 2024
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
5 participants