ActiveRecord::InvalidForeignKey Sidekiq/Vulnerabilities::Statistics::AdjustmentWorker
Summary
Vulnerabilities::Statistics::AdjustmentWorker is failing due to invalid foreign keys.
What is the current bug behavior?
The worker is failing to run adjustment logic.
What is the expected correct behavior?
It shouldn't be failing to run the adjustment logic.
Relevant logs and/or screenshots
- https://new-sentry.gitlab.net/organizations/gitlab/issues/583110
- https://new-sentry.gitlab.net/organizations/gitlab/issues/514394
Possible fixes
-
backend Join the projects table while UPSERTing the records to ignore the recently deleted projects
Edited by Mehmet Emin INAC