Only send root namespaces in feature-enabled-by-namespace-ids field

Problem

Sending so many namespace ids in a header causes big message sizes, which can trigger errors down the pipeline, e.g. #577678 (closed)

The header is added here: https://gitlab.com/gitlab-org/gitlab/blob/master/ee/lib/cloud_connector.rb#L42

Desired Outcome

We minimize the header size and/or set hard limits on its weight

Potential Solution

We can send just the root namespace ids. This has been confirmed by Product Data Insights team: #577678 (comment 2864004962) . We need to make sure that this change doesn't slow the duo requests flow.

Documentation Update Needed

  • Yes
  • No

How to verify

Further actions needed

Edited by 🤖 GitLab Bot 🤖