Skip to content

Commit

Permalink
move send chunks logs to debug
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Bertschy <matthias.bertschy@gmail.com>
  • Loading branch information
matthyx committed Mar 22, 2023
1 parent 0456861 commit 5e5ab11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adapters/v1/armo_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (a *ArmoAdapter) postResults(ctx context.Context, report *v1.ScanResultRepo
errorChan <- err
return
}
logger.L().Info(fmt.Sprintf("posting to event receiver image %s wlid %s finished successfully response body: %s", imagetag, wlid, body)) // systest dependent
logger.L().Debug(fmt.Sprintf("posting to event receiver image %s wlid %s finished successfully response body: %s", imagetag, wlid, body)) // systest dependent
}

func (a *ArmoAdapter) sendVulnerabilitiesRoutine(ctx context.Context, chunksChan <-chan []containerscan.CommonContainerVulnerabilityResult, eventReceiverURL string, scanID string, finalReport v1.ScanResultReport, errChan chan error, sendWG *sync.WaitGroup, totalVulnerabilities int, firstChunkVulnerabilitiesCount int, nextPartNum int) {
Expand Down
4 changes: 3 additions & 1 deletion core/services/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (s *ScanService) ScanCVE(ctx context.Context) error {
if !ok {
return errors.New("no workload found in context")
}
logger.L().Info("scan started", helpers.String("imageID", workload.ImageHash), helpers.String("jobID", workload.JobID))

// report to platform
err := s.platform.SendStatus(ctx, domain.Started)
Expand Down Expand Up @@ -187,7 +188,7 @@ func (s *ScanService) ScanCVE(ctx context.Context) error {
logger.L().Ctx(ctx).Warning("telemetry error", helpers.Error(err), helpers.String("imageID", workload.ImageHash))
}
// submit CVE manifest to platform
err = s.platform.SubmitCVE(ctx, cve, cvep) // check name to use instanceID
err = s.platform.SubmitCVE(ctx, cve, cvep)
if err != nil {
return err
}
Expand All @@ -197,6 +198,7 @@ func (s *ScanService) ScanCVE(ctx context.Context) error {
logger.L().Ctx(ctx).Warning("telemetry error", helpers.Error(err), helpers.String("imageID", workload.ImageHash))
}

logger.L().Info("scan complete", helpers.String("imageID", workload.ImageHash), helpers.String("jobID", workload.JobID))
return nil
}

Expand Down

0 comments on commit 5e5ab11

Please sign in to comment.