Skip to content

Commit

Permalink
fix hashmap key mangling on analysis service invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
JimFuller-RedHat committed Sep 11, 2024
1 parent bd335e1 commit f58d7df
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions modules/ingestor/src/service/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,21 @@ impl IngestorService {
match fmt {
Format::SPDX | Format::CycloneDX => {
let analysis_service = AnalysisService::new(self.graph.db.clone());
match analysis_service
.load_graphs(vec![result.id.value()], ())
.await
{
Ok(_) => log::debug!(
if result.id.to_string().starts_with("urn:uuid:") {
match analysis_service // TODO: today we chop off 'urn:uuid:' prefix using .split_off on result.id
.load_graphs(vec![result.id.to_string().split_off("urn:uuid:".len())], ())
.await
{
Ok(_) => log::debug!(
"Analysis graph for sbom: {} loaded successfully.",
result.id.value()
),
Err(e) => log::warn!(
Err(e) => log::warn!(
"Error loading sbom {} into analysis graph : {}",
result.id.value(),
e
),
}
}
}
_ => {}
Expand Down

0 comments on commit f58d7df

Please sign in to comment.