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:
authorPaul Okstad <pokstad@gitlab.com>2019-08-07 11:45:41 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2019-08-07 11:45:41 +0300
commitb39f32fe2649b278e03d479ccfc81d3bd96cf94d (patch)
tree16b7b0f96cb48f5d06e3837be656a82b55c15a19
parent7180b69271e4aab03ee8ef97a19ac77dfd96cb69 (diff)
Changelog for MR 1400
[skip ci]
-rw-r--r--changelogs/unreleased/po-fix-praefect-pb-gen.yml5
-rw-r--r--internal/praefect/Makefile3
-rw-r--r--internal/praefect/mock/mock.pb.go34
-rw-r--r--internal/praefect/mock/mock.proto2
-rw-r--r--internal/praefect/mocksvc_test.go3
5 files changed, 29 insertions, 18 deletions
diff --git a/changelogs/unreleased/po-fix-praefect-pb-gen.yml b/changelogs/unreleased/po-fix-praefect-pb-gen.yml
new file mode 100644
index 000000000..0cd271e72
--- /dev/null
+++ b/changelogs/unreleased/po-fix-praefect-pb-gen.yml
@@ -0,0 +1,5 @@
+---
+title: Fix Praefect's mock service protobuf Go-stub file generation
+merge_request: 1400
+author:
+type: fixed
diff --git a/internal/praefect/Makefile b/internal/praefect/Makefile
new file mode 100644
index 000000000..849369671
--- /dev/null
+++ b/internal/praefect/Makefile
@@ -0,0 +1,3 @@
+mock/mock.pb.go: mock/mock.proto
+ protoc --go_out=paths=source_relative,plugins=grpc:./mock -I$(shell pwd)/../../proto -I$(shell pwd)/mock $(shell pwd)/mock/*.proto
+ goimports -w mock/mock.pb.go
diff --git a/internal/praefect/mock/mock.pb.go b/internal/praefect/mock/mock.pb.go
index b8a8afb01..83910d099 100644
--- a/internal/praefect/mock/mock.pb.go
+++ b/internal/praefect/mock/mock.pb.go
@@ -1,5 +1,5 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: mock/mock.proto
+// source: mock.proto
package mock
@@ -9,6 +9,7 @@ import (
math "math"
proto "github.com/golang/protobuf/proto"
+ _ "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
grpc "google.golang.org/grpc"
)
@@ -34,7 +35,7 @@ func (m *SimpleRequest) Reset() { *m = SimpleRequest{} }
func (m *SimpleRequest) String() string { return proto.CompactTextString(m) }
func (*SimpleRequest) ProtoMessage() {}
func (*SimpleRequest) Descriptor() ([]byte, []int) {
- return fileDescriptor_5ed43251284e3118, []int{0}
+ return fileDescriptor_6fa4806c90f7156d, []int{0}
}
func (m *SimpleRequest) XXX_Unmarshal(b []byte) error {
@@ -73,7 +74,7 @@ func (m *SimpleResponse) Reset() { *m = SimpleResponse{} }
func (m *SimpleResponse) String() string { return proto.CompactTextString(m) }
func (*SimpleResponse) ProtoMessage() {}
func (*SimpleResponse) Descriptor() ([]byte, []int) {
- return fileDescriptor_5ed43251284e3118, []int{1}
+ return fileDescriptor_6fa4806c90f7156d, []int{1}
}
func (m *SimpleResponse) XXX_Unmarshal(b []byte) error {
@@ -106,19 +107,20 @@ func init() {
proto.RegisterType((*SimpleResponse)(nil), "mock.SimpleResponse")
}
-func init() { proto.RegisterFile("mock/mock.proto", fileDescriptor_5ed43251284e3118) }
+func init() { proto.RegisterFile("mock.proto", fileDescriptor_6fa4806c90f7156d) }
-var fileDescriptor_5ed43251284e3118 = []byte{
- // 139 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcf, 0xcd, 0x4f, 0xce,
- 0xd6, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x2c, 0x20, 0xb6, 0x92, 0x2a, 0x17,
- 0x6f, 0x70, 0x66, 0x6e, 0x41, 0x4e, 0x6a, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x90, 0x08,
- 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x84, 0xa3,
- 0xa4, 0xc6, 0xc5, 0x07, 0x53, 0x56, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x8a, 0x50, 0xc7, 0x84, 0xa4,
- 0xce, 0x28, 0x00, 0x66, 0x5c, 0x70, 0x6a, 0x51, 0x59, 0x66, 0x72, 0xaa, 0x90, 0x3d, 0x97, 0x00,
- 0x44, 0x20, 0x34, 0x2f, 0xb1, 0xa8, 0x12, 0x4c, 0x08, 0x09, 0xeb, 0x81, 0x9d, 0x81, 0x62, 0xaf,
- 0x94, 0x08, 0xaa, 0x20, 0xc4, 0x16, 0x25, 0x86, 0x24, 0x36, 0xb0, 0x6b, 0x8d, 0x01, 0x01, 0x00,
- 0x00, 0xff, 0xff, 0xb7, 0xeb, 0x46, 0xfb, 0xc0, 0x00, 0x00, 0x00,
+var fileDescriptor_6fa4806c90f7156d = []byte{
+ // 152 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xca, 0xcd, 0x4f, 0xce,
+ 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x78, 0x8a, 0x33, 0x12, 0x8b,
+ 0x52, 0x53, 0x20, 0x62, 0x4a, 0xaa, 0x5c, 0xbc, 0xc1, 0x99, 0xb9, 0x05, 0x39, 0xa9, 0x41, 0xa9,
+ 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x22, 0x5c, 0xac, 0x65, 0x89, 0x39, 0xa5, 0xa9, 0x12, 0x8c,
+ 0x0a, 0x8c, 0x1a, 0xac, 0x41, 0x10, 0x8e, 0x92, 0x1a, 0x17, 0x1f, 0x4c, 0x59, 0x71, 0x41, 0x7e,
+ 0x5e, 0x71, 0x2a, 0x42, 0x1d, 0x13, 0x92, 0x3a, 0xa3, 0x30, 0x98, 0x71, 0xc1, 0xa9, 0x45, 0x65,
+ 0x99, 0xc9, 0xa9, 0x42, 0xae, 0x5c, 0x02, 0x10, 0x81, 0xd0, 0xbc, 0xc4, 0xa2, 0x4a, 0x30, 0x21,
+ 0x24, 0xac, 0x07, 0x76, 0x14, 0x8a, 0xbd, 0x52, 0x22, 0xa8, 0x82, 0x10, 0x5b, 0x94, 0xd8, 0x7e,
+ 0x4d, 0xd7, 0x60, 0xe2, 0x60, 0x4a, 0x62, 0x03, 0xbb, 0xd6, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff,
+ 0x55, 0x3d, 0x80, 0x35, 0xcf, 0x00, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@@ -192,5 +194,5 @@ var _SimpleService_serviceDesc = grpc.ServiceDesc{
},
},
Streams: []grpc.StreamDesc{},
- Metadata: "mock/mock.proto",
+ Metadata: "mock.proto",
}
diff --git a/internal/praefect/mock/mock.proto b/internal/praefect/mock/mock.proto
index aa6ec842a..ded233102 100644
--- a/internal/praefect/mock/mock.proto
+++ b/internal/praefect/mock/mock.proto
@@ -7,6 +7,8 @@ syntax = "proto3";
package mock;
+import "shared.proto";
+
message SimpleRequest {
int32 value = 1;
}
diff --git a/internal/praefect/mocksvc_test.go b/internal/praefect/mocksvc_test.go
index f6e01811b..3b542f8ad 100644
--- a/internal/praefect/mocksvc_test.go
+++ b/internal/praefect/mocksvc_test.go
@@ -11,8 +11,7 @@ type simpleUnaryUnaryCallback func(context.Context, *mock.SimpleRequest) (*mock.
// mockSvc is an implementation of mock.SimpleServer for testing purposes. The
// gRPC stub can be updated via go generate:
//
-//go:generate protoc --go_out=plugins=grpc:. mock/mock.proto
-//go:generate goimports -w mock/mock.pb.go
+//go:generate make mock/mock.pb.go
type mockSvc struct {
simpleUnaryUnary simpleUnaryUnaryCallback
}