diff --git a/service/src/main/java/org/jboss/sbomer/service/feature/sbom/service/AdvisoryService.java b/service/src/main/java/org/jboss/sbomer/service/feature/sbom/service/AdvisoryService.java index 451a321ea..370c3623a 100644 --- a/service/src/main/java/org/jboss/sbomer/service/feature/sbom/service/AdvisoryService.java +++ b/service/src/main/java/org/jboss/sbomer/service/feature/sbom/service/AdvisoryService.java @@ -281,10 +281,13 @@ private Collection handleStandardAdvisory(RequestEvent re // Otherwise SBOMer will default to the creation of build manifests. Will change in future! V1Beta1RequestRecord successfulRequestRecord = null; if (ErrataStatus.SHIPPED_LIVE.equals(details.getStatus())) { + log.debug("Errata status is SHIPPED_LIVE, looking for successful request records for advisory {}", erratum.getDetails().get().getId()); successfulRequestRecord = sbomService .searchLastSuccessfulAdvisoryRequestRecord(String.valueOf(erratum.getDetails().get().getId())); } + log.debug("Successful request records found: {}", successfulRequestRecord); + if (successfulRequestRecord == null) { return createBuildManifestsForDockerBuilds(requestEvent, buildDetails); } else { @@ -424,6 +427,8 @@ protected Collection createReleaseManifestsForDockerBuild return doIgnoreRequest(requestEvent, "Standard Errata container images manifest generation is disabled"); } + log.debug("Creating release manifests for Docker builds for advisory {}", erratum.getDetails().get().getId()); + Map releaseGenerations = createReleaseManifestsGenerationsForType( erratum, requestEvent, diff --git a/service/src/main/java/org/jboss/sbomer/service/feature/sbom/service/RequestEventRepository.java b/service/src/main/java/org/jboss/sbomer/service/feature/sbom/service/RequestEventRepository.java index 76af84a15..50107e89d 100644 --- a/service/src/main/java/org/jboss/sbomer/service/feature/sbom/service/RequestEventRepository.java +++ b/service/src/main/java/org/jboss/sbomer/service/feature/sbom/service/RequestEventRepository.java @@ -65,8 +65,10 @@ import jakarta.enterprise.context.ApplicationScoped; import jakarta.persistence.Query; +import lombok.extern.slf4j.Slf4j; @ApplicationScoped +@Slf4j public class RequestEventRepository extends CriteriaAwareRepository { public RequestEventRepository() { @@ -324,6 +326,8 @@ public List searchAggregatedResultsNatively(String filter) throw new ClientException("Unsupported typeKey '" + typeKey + "'. Allowed values: " + ALLOWED_TYPE_KEYS); } + log.debug("Natively searching records for type '{}' and value '{}'", typeKey, typeValue); + // Build the native SQL query StringBuilder sb = new StringBuilder().append("SELECT ") .append("re.id AS request_id, ")