Skip to content

Add missing operation type annotations

Sami Hiltunen requested to merge smh-add-missing-annotations into master

Some RPCs in Gitaly are missing operation type and scope annotations. These are needed to handle starting transactions for RPCs in a general manner. The RPCs were missing the annotations as they are intercepted by Praefect and the annotations were previously only used by Praefect for deciding how to proxy the requests. As Gitaly will soon need the annotations itself, this commit adds back the missing annotations.

The ServerService was previously using a Server scope that doesn't exist these days. We're annotating the RPCs as storage scoped even though they're not really storage scoped. The current use cases do not differentiate between server and storage scoped RPCs:

  1. Gitaly's transaction code only needs to know whether or not the RPC is repository scoped or not.
  2. Praefect implements the ServerService directly so it wouldn't differentiate either based on storage vs server scope.

We'll do the smaller change for now to annotate the RPCs even if the scope is slightly wrong. We can later move from a multivalued scope field to a boolean that says whether the RPC is repository scoped or not.

TransactionService and PraefectInfoService service remain without annotations. These are only implemented by Praefect and thus Gitaly doesn't need annotations for them.

Merge request reports