You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.
The Artifact::mergeWith method will not work correctly if there are two artifacts with the same coordinates and facts but different content.
Steps to reproduce
Option:
Run example-projects/example-project with the CSVAnalyzer and csv file, which contains two artifacts with same coordinates, but different declared licenses:
Artifact Id;Group Id;Version;Coordinate Type;Effective License;Declared License;Observed License;Copyrights;Hash;Source URL;Release Tag URL;Software Heritage ID;Clearing State;Change Status;CPE;File Name
commons-cli;org.apache.commons;1.4;mvn;;Apache-2.0;;;;;;;;;;
commons-cli;org.apache.commons;1.4;mvn;;MIT;;;;;;;;;;
Option:
Run the code snippet from the comment below
Acceptance Criteria
The mergeWith method works properly when merging two artifacts with the same coordinates and facts.
Definition of Done
Acceptance criteria fulfilled
A test case is created to reproduce the bug
A PR is created, the CI infrastructure reports green, the bug test case proves that bug is fixed
The PR is reviewed and approved
No TODOs left in the code unless explained in the ticket, if something else is still open, this is summarized in a comment in the issue
Documentation is updated
The text was updated successfully, but these errors were encountered:
From the discussion: Artifact::mergeWith: This method should be reworked because it does not work correctly if there are two artifacts with the same coordinates and facts but different content e.g.:
a1 before mergeWith (license1): a1 after mergeWith (license2):
ProcessingState::applyWorkflowStepResult:
IMO this method works properly and serves its purpose when using it the analyzers and processors. All artifacts from the analyzers are flattened to one list and every processor will overwrite the artifacts from the step before, because it was enriched with new information.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Summary of the Bug
The
Artifact::mergeWith
method will not work correctly if there are two artifacts with the same coordinates and facts but different content.Steps to reproduce
Run
example-projects/example-project
with the CSVAnalyzer and csv file, which contains two artifacts with same coordinates, but different declared licenses:Run the code snippet from the comment below
Acceptance Criteria
mergeWith
method works properly when merging two artifacts with the same coordinates and facts.Definition of Done
The text was updated successfully, but these errors were encountered: