Skip to content

More consistent deployment API ordering

What does this MR do?

Add tie-breaker id desc sorting to deployments API to make it more consistent.

Additionally optimize the endpoint by preloading associations and eliminate n+1 queries.

Plan

SELECT  "deployments".* FROM "deployments" WHERE "deployments"."project_id" = 278964 ORDER BY "deployments"."updated_at" ASC, "deployments"."id" DESC LIMIT 20 OFFSET 1;

Does this MR meet the acceptance criteria?

Conformity

Related to #36301 (closed)

Edited by Mayra Cabrera

Merge request reports