Return empty array for approver and approver_group behind FF
What does this MR do and why?
We have both approvers
and approver_groups
marked as deprecated for project approvals API, but these fields are still returning values.
In this MR, we would introduce one FF. When FF down, it behaves like before; When FF up, we will return empty array for project approvals API, and also project/MR presenters.
References
Issue - Return Empty approvers and approver_groups from... (#573005 - closed)
Screenshots or screen recordings
For local gdk testing, when FF is turned off, we get values for approvers
and approver_groups
.
When FF is turned on, we get empty array.
How to set up and validate locally
- Find one project from local Rails console, and then create its
approver
andapprover_group
(should be simple, just some associations). - Get GDK running locally
-
::Feature.disable(:deprecate_approver_and_approver_group)
in Rails console - Curl
curl -H "PRIVATE-TOKEN: YOUR-TOKEN" "http://gdk.test:3000/api/v4/projects/28/approvals"
- And see
approvers
andapprover_groups
are returned as expected -
::Feature.enable(:deprecate_approver_and_approver_group)
in Rails console - Curl
curl -H "PRIVATE-TOKEN: YOUR-TOKEN" "http://gdk.test:3000/api/v4/projects/28/approvals"
- And see
approvers
andapprover_groups
are returned as empty array
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 zli