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:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2020-09-17 11:27:34 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2020-10-14 10:28:46 +0300
commit30a162442e3fbf3d451460de6e080b925b0ae3ae (patch)
treeedec1198cf34bc954cc69d37f9b960cec0bea265
parent0e7ea33c08fae22bb9db43e353acf2e95bf4115d (diff)
hooks: Send reference-transaction state to hook service
Besides its standard input, the reference-transaction hook also gets a state as input via its first parameter. This state is one of "prepared", "committed" or "aborted", telling the hook in which state the underlying reference transaction currently is. The information isn't currently available to the hook service. This commit thus changes the ReferenceTransaction RPC to include another field for the state, containing an enumeration of either of the above states.
-rw-r--r--cmd/gitaly-hooks/hooks.go19
-rw-r--r--proto/go/gitalypb/hook.pb.go122
-rw-r--r--proto/hook.proto6
-rw-r--r--ruby/proto/gitaly/hook_pb.rb7
4 files changed, 112 insertions, 42 deletions
diff --git a/cmd/gitaly-hooks/hooks.go b/cmd/gitaly-hooks/hooks.go
index f4b849dde..6b9173a14 100644
--- a/cmd/gitaly-hooks/hooks.go
+++ b/cmd/gitaly-hooks/hooks.go
@@ -104,7 +104,7 @@ func main() {
case "update":
args := fixedArgs[2:]
if len(args) != 3 {
- logger.Fatalf("hook %q is missing required arguments", subCmd)
+ logger.Fatalf("hook %q expects exactly three arguments", subCmd)
}
ref, oldValue, newValue := args[0], args[1], args[2]
@@ -194,6 +194,22 @@ func main() {
os.Exit(0)
}
+ if len(fixedArgs) != 3 {
+ logger.Fatalf("hook %q is missing required arguments", subCmd)
+ }
+
+ var state gitalypb.ReferenceTransactionHookRequest_State
+ switch fixedArgs[2] {
+ case "prepared":
+ state = gitalypb.ReferenceTransactionHookRequest_PREPARED
+ case "committed":
+ state = gitalypb.ReferenceTransactionHookRequest_COMMITTED
+ case "aborted":
+ state = gitalypb.ReferenceTransactionHookRequest_ABORTED
+ default:
+ logger.Fatalf("hook %q has invalid state %s", subCmd, fixedArgs[2])
+ }
+
referenceTransactionHookStream, err := hookClient.ReferenceTransactionHook(ctx)
if err != nil {
logger.Fatalf("error when getting referenceTransactionHookStream client for %q: %v", subCmd, err)
@@ -211,6 +227,7 @@ func main() {
if err := referenceTransactionHookStream.Send(&gitalypb.ReferenceTransactionHookRequest{
Repository: repository,
EnvironmentVariables: environment,
+ State: state,
}); err != nil {
logger.Fatalf("error when sending request for %q: %v", subCmd, err)
}
diff --git a/proto/go/gitalypb/hook.pb.go b/proto/go/gitalypb/hook.pb.go
index 4c24f2859..5adab06d0 100644
--- a/proto/go/gitalypb/hook.pb.go
+++ b/proto/go/gitalypb/hook.pb.go
@@ -24,6 +24,34 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+type ReferenceTransactionHookRequest_State int32
+
+const (
+ ReferenceTransactionHookRequest_PREPARED ReferenceTransactionHookRequest_State = 0
+ ReferenceTransactionHookRequest_COMMITTED ReferenceTransactionHookRequest_State = 1
+ ReferenceTransactionHookRequest_ABORTED ReferenceTransactionHookRequest_State = 2
+)
+
+var ReferenceTransactionHookRequest_State_name = map[int32]string{
+ 0: "PREPARED",
+ 1: "COMMITTED",
+ 2: "ABORTED",
+}
+
+var ReferenceTransactionHookRequest_State_value = map[string]int32{
+ "PREPARED": 0,
+ "COMMITTED": 1,
+ "ABORTED": 2,
+}
+
+func (x ReferenceTransactionHookRequest_State) String() string {
+ return proto.EnumName(ReferenceTransactionHookRequest_State_name, int32(x))
+}
+
+func (ReferenceTransactionHookRequest_State) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_3eef30da1c11ee1b, []int{6, 0}
+}
+
type PreReceiveHookRequest struct {
Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
EnvironmentVariables []string `protobuf:"bytes,2,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty"`
@@ -387,12 +415,13 @@ func (m *UpdateHookResponse) GetExitStatus() *ExitStatus {
}
type ReferenceTransactionHookRequest struct {
- Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
- EnvironmentVariables []string `protobuf:"bytes,2,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty"`
- Stdin []byte `protobuf:"bytes,3,opt,name=stdin,proto3" json:"stdin,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
+ EnvironmentVariables []string `protobuf:"bytes,2,rep,name=environment_variables,json=environmentVariables,proto3" json:"environment_variables,omitempty"`
+ Stdin []byte `protobuf:"bytes,3,opt,name=stdin,proto3" json:"stdin,omitempty"`
+ State ReferenceTransactionHookRequest_State `protobuf:"varint,4,opt,name=state,proto3,enum=gitaly.ReferenceTransactionHookRequest_State" json:"state,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *ReferenceTransactionHookRequest) Reset() { *m = ReferenceTransactionHookRequest{} }
@@ -441,6 +470,13 @@ func (m *ReferenceTransactionHookRequest) GetStdin() []byte {
return nil
}
+func (m *ReferenceTransactionHookRequest) GetState() ReferenceTransactionHookRequest_State {
+ if m != nil {
+ return m.State
+ }
+ return ReferenceTransactionHookRequest_PREPARED
+}
+
type ReferenceTransactionHookResponse struct {
Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"`
Stderr []byte `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"`
@@ -497,6 +533,7 @@ func (m *ReferenceTransactionHookResponse) GetExitStatus() *ExitStatus {
}
func init() {
+ proto.RegisterEnum("gitaly.ReferenceTransactionHookRequest_State", ReferenceTransactionHookRequest_State_name, ReferenceTransactionHookRequest_State_value)
proto.RegisterType((*PreReceiveHookRequest)(nil), "gitaly.PreReceiveHookRequest")
proto.RegisterType((*PreReceiveHookResponse)(nil), "gitaly.PreReceiveHookResponse")
proto.RegisterType((*PostReceiveHookRequest)(nil), "gitaly.PostReceiveHookRequest")
@@ -510,41 +547,44 @@ func init() {
func init() { proto.RegisterFile("hook.proto", fileDescriptor_3eef30da1c11ee1b) }
var fileDescriptor_3eef30da1c11ee1b = []byte{
- // 529 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0xcd, 0x6e, 0x13, 0x31,
- 0x10, 0x96, 0xf3, 0xa7, 0x66, 0x12, 0x95, 0x62, 0xb5, 0x61, 0x59, 0x04, 0x8d, 0xf6, 0xc2, 0x1e,
- 0x20, 0x89, 0x9a, 0x0b, 0xe7, 0x4a, 0x48, 0x5c, 0x10, 0x91, 0x0b, 0x3d, 0x80, 0x44, 0xe4, 0x64,
- 0xa7, 0x89, 0xd5, 0xad, 0xbd, 0xd8, 0xde, 0xb4, 0x39, 0xc0, 0x95, 0x17, 0x40, 0x82, 0x27, 0xe0,
- 0x51, 0xca, 0x8d, 0x07, 0xe2, 0x84, 0x76, 0x37, 0xbf, 0x4d, 0x42, 0x6f, 0xa1, 0xb7, 0x99, 0xf9,
- 0x3c, 0x5f, 0xf2, 0x7d, 0x1e, 0xcf, 0x02, 0x0c, 0x95, 0x3a, 0x6f, 0x44, 0x5a, 0x59, 0x45, 0x4b,
- 0x03, 0x61, 0x79, 0x38, 0x76, 0x21, 0x14, 0xd2, 0x66, 0x35, 0xb7, 0x6a, 0x86, 0x5c, 0x63, 0x90,
- 0x65, 0xde, 0x35, 0x81, 0x83, 0x8e, 0x46, 0x86, 0x7d, 0x14, 0x23, 0x7c, 0xa5, 0xd4, 0x39, 0xc3,
- 0x4f, 0x31, 0x1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, 0xe1,
+ 0xfe, 0x8d, 0x37, 0x4e, 0x47, 0xe9, 0x33, 0xa7, 0x98, 0xb5, 0x31, 0x97, 0x9f, 0x51, 0xff, 0x10,
+ 0x60, 0xd4, 0xf2, 0xf4, 0xd1, 0x20, 0x75, 0xea, 0x59, 0x5b, 0xd6, 0x2c, 0x6a, 0xb2, 0xe0, 0x16,
+ 0xa1, 0x3d, 0x30, 0xe7, 0x5d, 0x12, 0x7d, 0xf6, 0x97, 0xad, 0x62, 0x39, 0xb7, 0x6f, 0x9c, 0x56,
+ 0xb2, 0xb7, 0xf5, 0x36, 0x4e, 0xf3, 0xdd, 0x66, 0xa5, 0x25, 0x2e, 0xaa, 0xe9, 0x72, 0x53, 0xc8,
+ 0x76, 0x35, 0x2d, 0x56, 0x4d, 0xfe, 0xa2, 0xd5, 0xb6, 0xe8, 0xe3, 0xb0, 0xd9, 0xcc, 0x25, 0xa1,
+ 0x9d, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1e, 0xa9, 0xde, 0x88, 0x88, 0x07, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
diff --git a/proto/hook.proto b/proto/hook.proto
index ef31a6616..0a67247fb 100644
--- a/proto/hook.proto
+++ b/proto/hook.proto
@@ -74,6 +74,12 @@ message ReferenceTransactionHookRequest {
Repository repository = 1 [(target_repository)=true];
repeated string environment_variables = 2;
bytes stdin = 3;
+ enum State {
+ PREPARED = 0;
+ COMMITTED = 1;
+ ABORTED = 2;
+ }
+ State state = 4;
}
message ReferenceTransactionHookResponse {
diff --git a/ruby/proto/gitaly/hook_pb.rb b/ruby/proto/gitaly/hook_pb.rb
index 616b061f7..bf32ab7ec 100644
--- a/ruby/proto/gitaly/hook_pb.rb
+++ b/ruby/proto/gitaly/hook_pb.rb
@@ -45,6 +45,12 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :repository, :message, 1, "gitaly.Repository"
repeated :environment_variables, :string, 2
optional :stdin, :bytes, 3
+ optional :state, :enum, 4, "gitaly.ReferenceTransactionHookRequest.State"
+ end
+ add_enum "gitaly.ReferenceTransactionHookRequest.State" do
+ value :PREPARED, 0
+ value :COMMITTED, 1
+ value :ABORTED, 2
end
add_message "gitaly.ReferenceTransactionHookResponse" do
optional :stdout, :bytes, 1
@@ -62,5 +68,6 @@ module Gitaly
UpdateHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.UpdateHookRequest").msgclass
UpdateHookResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.UpdateHookResponse").msgclass
ReferenceTransactionHookRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ReferenceTransactionHookRequest").msgclass
+ ReferenceTransactionHookRequest::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ReferenceTransactionHookRequest.State").enummodule
ReferenceTransactionHookResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ReferenceTransactionHookResponse").msgclass
end