Follow-up from "Preemptively destroy project-related CI records before the Project#destroy callbacks"
This issue should probably be taken care of with the rollout of #341936 (closed) as part of the cleanup.
The following should be cleaned up:
deleted_count = project.commit_statuses.delete_all
if deleted_count > 0
Gitlab::AppLogger.info "Projects::DestroyService - Project #{project.id} - #{deleted_count} leftover commit statuses"
end
This code was added as a temporary measure to observe any discrepancies in case something deletes a project outside of the DestroyService. If everything goes well, there shouldn't be any records.
The following discussion from !71342 (merged) should be addressed:
-
@mbobin started a discussion: (+1 comment) Why are we doing this? Is there any way in which we could have a commit status without a pipeline?