Skip to content

Commit 8af9f43

Browse files
committed
indexer: Reprocess unfinished index reports
If a manifest has scanned with all it's scanners it _should_ end up with a completed index report in the IndexFinished state. If it does not then it will not be possible to query this manifest. To fix an incomplete index report it will need rescanning so trigger a rescan. Signed-off-by: Iain Duncan <[email protected]>
1 parent ffed2b8 commit 8af9f43

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

indexer/controller/checkmanifest.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,12 @@ func checkManifest(ctx context.Context, s *Controller) (State, error) {
7070
return Terminal, fmt.Errorf("failed to retrieve manifest: %w", err)
7171
}
7272
s.report = sr
73+
if sr.State != IndexFinished.String() {
74+
// The manifest has been processed with all the Scanners but the index report did not end up in the IndexFinished state.
75+
// This means that something must have gone wrong along the way so reprocess the manifest again.
76+
// Do not do any filtering of the Vscnrs as we do not went wrong during the scanning process.
77+
return FetchLayers, nil
78+
}
7379

7480
return Terminal, nil
7581
}

0 commit comments

Comments
 (0)