[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 totrue
. -
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