Skip to content

Drop cluster.successful_deployments scope

Pam Artiaga requested to merge 427851-drop-cluster-successfuldeployments into master

What does this MR do and why?

The reference to deployments.cluster is now delegated through the deployment_clusters association table. As a follow-up, we need to remove all references to deployments.cluster_id.

The cluster.successful_deployments association in the Cluster model makes use of the deployments.cluster_id foreign key. There is nothing in the code base that references cluster.successful_deployments. Any reference to successful_deployments in the code base is only for an Environment object or directly queried on the Deployment model -- see search results on the GitLab repository for "successful_deployments".

Given the above and a successful pipeline, this has_many association should be safe to drop.

Screenshots or screen recordings

N/A

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

N/A

MR acceptance checklist

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

Related to #427851 (closed)

Edited by Suraj Tripathi

Merge request reports