Scope deployment lookup to project in DeploymentsController#show

What does this MR do and why?

Scope deployment lookup to project in DeploymentsController#show

A deployment belongs to both a project and an environment so either association could be used to fetch this record. However, because the IID is defined at the project level, looking up via project is a more efficient query as it can use the unique index on (project_id, iid).

References

#560329 (closed)

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tiger Watson

Merge request reports

Loading