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

fix(report): corrections to report #526

Merged
merged 2 commits into from
Jul 22, 2019

Conversation

thegrumpylion
Copy link

As per: siemens#18

Signed-off-by: Nikolas Sepos [email protected]

@mcjaeger
Copy link
Contributor

mcjaeger commented May 13, 2019

please correct commit message as per conventional changelog https://github.com/eclipse/sw360/wiki/Dev-DoD-and-Style

@mcjaeger
Copy link
Contributor

maybe something not checked in? - from the travis CI log:

[INFO] src-licenseinfo .................................... FAILURE [  0.536 s]
[INFO] src-cvesearch ...................................... SUCCESS [ 48.930 s]
[INFO] src-schedule ....................................... SUCCESS [  0.167 s]
[INFO] src-wsimport ....................................... SUCCESS [  0.257 s]
[INFO] svc-common ......................................... SUCCESS [  0.187 s]
[INFO] backend-svc ........................................ SUCCESS [  0.039 s]
[INFO] svc-licenses ....................................... SUCCESS [  2.638 s]
[INFO] svc-users .......................................... SUCCESS [  1.638 s]
[INFO] svc-vendors ........................................ SUCCESS [  1.397 s]
[INFO] svc-search ......................................... SUCCESS [  1.629 s]
[INFO] svc-components ..................................... SUCCESS [  1.441 s]
[INFO] svc-projects ....................................... SUCCESS [  1.381 s]
[INFO] svc-attachments .................................... SUCCESS [  1.402 s]
[INFO] svc-moderation ..................................... SUCCESS [  2.470 s]
[INFO] svc-fossology ...................................... SUCCESS [  1.815 s]
[INFO] svc-vulnerabilities ................................ SUCCESS [  1.471 s]
[INFO] svc-cvesearch ...................................... SUCCESS [  1.389 s]
[INFO] svc-licenseinfo .................................... SKIPPED
[INFO] svc-schedule ....................................... SUCCESS [  1.411 s]
[INFO] svc-wsimport ....................................... SUCCESS [  1.481 s]
[INFO] backend-utils ...................................... SUCCESS [ 13.186 s]
[INFO] frontend ........................................... SUCCESS [  0.022 s]
[INFO] SW360 Layout Template .............................. SUCCESS [  0.693 s]
[INFO] sw360-portlet ...................................... SUCCESS [ 26.375 s]
[INFO] sw360-theme Theme .................................. SUCCESS [ 46.572 s]
[INFO] rest ............................................... SUCCESS [  0.030 s]
[INFO] rest-common ........................................ SUCCESS [  0.182 s]
[INFO] authorization-server ............................... SUCCESS [ 15.357 s]
[INFO] resource-server .................................... FAILURE [ 39.200 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:54 min
[INFO] Finished at: 2019-05-07T20:57:45Z
[INFO] Final Memory: 187M/850M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project src-licenseinfo: Compilation failure: Compilation failure: 
[ERROR] /home/travis/build/eclipse/sw360/backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/outputGenerators/DocxGenerator.java:[186,13] method fillAdditionalRequirementsTable in class org.eclipse.sw360.licenseinfo.outputGenerators.DocxGenerator cannot be applied to given types;
[ERROR]   required: org.apache.poi.xwpf.usermodel.XWPFDocument,java.util.Collection<org.eclipse.sw360.datahandler.thrift.licenseinfo.ObligationParsingResult>,java.util.Set<java.lang.String>
[ERROR]   found: org.apache.poi.xwpf.usermodel.XWPFDocument,java.util.Collection<org.eclipse.sw360.datahandler.thrift.licenseinfo.ObligationParsingResult>
[ERROR]   reason: actual and formal argument lists differ in length
[ERROR] /home/travis/build/eclipse/sw360/backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/outputGenerators/DocxGenerator.java:[200,52] cannot find symbol
[ERROR]   symbol:   variable OVERVIEW_TABLE_INDEX
[ERROR]   location: class org.eclipse.sw360.licenseinfo.outputGenerators.DocxGenerator
[ERROR] /home/travis/build/eclipse/sw360/backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/outputGenerators/DocxGenerator.java:[252,52] cannot find symbol
[ERROR]   symbol:   variable SPECIAL_OSS_RISKS_TABLE_INDEX
[ERROR]   location: class org.eclipse.sw360.licenseinfo.outputGenerators.DocxGenerator
[ERROR] /home/travis/build/eclipse/sw360/backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/outputGenerators/DocxGenerator.java:[271,52] cannot find symbol
[ERROR]   symbol:   variable THIRD_PARTY_COMPONENT_OVERVIEW_TABLE_INDEX
[ERROR]   location: class org.eclipse.sw360.licenseinfo.outputGenerators.DocxGenerator
[ERROR] -> [Help 1]
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project resource-server: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/travis/build/eclipse/sw360/rest/resource-server/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :src-licenseinfo
The command "mvn --fail-at-end $MVN_ARGS" exited with 1.
cache.2
store build cache
0.00s43.77schange detected (content changed, file is created, or file is deleted):
/home/travis/.m2/repository/org/eclipse/sw360/datahandler/3.4.0-SNAPSHOT/datahandler-3.4.0-SNAPSHOT.jar.lastUpdated
/home/travis/.m2/repository/org/eclipse/sw360/datahandler/3.4.0-SNAPSHOT/resolver-status.properties
/home/travis/.m2/repository/org/webjars/bowergithub/datatables/dist-datatables-bootstrap/resolver-status.properties
/home/travis/.m2/repository/org/webjars/bowergithub/datatables/dist-datatables-buttons/resolver-status.properties
/home/travis/.m2/repository/org/webjars/bowergithub/datatables/dist-datatables/resolver-status.properties
/home/travis/.m2/repository/org/webjars/bowergithub/datatables/dist-datatables-select/resolver-status.properties
/home/travis/.m2/repository/org/webjars/bowergithub/jquery/jquery-dist/resolver-status.properties
/home/travis/.m2/repository/org/webjars/bowergithub/jquery/sizzle/resolver-status.properties
changes detected, packing new archive
.
.
.
.
.
.
uploading PR.526/cache-linux-trusty-aa1cc28d6908698d28534decd3e371d6e4911f4b94959ea9427176fe77439936--jdk-openjdk8.tgz
cache uploaded

@mcjaeger mcjaeger added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for WIP work in progress labels May 15, 2019
@mcjaeger
Copy link
Contributor

@thegrumpylion ehem, could you please have a look at the a) wrong commit style and b) test issue

