API: Make Deployments responses more consistent
Summary
As noted in !19658 (comment 244220800), the List Project Deployments API endpoint may not always return the same results. It requires some sort of ordering clause for consistency.
Improvements
Adding id desc
as a tie-breaker should work.
Risks
Risk of unexpected query side-effects should be minimal.
Involved components
- lib/api/deployments.rb
Questions
Is there a solution that could be easily applied to other API endpoints that lack a consistency mechanism?
Edited by Dan Jensen