See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5069#note_64429814
/cc @stanhu @nick.thomas