Skip to content

Commit

Permalink
Fix PURL mismatch of INTEGRITY_META_COMPONENT records
Browse files Browse the repository at this point in the history
When initializing records prior to event dispatch, the API server would use the PURL *coordinates* (i.e., excluding qualifiers etc.). However, analysis results arrive for the full PURL (which is correct).

When processing results, the API server failed to correlate the received result with the INTEGRITY_META_COMPONENT record it had created earlier.

As a result, integrity analysis did not work for component with PURLs that have qualifiers.

Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Dec 1, 2024
1 parent 7f19d70 commit 4acd7c2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1032,9 +1032,9 @@ private static List<ComponentRepositoryMetaAnalysisEvent> createRepoMetaAnalysis
}

private static boolean prepareIntegrityMetaComponent(final QueryManager qm, final Component component) {
final IntegrityMetaComponent integrityMetaComponent = qm.getIntegrityMetaComponent(component.getPurlCoordinates().toString());
final IntegrityMetaComponent integrityMetaComponent = qm.getIntegrityMetaComponent(component.getPurl().toString());
if (integrityMetaComponent == null) {
qm.createIntegrityMetaHandlingConflict(AbstractMetaHandler.createIntegrityMetaComponent(component.getPurlCoordinates().toString()));
qm.createIntegrityMetaHandlingConflict(AbstractMetaHandler.createIntegrityMetaComponent(component.getPurl().toString()));
return true;
} else if (integrityMetaComponent.getStatus() == null
|| (integrityMetaComponent.getStatus() == FetchStatus.IN_PROGRESS
Expand Down

0 comments on commit 4acd7c2

Please sign in to comment.