@mcjaeger
Copy link
Contributor

mcjaeger commented May 16, 2019

@thegrumpylion I thing despite maybe not running tests, there are more fundamental probems with the contribution. Tried this two times now, but branch is even not compiling on my (vagrant) machine....

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.916 s
[INFO] Finished at: 2019-05-16T20:39:48+00:00
[INFO] Final Memory: 98M/714M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project src-licenseinfo: Compilation failure: Compilation failure:
[ERROR] /sw360portal/backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/outputGenerators/DocxGenerator.java:[186,13] method fillAdditionalRequirementsTable in class org.eclipse.sw360.licenseinfo.outputGenerators.DocxGenerator cannot be applied to given types;
[ERROR] required: org.apache.poi.xwpf.usermodel.XWPFDocument,java.util.Collection<org.eclipse.sw360.datahandler.thrift.licenseinfo.ObligationParsingResult>,java.util.Set<java.lang.String>
[ERROR] found: org.apache.poi.xwpf.usermodel.XWPFDocument,java.util.Collection<org.eclipse.sw360.datahandler.thrift.licenseinfo.ObligationParsingResult>
[ERROR] reason: actual and formal argument lists differ in length
[ERROR] /sw360portal/backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/outputGenerators/DocxGenerator.java:[200,52] cannot find symbol
[ERROR] symbol:   variable OVERVIEW_TABLE_INDEX
[ERROR] location: class org.eclipse.sw360.licenseinfo.outputGenerators.DocxGenerator
[ERROR] /sw360portal/backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/outputGenerators/DocxGenerator.java:[252,52] cannot find symbol
[ERROR] symbol:   variable SPECIAL_OSS_RISKS_TABLE_INDEX
[ERROR] location: class org.eclipse.sw360.licenseinfo.outputGenerators.DocxGenerator
[ERROR] /sw360portal/backend/src/src-licenseinfo/src/main/java/org/eclipse/sw360/licenseinfo/outputGenerators/DocxGenerator.java:[271,52] cannot find symbol
[ERROR] symbol:   variable THIRD_PARTY_COMPONENT_OVERVIEW_TABLE_INDEX
[ERROR] location: class org.eclipse.sw360.licenseinfo.outputGenerators.DocxGenerator
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :src-licenseinfo

thrift and java version outputs:

siemagrant@ubuntu-xenial:~$ thrift -version
Thrift version 0.11.0
siemagrant@ubuntu-xenial:~$ java -version
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)

@@ -194,9 +197,9 @@ private void fillOwnerGroup(XWPFDocument document, Project project) throws XmlEx
}

