Deleted vulnerability_remediations records leave behind uploads records
On staging-ref.gitlab.com it looks like vulnerability_remediations records were deleted, but there are orphaned uploads records still referencing them - this is another occurrence of this issue - #462724 (closed)
Example -
irb(main):012:0> Upload.verification_state_table_class.where(verification_state: 3).last
=>
#<Geo::UploadState:0x00007ef2a3db3e30
verification_started_at: Tue, 24 Sep 2024 10:29:10.508802000 UTC +00:00,
verification_retry_at: Tue, 24 Sep 2024 10:41:14.621502000 UTC +00:00,
verified_at: Tue, 24 Sep 2024 10:29:10.621585000 UTC +00:00,
upload_id: 24136,
verification_state: 3,
verification_retry_count: 5,
verification_checksum: nil,
verification_failure:
"Error during verification: undefined method `underscore' for NilClass:Class\n\n File.join(model.class.underscore, mounted_as.to_s, model.id.to_s)\n ^^^^^^^^^^^">
An attempt to clear these records was made via a cleanup as per #486110 (comment 2136518197), however the orphaned records started to re-appear again shortly after.
[#<Geo::UploadState:0x00007b5688df2ca8
verification_started_at: Mon, 30 Sep 2024 19:03:02.988260000 UTC +00:00,
verification_retry_at: Mon, 30 Sep 2024 19:14:25.015033000 UTC +00:00,
verified_at: Mon, 30 Sep 2024 19:03:03.015220000 UTC +00:00,
upload_id: 24980,
verification_state: 3,
verification_retry_count: 5,
verification_checksum: nil,
verification_failure: "Error during verification: undefined method `underscore' for NilClass:Class\n\n File.join(model.class.underscore, mounted_as.to_s, model.id.to_s)\n ^^^^^^^^^^^">]
Please see #486110 (closed) for more info.
Edited by 🤖 GitLab Bot 🤖