Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavlo Strokov <pstrokov@gitlab.com>2020-03-10 18:49:05 +0300
committerPaul Okstad <pokstad@gitlab.com>2020-03-10 18:49:05 +0300
commit16f12f480dfa2004cb62033a5f221433dfee4d6c (patch)
tree3349959c72dc02df15fed804cb4989373cc5249f /proto/lint.proto
parent5e6af2c1bd61b21fa44581ac2d11911bc86f16d1 (diff)
Task proto has dependency to already generated source code.
Extracting lint-related stuff into separate proto file. It is required in order to have proper working proto-linter. Previously it was using compiled files for verification and it fails in some cases (https://gitlab.com/gitlab-org/gitaly/-/jobs/459024976). lint.proto extracted from shared.proto and contains lint-related declarations. New task `proto-lint` added to compile source code that is required by `protoc-gen-gitaly`. `protoc-gen-gitaly` fixed to use proper proto source data. Regeneration of all proto-related files.
Diffstat (limited to 'proto/lint.proto')
-rw-r--r--proto/lint.proto51
1 files changed, 51 insertions, 0 deletions
diff --git a/proto/lint.proto b/proto/lint.proto
new file mode 100644
index 000000000..09acbae58
--- /dev/null
+++ b/proto/lint.proto
@@ -0,0 +1,51 @@
+syntax = "proto3";
+
+package gitaly;
+
+option go_package = "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb";
+
+import "google/protobuf/descriptor.proto";
+
+message OperationMsg {
+ enum Operation {
+ UNKNOWN = 0;
+ MUTATOR = 1;
+ ACCESSOR = 2;
+ }
+
+ Operation op = 1;
+
+ enum Scope {
+ REPOSITORY = 0;
+ SERVER = 1;
+ STORAGE = 2;
+ }
+
+ // Scope level indicates what level an RPC interacts with a server:
+ // - REPOSITORY: scoped to only a single repo
+ // - SERVER: affects the entire server and potentially all repos
+ // - STORAGE: scoped to a specific storage location and all repos within
+ Scope scope_level = 2;
+}
+
+extend google.protobuf.MethodOptions {
+ // Random high number..
+ OperationMsg op_type = 82303;
+}
+
+extend google.protobuf.FieldOptions {
+ // Used to mark field containing name of affected storage.
+ bool storage = 91233; // Random high number..
+
+ // If this operation modifies a repository, this annotations
+ // will specify the location of the Repository field within
+ // the request message.
+ //
+ // Repository annotation is used mark field used as repository
+ // when parent message is marked as target or additional repository
+ bool repository = 91234;
+ // Used to mark target repository
+ bool target_repository = 91235;
+ // Used to mark additional repository
+ bool additional_repository = 91236;
+}