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

chore(licenseinfo): Reporting Improvements Part 2 #433 #433

Merged

Conversation

dreh23
Copy link

@dreh23 dreh23 commented Jan 9, 2019

  • Development Detail table
  • Additional Requirement table

Signed-off-by: Johannes Amorosa johannes.amorosa@endocode.com

@dreh23 dreh23 changed the title Added Reporting features: chore(licenseinfo): Reporting Improvements Part 2 #433 Jan 10, 2019
@mcjaeger mcjaeger added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Jan 10, 2019
@maierthomas maierthomas self-requested a review January 15, 2019 10:16
Copy link
Contributor

@maierthomas maierthomas left a comment

Choose a reason for hiding this comment

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

Does it make sense to store only the compId in LicenseInfoParsingResult and get all relevant information/data like swplatform, language... in the docxGernator instead of saving these data directly to the LicenseInfoParisingResult?

@@ -70,6 +70,10 @@ struct LicenseInfoParsingResult {
31: optional string name,
32: optional string version,
33: optional string componentType,

42: optional set<string> componentLanguages,
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 point here, agreeing with @maierthomas is that we have this not as part of the backend service API for the license info service - it appears rather as information that is processed internally to generate the document. Thus I also propose to pull this off from the API of the license inform service.

Copy link
Contributor

Choose a reason for hiding this comment

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

@dreh23 please have a look

@mcjaeger
Copy link
Contributor

tested, works, but is conflicting
(also there seem to be a problem with SPDX files)

@dreh23 dreh23 force-pushed the johannesamorosa/ReportingPart2 branch from 770609e to de7de6f Compare February 21, 2019 21:03
@mcjaeger
Copy link
Contributor

@dreh23 I wondered in testing where is the setting for platform in the UI - was not able to test it

@mcjaeger mcjaeger self-requested a review February 22, 2019 16:17
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.

Handling collection values seems to work with one value but not with multiple values.

image

@mcjaeger
Copy link
Contributor

@dreh23 seems to be conflicting, maybe because of the merge of the previous pull request PR#438

@mcjaeger
Copy link
Contributor

mcjaeger commented Mar 8, 2019

@dreh23 please try to resolve the conflicts

@mcjaeger
Copy link
Contributor

@dreh23 signed commit?

@hemarkus hemarkus force-pushed the johannesamorosa/ReportingPart2 branch 2 times, most recently from b198376 to 169463d Compare March 14, 2019 07:23
@mcjaeger mcjaeger added WIP work in progress and removed WIP work in progress has merge conflicts labels Mar 14, 2019
@mcjaeger mcjaeger added needs code review and removed WIP work in progress needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 14, 2019
@mcjaeger mcjaeger self-requested a review March 14, 2019 14:08
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.

tested and looks OK

@@ -70,6 +70,10 @@ struct LicenseInfoParsingResult {
31: optional string name,
32: optional string version,
33: optional string componentType,

42: optional set<string> componentLanguages,
Copy link
Contributor

Choose a reason for hiding this comment

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

@dreh23 please have a look

@imaykay imaykay assigned imaykay and unassigned maierthomas Mar 21, 2019
@imaykay
Copy link
Contributor

imaykay commented Mar 21, 2019

Do we have any issue ticket that explains what the feature idea behind this PR is? I mean, tests seem to be already successful, but for code review it also interesting what should be achieved - at least for me.

/cc @mcjaeger @dreh23 @hemarkus

@@ -151,6 +157,8 @@ private void fillReportDocument(
String projectDescription = project.getDescription();

fillOverview3rdPartyComponentTable(document, projectLicenseInfoResults);
fillDevelopmentDetailsTable(document, project, user);
Copy link
Contributor

Choose a reason for hiding this comment

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

If this table is placed before the 3rd party table in the document then I think it would be nice to see this in the structure of the code.

Choose a reason for hiding this comment

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

done

row.addNewTableCell().setText(langs);
LOGGER.info(String.format("langs: %s", langs));

String platforms = component.getSoftwarePlatforms().isEmpty() ? "Unknown platforms" : String.join(" ", component.getSoftwarePlatforms());
Copy link
Contributor

Choose a reason for hiding this comment

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

At least with my data, getSoftwarePlatforms() has been NULL, so I could not generate the file because of a NPE. So maybe all these isEmpty() checks should have a null check first.

Choose a reason for hiding this comment

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

Even though I could not reproduce this I see the chance to hit a null reference due to Thirft. I added a check before accessing it.

@@ -169,10 +177,14 @@ private void fillReportDocument(

fillSpecialOSSRisksTable(document, project, obligationResults);

fillReleaseBulletList(document, projectLicenseInfoResults);
fillReleaseDetailList(document, projectLicenseInfoResults, includeObligations);
fillAdditionalRequirementsTable(document, obligationResults);
Copy link
Contributor

Choose a reason for hiding this comment

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

I know, there order was also not correct before your change, but maybe you could clean this up a bit? Maybe not only the order of the method calls but also the order of the methods in the class?

Choose a reason for hiding this comment

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

Actually those where not even supposed to be called here. Removed.

row.addNewTableCell().setText(key.topic);
row.addNewTableCell().setText(licensesString);
row.addNewTableCell().setText(key.text);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I have no clue about the meanings of the different sections, but would some divider be of help here because the release bullet list just comes next?

Choose a reason for hiding this comment

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

See above

@imaykay imaykay added WIP work in progress and removed needs code review labels Mar 21, 2019
@imaykay imaykay removed their assignment Mar 21, 2019
@dreh23
Copy link
Author

dreh23 commented Mar 22, 2019

@imaykay There are tickets https://github.com/siemens/sw360/projects/1 and there is a reference documentation that was provided which describes some aspects of the features. If @mcjaeger agrees I can share this doc with you.

On a side note I am not any more involved in the development of sw360. Please contact @hemarkus for any further questions.

@imaykay
Copy link
Contributor

imaykay commented Mar 29, 2019

Code looks better now, but the latest changes do change a few things in the generated document. So maybe @mcjaeger, you want to retest if the result is still what you want it to be.

@hemarkus it would be nice if you could squash your commits into a single one like it is mentioned here https://github.com/eclipse/sw360/wiki/Dev-DoD-and-Style in section "Commit style".

Add Development Detail table and Additional Requirement table to the
report document. Also order the calls to reflect the acutal documemt
structure in code.

Additionally refactor/fix nested loops.

Signed-off-by: Markus Herpich <markus@endocode.com>
@hemarkus hemarkus force-pushed the johannesamorosa/ReportingPart2 branch from 5d041b2 to 67975c2 Compare March 29, 2019 10:31
@mcjaeger mcjaeger merged commit b207789 into eclipse-sw360:master Mar 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants