Merge branch 'report-zero-orpahned-commit-statuses' into 'master'

Log orphaned commit statuses even if there are none

See merge request gitlab-org/gitlab!74136
This commit is contained in:
Nikola Milojevic 2021-11-10 17:21:17 +00:00
commit f5b8fd0e78

View file

@ -152,14 +152,12 @@ def destroy_ci_records!
deleted_count = project.commit_statuses.delete_all
if deleted_count > 0
Gitlab::AppLogger.info(
class: 'Projects::DestroyService',
project_id: project.id,
message: 'leftover commit statuses',
orphaned_commit_status_count: deleted_count
)
end
Gitlab::AppLogger.info(
class: 'Projects::DestroyService',
project_id: project.id,
message: 'leftover commit statuses',
orphaned_commit_status_count: deleted_count
)
end
# The project can have multiple webhooks with hundreds of thousands of web_hook_logs.