Migration failures due to missing previously pre-imported manifests
Problem
While importing large repositories as part of gitlab#350920 (closed), we're seeing multiple imports breaking due to the following error:
1 error occurred: * pre importing tagged manifests: previously pre-imported manifest "sha256:638b474f73934b8acc646ac6535f5aa97d80f43c85844f50f0b6cf5c714ef690" not found in database
To fix #652 (closed), we made a change (!982 (merged)) to ensure that we always fully pre-import repositories on retries. As part of that, we avoid fully re-importing a manifest and its references if they were already imported while processing another tag. However, if they were imported when processing another tag but are missing when we look for then after that, we log this error.
We must identify why these manifests went missing between the processing of different tags.