Skip to content

Prevent object storage orphans when destroying project

Ref: #352902 (closed)

What does this MR do and why?

This MR sets dependent: :restrict_with_error to models having object storage records and associated to a project:

  • Ci::BuildTraceChunk
  • Ci::JobArtifact
  • Ci::PipelineArtifact
  • Ci::SecureFile

This will prevent having orphan records if those child records are not deleted before the project gets destroyed.

Those objects are currently destroyed in our Projects::DestroyService before destroying the project so we should not have any orphan records.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Max Orefice

Merge request reports