[Feature flag] Enable use of structured errors for UserMergeBranch
What
Enable the :gitaly_user_merge_branch_access_error
feature flag, which will enable the use of structured errors in Gitaly's UserMergeBranch RPC. Part of #3582 (closed).
Owners
- Team: Gitaly
- Most appropriate slack channel to reach out to:
#g_create_gitaly
- Best individual to reach out to: pks-t
Expectations
What release does this feature occur in first?
What are we expecting to happen?
Rails should get detailed errors about what went wrong in case there was an access check rejected by Rails. As a result, we now report errors to clients properly in case there was an error instead of returning success.
Right now Gitaly retruns successful in case a reference has been modified concurrently by another RPC call, even though the actual merge has failed and thus wasn't performed. With the new code we get a FailedPrecondition error. Also, previously we'd have returned success in case access checks failed, where we now start to return PermissionDenied errors.
What might happen if this goes wrong?
Access check failures do not get detected correctly on Rails side.
What can we monitor to detect problems with this?
- UserMergeBranch RPC
Roll Out Steps
-
Enable on staging -
Is the required code deployed on staging? (howto) -
Enable on staging (howto) -
Add featureflagstaging to this issue (howto) -
Test on staging (howto) -
Verify the feature flag was used by checking Prometheus metric gitaly_feature_flag_checks_total
-
-
Enable on production -
Is the required code deployed on production? (howto) -
Enable on production in #production
(howto) -
Add featureflagproduction to this issue -
Verify the feature flag was used by checking Prometheus metric gitaly_feature_flag_checks_total
-
-
Default-enable the feature flag (optional, only required if backwards-compatibility concerns exist) -
Wait for release containg default-disabled feature flag. -
Change the feature flag to default-enabled (howto) -
Wait for release containing default-enabled feature flag.
-
-
Remove feature flag