Skip to content

[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?

%14.3

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
  • Enable on production
  • 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
    • Remove the feature flag and the pre-feature-flag code (howto)
    • Remove the feature flag via chatops (howto)
    • Close this issue
Edited by Patrick Steinhardt
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information