Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,823
    • Issues 43,823
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,415
    • Merge requests 1,415
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Scheduled maintenance on the database layer will take place on 2022-07-02. We expect GitLab.com to be unavailable for up to 2 hours starting from 06:00 UTC. Kindly follow our status page for updates and read more in our blog post.

  • GitLab.org
  • GitLabGitLab
  • Issues
  • #333034
Closed
Open
Created Jun 08, 2021 by James Fargher@proglottis🔶Maintainer9 of 19 tasks completed9/19 tasks

[Feature flag] Enable repository backups using gitaly-backup

Summary

This issue is to rollout repository backups using gitaly-backup on production, that is currently behind the gitaly_backup feature flag.

Owners

  • Team: Gitaly
  • Most appropriate slack channel to reach out to: #g_create_gitaly
  • Best individual to reach out to: @proglottis
  • PM: @mjwood

Stakeholders

The Rollout Plan

  • Rollout Feature for everyone as soon as it's ready

Since gitlab repository backups aren't used on gitlab.com. We only want to provide a way for on-prem users to opt-out in an emergency.

Expectations

What are we expecting to happen?

This is an architectural change to how repository backups are made. Repository backups should continue to work as before.

What might happen if this goes wrong?

Errors while trying to create or restore the repository backups.

What can we monitor to detect problems with this?

Backups are used for on-prem only. So this rollout will need to rely on issues being reported.

Rollout Steps

Release the feature with the feature flag

If you're still unsure whether the feature is deemed stable but want to release it in the current milestone, you can change the default state of the feature flag to be enabled. To do so, follow these steps:

  • Create a merge request with the following changes. Ask for review and merge it.
    • Set the default_enabled attribute in the feature flag definition to true.
    • Create a changelog entry.
  • Ensure that the above MR has been deployed to both production and canary. If the merge request was deployed before the code cutoff, the feature can be officially announced in a release blog post.
    • /chatops run auto_deploy status <merge-commit>
  • Close the feature issue to indicate the feature will be released in the current milestone.

WARNING: This approach has the downside that it makes it difficult for us to clean up the flag. For example, on-premise users could disable the feature on their GitLab instance. But when you remove the flag at some point, they suddenly see the feature as enabled and they can't roll it back to the previous behavior. To avoid this potential breaking change, use this approach only for urgent matters.

Release the feature

After the feature has been deemed stable, the clean up should be done as soon as possible to permanently enable the feature and reduce complexity in the codebase.

  • Create a merge request to remove <feature-flag-name> feature flag. Ask for review and merge it.
    • Remove all references to the feature flag from the codebase.
    • Remove the YAML definitions for the feature from the repository.
    • Create a changelog entry.
  • Ensure that the above MR has been deployed to both production and canary. If the merge request was deployed before the code cutoff, the feature can be officially announced in a release blog post.
    • /chatops run auto_deploy status <merge-commit>
  • Close the feature issue to indicate the feature will be released in the current milestone.
  • Clean up the feature flag from all environments by running these chatops command in #production channel:
    • /chatops run feature delete <feature-flag-name> --dev
    • /chatops run feature delete <feature-flag-name> --staging
    • /chatops run feature delete <feature-flag-name>
  • Close this rollout issue.

Rollback Steps

  • This feature can be disabled by running the following Chatops command:
/chatops run feature set gitaly_backup false
Edited Oct 04, 2021 by James Fargher
Assignee
Assign to
Time tracking