Skip to content

feat(LicenseInfo): enrich parsed licenses with LicenseDB obligations - #4439

Open
Sandipmandal25 wants to merge 1 commit into
eclipse-sw360:feat/licensedb/integrationfrom
Sandipmandal25:feat/licensedb-obligation-enrichment
Open

feat(LicenseInfo): enrich parsed licenses with LicenseDB obligations#4439
Sandipmandal25 wants to merge 1 commit into
eclipse-sw360:feat/licensedb/integrationfrom
Sandipmandal25:feat/licensedb-obligation-enrichment

Conversation

@Sandipmandal25

Copy link
Copy Markdown
Contributor

Summary

Enriches CLI license obligations from SW360/CouchDB when LicenseDB integration is enabled.

Changes

  • Reuses the existing CLIParser CouchDB license enrichment flow.
  • Fetches obligations for the matched SW360 license.
  • Applies only LicenseDB-managed obligations identified by licensedb-ob-id.
  • Keeps non LicenseDB/manual obligations untouched.

Suggested Reviewers

@GMishx
@deo002
@Farooq-Fateh-Aftab

@Sandipmandal25
Sandipmandal25 marked this pull request as draft August 6, 2026 08:20
@Sandipmandal25
Sandipmandal25 force-pushed the feat/licensedb-obligation-enrichment branch from e426474 to 7774be7 Compare August 6, 2026 09:54
@Sandipmandal25
Sandipmandal25 marked this pull request as ready for review August 6, 2026 10:05
@Sandipmandal25

Copy link
Copy Markdown
Contributor Author

small note: the Licensedb obligation id key is written directly here. i kept it this way to avoid adding extra dependency from another module but i can move it to a shared constant if needed.

@Sandipmandal25

Copy link
Copy Markdown
Contributor Author

@GMishx i m not 100% sure if this is exactly the flow you had in mind,but my understanding was to refresh licensedb managed obligations from couchdb during cli enrichment similar to the license text flow. happy to adjust if you suggest a better approach.

Set<ObligationAtProject> enrichedObligations = new HashSet<>();
for (Obligation obligation : obligations) {
if (obligation.getExternalIds() == null
|| !obligation.getExternalIds().containsKey("licensedb-ob-id")) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please use constants like LicenseDBDataMapper.EXTERNAL_ID_LICENSEDB_OB

licenses-core can be made part of this module if it is not breaking any other module. If there are breakages, move it as a constant of this class.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

licenses-core isnt a dependency of the licenseinfo module so so defined the constant locally

@GMishx

GMishx commented Aug 6, 2026

Copy link
Copy Markdown
Member

@GMishx i m not 100% sure if this is exactly the flow you had in mind,but my understanding was to refresh licensedb managed obligations from couchdb during cli enrichment similar to the license text flow. happy to adjust if you suggest a better approach.

Yes, this is exactly what we discussed on Tuesday 👍

@Sandipmandal25
Sandipmandal25 force-pushed the feat/licensedb-obligation-enrichment branch from 7774be7 to bb51131 Compare August 7, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants