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

feat(SPDX): Use new SPDX library and New SPDX feature for import/export/edit #1503

Conversation

tuannn2
Copy link
Contributor

@tuannn2 tuannn2 commented Apr 8, 2022

Signed-off-by: tuan99123 tuan2.nguyennhu@toshiba.co.jp

Please provide a summary of your changes here.

  • Which issue is this pull request belonging to and how is it solving it? (Refer to issue here)
  • Did you add or update any new dependencies that are required for your change?

Issue: #1171 #1240 #1496

Suggest Reviewer

You can suggest reviewers here with an @mention.

How To Test?

Please refer issue #1171 #1240 #1496

  1. Test Import , Export for Project
  • Import Project
    ImportProject
  • Export Project
    ExportProject
  1. Test Import, Export for Component
  • Import Component
    import Component
  • Export Component
    ExportComponent
  1. SPDX Documement is New tab in Component Release pages for showing SPDX Full/SPDX Lite data
  • View for SPDX Full Page
    FullPage SPDX Full
  • View for SPDX Lite Page
    FullPage SPDX LITE
  • Edit for SPDX Full Page
    FullPage EDIT SPDX FULL
  • Edit for SPDX Lite Page
    FullPage EDIT SPDX LITE

Checklist

Must:

  • All related issues are referenced in commit messages and in PR

@tuannn2 tuannn2 force-pushed the releases/feature-spdx_information_management branch from 723f58c to 034daf4 Compare April 12, 2022 02:04
@KoukiHama KoukiHama added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for and removed WIP work in progress do not merge - нет! labels Apr 14, 2022
@KoukiHama KoukiHama assigned KoukiHama and unassigned KoukiHama Apr 14, 2022
@KoukiHama KoukiHama changed the title feat(SPDX): Use new SPDX library version 1.0.3 or later feat(SPDX): Use new SPDX library and import/export/edit SPDX Apr 14, 2022
@KoukiHama KoukiHama added do not merge - нет! and removed needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Apr 14, 2022
@KoukiHama KoukiHama changed the title feat(SPDX): Use new SPDX library and import/export/edit SPDX feat(SPDX): Use new SPDX library and New SPDX for import/export/edit Apr 14, 2022
@KoukiHama KoukiHama changed the title feat(SPDX): Use new SPDX library and New SPDX for import/export/edit feat(SPDX): Use new SPDX library and New SPDX feature for import/export/edit Apr 14, 2022
@tienlee
Copy link
Contributor

tienlee commented Apr 15, 2022

@KoukiHama Could you please try to build again?
About "how to test" section, I will add the explanation in the next Monday.

@KoukiHama
Copy link
Member

@tienlee I re-run CI, but it failed.

@tienlee
Copy link
Contributor

tienlee commented Apr 17, 2022

@tienlee I re-run CI, but it failed.

I will check it tomorrow

@nam-np
Copy link
Contributor

nam-np commented Apr 18, 2022

Can run Github action locally for checking
https://github.com/nektos/act

@tuannn2 tuannn2 force-pushed the releases/feature-spdx_information_management branch from 034daf4 to c4234b9 Compare April 18, 2022 02:11
@nam-np
Copy link
Contributor

nam-np commented Apr 19, 2022

I think we should be change
sw360/backend/src-common/src/test/resources/bom.spdx.rdf
to
https://github.com/spdx/tools/blob/master/Examples/SPDXRdfExample-v2.1.rdf

Because with new spdx lib, we need more information in spdx file and if spdx file is standard format, it can work normally.

@tuannn2 tuannn2 force-pushed the releases/feature-spdx_information_management branch 5 times, most recently from 4155696 to 9fdd997 Compare April 25, 2022 10:37
@KoukiHama KoukiHama added the needs general test This is general testing, meaning that there is no org specific issue to check for label Apr 28, 2022
@tuannn2 tuannn2 force-pushed the releases/feature-spdx_information_management branch from 73efd4c to 2daca6e Compare April 28, 2022 10:26
@KoukiHama
Copy link
Member

@tuannn2 please rebase branch for running CI

@tuannn2
Copy link
Contributor Author

tuannn2 commented May 13, 2022

Thank you @KoukiHama! I have finished rebase and CI is running successfully. Please check it.

