Skip to content

Commit 5bcc4ae

Browse files
committed
fix: correctly track workload and image state
The previous change introduced a regression - workload scan results are now rarely sent upstream.
1 parent a394b4e commit 5bcc4ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scanner/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ async function scanImagesAndSendResults(
138138
workload,
139139
workload.imageName,
140140
);
141-
if (workloadState === undefined || imageState === undefined) {
141+
if (workloadState === undefined && imageState === undefined) {
142142
logger.info(
143143
{ workloadName },
144144
'the workload has been deleted while scanning was in progress, skipping sending scan results',

0 commit comments

Comments
 (0)