[FF] duo_code_review_deep_flow - Rollout

Summary

Roll out the feature currently behind the duo_code_review_deep_flow feature flag.

  • DRI: @kinsingh
  • Team Slack channel: #g_code_review

Note

Process and guidance live in the docs, this issue is just the commands and a place to track the rollout. "Rolling out" means incrementally enabling the flag on GitLab.com to validate stability, it is not the same as releasing the feature, which happens when the flag is removed. Feature flag controls · Feature flag lifecycle

Rollout

Run all production /chatops in #production and cross-post the results to #g_code_review. Background: incremental rollout process, feature actors.

Before enabling for anyone, confirm all prerequisites are deployed:

  1. Monolith MR !253786 (merged) deployed to production. Without this, the flag does not exist.
  2. Monolith MR !253794 (merged) deployed to production. This adds Gitlab::Duo::CodeReview::FindingsParser. It ships in a separate deploy from the flag above, so check it separately: with the ai-assist MR below already deployed and this one not, a review publishes zero comments and the author gets the "nothing to comment on" note.
  3. ai-assist MR gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!6773 (merged) deployed to the GitLab-managed AI Gateway / Duo Workflow Service fleet. Enabling before this MR is deployed means the flow posts XML, which still works.
  4. Monolith MR !255489 (merged) deployed to production. This renames the duo_code_review_advanced_flow feature flag to duo_code_review_deep_flow and the advanced_code_review flow to deep_code_review. The AI gateway half (gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!6932 (merged)) is already merged, but until this one is deployed the flag does not exist under its new name and any chatops command using it will fail.

Non-production

/chatops gitlab run feature set duo_code_review_deep_flow true --dev --pre --staging --staging-ref

Production

This rollout is actor based, not percentage based. Step 1: enable for Code Review team members by username. Step 2: enable for all internal GitLab team members.

Renaming the flag does not carry over its enabled state. Anyone who had duo_code_review_advanced_flow enabled needs to be enabled again on duo_code_review_deep_flow, and the old flag should be disabled.

/chatops gitlab run feature set --user=<username> duo_code_review_deep_flow true
/chatops gitlab run feature set --group=gitlab-com duo_code_review_deep_flow true

A global percentage rollout is not planned. See "Before global rollout" below.

Before global rollout

Confirm the relevant gotchas before going to 100%, see enabling a feature for GitLab.com:

No global rollout is planned before the flow is renamed and a production min_confidence is chosen. Tracked in #627791 (closed).

Cleanup

The flag is expected to be replaced by a user-facing depth setting, with levels "Standard" and "Deep", or removed once the Deep review becomes the default, pending the UX work in gitlab-org#23492.

Remove the flag and its YAML definition from the codebase, then:

/chatops gitlab run release check <merge-request-url> <milestone>
/chatops gitlab run feature delete duo_code_review_deep_flow --dev --pre --staging --staging-ref --production

Rollback

/chatops gitlab run feature set duo_code_review_deep_flow false                                         # production
/chatops gitlab run feature set duo_code_review_deep_flow false --dev --pre --staging --staging-ref     # non-production
/chatops gitlab run feature delete duo_code_review_deep_flow --dev --pre --staging --staging-ref --production  # remove entirely
Edited by Kinshuk Singh