private void fillAttendeesTable(XWPFDocument document, Project project) throws XmlException, TException {
XWPFTable table = document.getTables().get(0);
XWPFTable table = document.getTables().get(OVERVIEW_TABLE_INDEX);
Copy link
Contributor

Choose a reason for hiding this comment

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

seems also to me that OVERVIEW_TABLE_INDEX is at least not declared in the same class, so javac telling me it is missing this sounds likely.

@thegrumpylion thegrumpylion force-pushed the nikolas/corrections branch from 910d984 to 0db2c3e Compare May 28, 2019 13:19
@thegrumpylion thegrumpylion changed the title Corrections to the license report fix(report): corrections to report May 28, 2019
@hemarkus hemarkus force-pushed the nikolas/corrections branch from 0db2c3e to 02dba3a Compare May 28, 2019 14:56
@mcjaeger mcjaeger removed the WIP work in progress label May 29, 2019
@@ -206,6 +206,7 @@ struct Release {
53: optional set<string> operatingSystems,
54: optional COTSDetails cotsDetails,
55: optional EccInformation eccInformation,
56: optional set<string> softwarePlatforms,
Copy link
Contributor

Choose a reason for hiding this comment

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

This new field is completely independent from the list of software platforms at the component level? Why is it needed?

Copy link
Author

Choose a reason for hiding this comment

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

I don't understand the first question. It is needed because we report on the release level and not on the component level.

Copy link
Contributor

@imaykay imaykay Jun 5, 2019

Choose a reason for hiding this comment

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

There is already a field "softwarePlatforms" at the component level. As a release always belongs to a component I was wondering if the fields should really be independent. Or if there should be some logic like "the list of software platforms of a component is the aggregation of software platform lists of its releases" now that we have this field at release level.
Beside that your core idea here seems to be that the content of software platforms can change between different releases of the same component. Is that correct? Otherwise you could just get the information from the component of the release even when you report on release level.

Copy link
Author

Choose a reason for hiding this comment

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

There is already a field "softwarePlatforms" at the component level. As a release always belongs to a component I was wondering if the fields should really be independent. Or if there should be some logic like "the list of software platforms of a component is the aggregation of software platform lists of its releases" now that we have this field at release level.

Since a release already has it's own "operating systems" & "programming languages" i assumed that "software platforms" should follow suit. If this is wrong, what is the purpose of "operating systems" & "programming languages" on the release level?

Beside that your core idea here seems to be that the content of software platforms can change between different releases of the same component. Is that correct? Otherwise you could just get the information from the component of the release even when you report on release level.

Yes, that is correct. Isn't the component suppose to be more of an abstract/template of a release and the each release is what actually goes into the project?

Copy link
Contributor

Choose a reason for hiding this comment

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

maybe the field softwarePlatforms should not been created at the first hand, but if in the report, it should be taken from the component where the release belongs to. I think a similar case is type (OSS, COTS, Freeware, ...) where the field value is taken from the component when listing releases.

@thegrumpylion thegrumpylion force-pushed the nikolas/corrections branch 2 times, most recently from 3c674cb to 49f9f8e Compare June 25, 2019 16:21
@thegrumpylion thegrumpylion force-pushed the nikolas/corrections branch 2 times, most recently from 7116c18 to 04d1965 Compare July 4, 2019 12:33
@maxhbr
Copy link
Contributor

maxhbr commented Jul 8, 2019

To fix the tests, you need to blacklist setSoftwarePlatforms and softwarePlatformsSize for REST (in rest/resource-server/src/main/java/org/eclipse/sw360/rest/resourceserver/core/JacksonCustomizations.java)

@mcjaeger
Copy link
Contributor

mcjaeger commented Jul 15, 2019

@sebastian-su still merge conflicts

Screen Shot 2019-07-15 at 19 54 41

@lepokle lepokle assigned lepokle and unassigned lepokle Jul 16, 2019
@lepokle lepokle self-assigned this Jul 19, 2019
As per: siemens#18

Signed-off-by: Nikolas Sepos <[email protected]>
@lepokle lepokle force-pushed the nikolas/corrections branch from 3326038 to 2fc4bd3 Compare July 19, 2019 14:33
@lepokle lepokle dismissed imaykay’s stale review July 19, 2019 14:50

Reviewer is in vacation right now.

@lepokle
Copy link
Contributor

lepokle commented Jul 19, 2019

@mcjaeger What about your comment about the software platforms at release level?

@lepokle lepokle removed WIP work in progress has merge conflicts labels Jul 19, 2019
@mcjaeger
Copy link
Contributor

mcjaeger commented Jul 19, 2019

not covered from issue: #588
(original issue: siemens#18)

  • project responsible project owner not there
  • new field distorts layout, much dead space, 4th column while 3 only necesary:

Screen Shot 2019-07-19 at 23 13 56

* regardless what is filled out in the programming languages, the output is "N/A", also the table is not allright:

Screen Shot 2019-07-19 at 23 19 35

* another table makes from:

Screen Shot 2019-07-19 at 23 23 07

this (duplicated lines, invalid table formatting):

Screen Shot 2019-07-19 at 23 21 56

* links are not there

more info here: #588

@mcjaeger mcjaeger self-requested a review July 19, 2019 21:31
Copy link
Contributor

@mcjaeger mcjaeger left a comment

Choose a reason for hiding this comment

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

approving it, because this PR solves some issues from #588 but not all. Should be merged, because it is improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs general test This is general testing, meaning that there is no org specific issue to check for
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants