Skip to content

Draft: Delete deployments_raise_updated_at_inefficient_error Feature Flag

What does this MR do and why?

!116656 (merged) introduces a breaking change in the Deployments API behind a Feature Flag (deployments_raise_updated_at_inefficient_error).

This MR deletes that Feature Flag, making the change effective for all instances of GitLab.

With the deployments_raise_updated_at_inefficient_error FF removed, queries to the Deployments API (GraphQL or REST) will result in an InefficientQueryError if an updated_at filter is not paired with order_by=updated_at.

Issue: #328500 (closed)

FF Rollout Issue: #409584 (closed)

Screenshots or screen recordings

A call to the GET /projects/:id/deployments endpoint results in a (404) Bad request if an updated_at filter is used without sorting by updated_at:

Screenshot_2023-05-04_at_16.15.24

How to set up and validate locally

  1. Pick any project that has a Deployment, or create a new test project and run a deploy pipeline (guide: https://docs.gitlab.com/ee/ci/environments/#environments-and-deployments)

  2. Create an access token to use for API requests (guide: https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#personal-access-tokens)

  3. Run the following request from the terminal:

    curl -ki -X GET \
    --header "Authorization: Bearer $ACCESS_TOKEN" \
    "https://gdk.test:3443/api/v4/projects/21/deployments?updated_after=2019-03-15T08:00:00Z"

    This should result in the following error message:

    {"message":"400 Bad request - `updated_at` filter requires `updated_at` sort"}%
  4. (Optional) For comparison, run the following request for a successful API call

    curl -ki -X GET \
    --header "Authorization: Bearer $ACCESS_TOKEN" \
    "https://gdk.test:3443/api/v4/projects/21/deployments?order_by=updated_at&updated_after=2019-03-15T08:00:00Z"

MR acceptance checklist

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

Edited by Pam Artiaga

Merge request reports

Loading