@tuannn2 tuannn2 force-pushed the releases/feature-spdx_information_management branch from bb29d82 to ef94a18 Compare May 24, 2022 08:40
@mcjaeger mcjaeger self-assigned this Jun 1, 2022
@tuannn2 tuannn2 force-pushed the releases/feature-spdx_information_management branch from 7dee8c6 to 229c90d Compare June 8, 2022 09:29
…es for showing SPDX/SPDX Lite data (eclipse-sw360#1240)

Signed-off-by: tuan99123 <tuan2.nguyennhu@toshiba.co.jp>
@rudra-superrr
Copy link
Contributor

@tuannn2 , @KoukiHama while testing this PR we tried couple of rdf files and also the example.rdf file (#653) given here, below are the following findings:

  • While importing the component, releases are not getting imported
  • Not showing proper information of components while importing
  • Page not getting reloaded after importing the rdf file through upload SBOM functionality
  • Export SBOM functionality not working for components
  • After creating a release, spdx document not showing any information regarding that release but if we edit that release's spdx document, then information is getting shown.

or am I missing something? Also can you provide me the rdf files that you used for testing.

importComp

Showing details for only 1 component and 1 release but the rdf file that I'm importing contains 4 components and 4 releases.
Also release not getting imported

NoRelease

spdxDoc
Spdx Document not showing any information for the release

@tuannn2 tuannn2 force-pushed the releases/feature-spdx_information_management branch from c2a859f to cfdd73f Compare June 23, 2022 03:38
@tuannn2
Copy link
Contributor Author

tuannn2 commented Jun 23, 2022

Thank you for checking my PR, @rudra-superrr
I think example.rdf file (#653), itself has some issue. I will provide you with an example.rdf or example.spdx file for you to use for testing.
Let me know if you have any problem testing PR.
Please remove the .txt file extension before testing.

example.spdx.txt
example.rdf.txt

The test file is taken from https://github.com/spdx/tools/tree/master/Examples for new spdx lib.

@tuannn2 tuannn2 force-pushed the releases/feature-spdx_information_management branch from cfdd73f to 1e45b5b Compare June 23, 2022 04:27
@KoukiHama
Copy link
Member

FYI : This is the validation tool for SPDX file.
https://tools.spdx.org/app/validate/

@KoukiHama KoukiHama added in progress needs clarification and removed needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Jul 6, 2022
@arunazhakesan
Copy link
Contributor

@akapti Can you point to the work you did in Dec 2021, where we demonstrated the export of SPDX data at project level. We need to align with TOSHIBA colleagues here and see if there is any redundant work from our side and close the gap at the earliest.

@KoukiHama
Copy link
Member

@tienlee could you share latest status about pull request?
Now Toshiba have some branch about SPDX functions.

@tienlee
Copy link
Contributor

tienlee commented Aug 10, 2022

This PR should not be merged.
We plan to split this PR into small parts, so it will be easier for you to review.
The first one is PR 1594.

After PR 1594 is merged, we will create the second one. In this one, SPDX document tab function was implemented. In addition, import SPDX (rdf files for project, component and releases) functions are also added. It's ready in branch https://github.com/toshiba/sw360/tree/dev/feature-tab_spdx_document

Then, we will create the next PR for new functions such as import the releases by Json file and export the releases to multiple formats.

@tienlee
Copy link
Contributor

tienlee commented Aug 10, 2022

About this PR, there are the following functions:

  1. Apply new SPDX library (PR 1594)
    Only upgrade the SPDX library to a newer version.
    The specifications of all functions are not changed.
    However, Importing 4 components and 4 releases does not work. So, we will provide the 2nd PR

  2. Import/Export project (multi components, releases) (2nd PR)

image

  1. Import/Export components (multi releases) (2nd PR)

image

  1. SPDX document tab (2nd PR)
    This is a new function.

image

  1. Import releases by rdf/JSON file (3rd PR)
    This is a new function.

image

  1. Export releases to multiple formats (3rd PR)
    This is a new function.

image

@ag4ums
Copy link
Contributor

ag4ums commented Mar 8, 2023

closing this as the work is carried to the other PR #1682

@ag4ums ag4ums closed this Mar 8, 2023
@hoangnt2 hoangnt2 deleted the releases/feature-spdx_information_management branch August 30, 2023 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment