Originally submitted at https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6443. Signed-off-by: Rémy Coutable <remy@rymai.me>