Open flbla opened 4 months ago
Because there is an interval between the reportMgr.Get and the reportMgr.Create https://github.com/goharbor/harbor/blob/970bdab936d0755467123878a63e8cfb002d8e6b/src/controller/scan/base_controller.go#L547
If some other user trigger the scan of same digest at this interval, it will cause this issue. To fix this issue, we need to change the reportMgr.Create into InsertOrUpdate
This issue is low impact because user could retrigger the scan.
This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.
If you are reporting a problem, please make sure the following information are provided:
Expected behavior and actual behavior:
When a scan is launched (manually or via a push) we randomly get this error :
In my postgresql logs I can see :
harbor core log :
it looks like harbor try to scan the same artifact more than once, but I don't know why.
Steps to reproduce the problem: it's random
Versions: Please specify the versions of following systems.