`ci_environment_status` endpoint could return a wrong deployment.

Problem

As we don't specify ordering of deployments for MR widget, there is a low chance that it shows a wrong deployment on UI.

Proposal

Return the latest deployment in ci_environment_status endpoint

Deployment.where(environment: environment).find_by_sha(sha) should be Deployment.where(environment: environment).order(id: :desc).find_by_sha(sha)

Edited Dec 03, 2019 by Shinya Maeda
Assignee Loading
Time tracking Loading