Skip to content

[Feature flag] Rollout of `diff_line_syntax_highlighting`

What

Remove the :diff_line_syntax_highlighting feature flag ...

Owners

  • Team: groupsource code
  • Most appropriate slack channel to reach out to: #g_create_source-code-be
  • Best individual to reach out to: @vyaklushin

Stakeholders

The Rollout Plan

  • Partial Rollout on GitLab.com with beta groups
  • Rollout on GitLab.com for a certain period (How long)
  • Percentage Rollout on GitLab.com - XX% If it is possible to perform an incremental rollout, this should be preferred. Proposed increments are: 10%, 50%, 100%. Proposed minimum time between increments is 15 minutes.
  • Rollout Feature for everyone as soon as it's ready

Beta Groups/Projects:

  • gitlab-org/gitlab project
  • gitlab-org/gitlab-com groups
  • ...

Expectations

What are we expecting to happen?

With this FF we are going to apply syntax highlight directly to diff lines instead of highlighting the file blob and finding matching diff lines in it.

I expect to see no visual difference between two options.

What might happen if this goes wrong?

Merge request diff syntax highlighting can work incorrectly.

What can we monitor to detect problems with this?

https://dashboards.gitlab.net/d/web-rails-controller/web-rails-controller?orgId=1&from=now-7d&to=now&var-PROMETHEUS_DS=Global&var-environment=gprd&var-stage=main&var-controller=Projects::MergeRequests::DiffsController&var-action=diffs_batch.json

Rollout Timeline

Initial Rollout

Preparation Phase

  • Enable on staging (/chatops run feature set diff_line_syntax_highlighting true --staging)

  • Test on staging

  • Ensure that documentation has been updated (More info)

  • Announce on the issue an estimated time this will be enabled on GitLab.com

Partial Rollout Phase

  • Enable on GitLab.com for individual groups/projects listed above and verify behaviour (/chatops run feature set --project=gitlab-org/gitlab diff_line_syntax_highlighting true)

  • Verify behaviour (See Beta Groups) and add details with screenshots as a comment on this issue

Global Availability (More Info) (Please Note that Beta,Alpha and General Availability (GA) are handled on a product level and not the feature-flag)

  • Coordinate a time to enable the flag with #production and #g_delivery on slack.

  • Announce on the issue an estimated time this will be enabled on GitLab.com

  • Make the feature flag enabled by default i.e. Change default_enabled to true

  • Enable on GitLab.com by running chatops command in #production (/chatops run feature set diff_line_syntax_highlighting true)

  • Announce on the issue that the flag has been enabled

  • Cross post chatops slack command to #support_gitlab-com (more guidance when this is necessary in the dev docs) and in your team channel

Cleanup

This is an important phase, that should be either done in the next Milestone or as soon as possible. For the cleanup phase, please follow our documentation on how to clean up the feature flag.

  • Announce on the issue that the flag has been enabled

  • Remove :feature_name feature flag

    • Remove all references to the feature flag from the codebase
    • Remove the YAML definitions for the feature from the repository
    • Create a Changelog Entry
  • Clean up the feature flag from all environments by running this chatops command in #production channel /chatops run feature delete diff_line_syntax_highlighting.

Final Step

  • Close this rollout issue for the feature flag after the feature flag is removed from the codebase.

Rollback Steps

  • This feature can be disabled by running the following Chatops command:
/chatops run feature set --project=gitlab-org/gitlab diff_line_syntax_highlighting false
Edited by Vasilii Iakliushin