Enable Orbit GQL queries by default

What does this MR do and why?

Enables GQL queries and guidance for Orbit by default. The flag is already on for everyone on GitLab.com, so this makes the same behavior the default for self-managed instances. To allow default_enabled: true, the flag moves from the derisk type to the beta type. The API docs now describe GQL as the default mode.

Related: !261947 (merged) removes the flag entirely and is approved but held for a GraphQL security review. Whichever lands first decides whether this one is needed.

Relates to #629612 Feature issue: https://gitlab.com/gitlab-org/orbit/knowledge-graph/-/issues/1258

Screenshots or screen recordings

N/A, no UI change.

How to set up and validate locally

Without any flag setup, Analytics::KnowledgeGraph.gql_enabled_for?(user) returns true. Feature.disable(:orbit_gql_queries) returns to JSON mode.

MR acceptance checklist

  • Documentation updated
  • Changelog trailer added (Changelog: changed)
Agent context
  • lib/feature/shared.rb sets can_be_default_enabled: false for gitlab_com_derisk, so the definition is moved with git mv to ee/config/feature_flags/beta/ and set to type: beta, default_enabled: true.
  • doc/development/feature_flags/_index.md: beta flags may be default-enabled, need a rollout issue (exists) and are listed in the auto-generated flags page, so no manual edit there. Milestone stays 19.4 (introduction milestone).
  • The only call site, Feature.enabled?(:orbit_gql_queries, user) in ee/lib/analytics/knowledge_graph.rb, passes no type:. Specs stub the flag explicitly, so they are unchanged.
  • Changelog: "Changing the feature flag itself (default-on setting) should have a changelog entry", and the flowchart gives added/changed/fixed for default off to on. Used changed.
  • Docs: doc/api/orbit.md history entry and the Query mode text.
  • Not run: spec/lib/feature/definition_spec.rb needs config/database.yml. I only checked that the YAML parses.
  • Backports are handled separately.

Merge request reports

Loading
Loading