CE for https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9342 (https://gitlab.com/gitlab-org/gitlab-ee/issues/6102)