From 4e1be99ef860ff0e18ac266ca8ad200e61ee9ac2 Mon Sep 17 00:00:00 2001 From: Kyle Ellrott Date: Wed, 27 Jul 2016 13:51:46 -0700 Subject: [PATCH] Adding dependency build for initial install, updating to changes in grpc github URLs --- Makefile | 11 +++++--- src/ga4gh-server/proto/task_worker.pb.go | 9 +++++-- src/ga4gh-tasks/task_execution.pb.go | 13 ++++++--- src/ga4gh-tasks/task_execution.pb.gw.go | 34 +++++++++++++++++++----- src/ga4gh-taskserver/server.go | 2 +- 5 files changed, 52 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index f0ad4af..cfb8ced 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ server: proto_build: cd task-execution-schemas/proto && protoc $(PROTO_INC) \ - --go_out=Mgoogle/api/annotations.proto=github.com/gengo/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:../../src/ga4gh-tasks/ \ + --go_out=Mgoogle/api/annotations.proto=github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api,plugins=grpc:../../src/ga4gh-tasks/ \ --grpc-gateway_out=logtostderr=true:../../src/ga4gh-tasks/ \ task_execution.proto cd proto && protoc \ @@ -23,5 +23,10 @@ proto_build: grpc: go get -u github.com/golang/protobuf/protoc-gen-go - go get -u github.com/gengo/grpc-gateway/protoc-gen-swagger - go get -u github.com/gengo/grpc-gateway/protoc-gen-grpc-gateway + go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger + go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway + +depends: grpc + go get -d ga4gh-taskserver/ + go get -d ga4gh-worker/ + \ No newline at end of file diff --git a/src/ga4gh-server/proto/task_worker.pb.go b/src/ga4gh-server/proto/task_worker.pb.go index 5b99bb4..14c7296 100644 --- a/src/ga4gh-server/proto/task_worker.pb.go +++ b/src/ga4gh-server/proto/task_worker.pb.go @@ -35,7 +35,9 @@ var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. -const _ = proto.ProtoPackageIsVersion1 +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package // * // Worker Info @@ -151,7 +153,7 @@ var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion2 +const _ = grpc.SupportPackageIsVersion3 // Client API for Scheduler service @@ -341,8 +343,11 @@ var _Scheduler_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, + Metadata: fileDescriptor0, } +func init() { proto.RegisterFile("task_worker.proto", fileDescriptor0) } + var fileDescriptor0 = []byte{ // 422 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x53, 0x5f, 0xef, 0xd2, 0x30, diff --git a/src/ga4gh-tasks/task_execution.pb.go b/src/ga4gh-tasks/task_execution.pb.go index 2cb7e58..06f7366 100644 --- a/src/ga4gh-tasks/task_execution.pb.go +++ b/src/ga4gh-tasks/task_execution.pb.go @@ -30,7 +30,7 @@ package ga4gh_task_exec import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" -import _ "github.com/gengo/grpc-gateway/third_party/googleapis/google/api" +import _ "github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api" import ( context "golang.org/x/net/context" @@ -44,7 +44,9 @@ var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. -const _ = proto.ProtoPackageIsVersion1 +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package type State int32 @@ -419,7 +421,7 @@ var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion2 +const _ = grpc.SupportPackageIsVersion3 // Client API for TaskService service @@ -623,9 +625,12 @@ var _TaskService_serviceDesc = grpc.ServiceDesc{ Handler: _TaskService_CancelJob_Handler, }, }, - Streams: []grpc.StreamDesc{}, + Streams: []grpc.StreamDesc{}, + Metadata: fileDescriptor0, } +func init() { proto.RegisterFile("task_execution.proto", fileDescriptor0) } + var fileDescriptor0 = []byte{ // 979 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x23, 0x45, diff --git a/src/ga4gh-tasks/task_execution.pb.gw.go b/src/ga4gh-tasks/task_execution.pb.gw.go index f1fe7e5..d7d0f8c 100644 --- a/src/ga4gh-tasks/task_execution.pb.gw.go +++ b/src/ga4gh-tasks/task_execution.pb.gw.go @@ -13,9 +13,9 @@ import ( "io" "net/http" - "github.com/gengo/grpc-gateway/runtime" - "github.com/gengo/grpc-gateway/utilities" "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" @@ -163,7 +163,11 @@ func RegisterTaskServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn }(ctx.Done(), cn.CloseNotify()) } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - resp, md, err := request_TaskService_GetServiceInfo_0(runtime.AnnotateContext(ctx, req), inboundMarshaler, client, req, pathParams) + rctx, err := runtime.AnnotateContext(ctx, req) + if err != nil { + runtime.HTTPError(ctx, outboundMarshaler, w, req, err) + } + resp, md, err := request_TaskService_GetServiceInfo_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, outboundMarshaler, w, req, err) @@ -187,7 +191,11 @@ func RegisterTaskServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn }(ctx.Done(), cn.CloseNotify()) } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - resp, md, err := request_TaskService_RunTask_0(runtime.AnnotateContext(ctx, req), inboundMarshaler, client, req, pathParams) + rctx, err := runtime.AnnotateContext(ctx, req) + if err != nil { + runtime.HTTPError(ctx, outboundMarshaler, w, req, err) + } + resp, md, err := request_TaskService_RunTask_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, outboundMarshaler, w, req, err) @@ -211,7 +219,11 @@ func RegisterTaskServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn }(ctx.Done(), cn.CloseNotify()) } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - resp, md, err := request_TaskService_ListJobs_0(runtime.AnnotateContext(ctx, req), inboundMarshaler, client, req, pathParams) + rctx, err := runtime.AnnotateContext(ctx, req) + if err != nil { + runtime.HTTPError(ctx, outboundMarshaler, w, req, err) + } + resp, md, err := request_TaskService_ListJobs_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, outboundMarshaler, w, req, err) @@ -235,7 +247,11 @@ func RegisterTaskServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn }(ctx.Done(), cn.CloseNotify()) } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - resp, md, err := request_TaskService_GetJob_0(runtime.AnnotateContext(ctx, req), inboundMarshaler, client, req, pathParams) + rctx, err := runtime.AnnotateContext(ctx, req) + if err != nil { + runtime.HTTPError(ctx, outboundMarshaler, w, req, err) + } + resp, md, err := request_TaskService_GetJob_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, outboundMarshaler, w, req, err) @@ -259,7 +275,11 @@ func RegisterTaskServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn }(ctx.Done(), cn.CloseNotify()) } inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - resp, md, err := request_TaskService_CancelJob_0(runtime.AnnotateContext(ctx, req), inboundMarshaler, client, req, pathParams) + rctx, err := runtime.AnnotateContext(ctx, req) + if err != nil { + runtime.HTTPError(ctx, outboundMarshaler, w, req, err) + } + resp, md, err := request_TaskService_CancelJob_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, outboundMarshaler, w, req, err) diff --git a/src/ga4gh-taskserver/server.go b/src/ga4gh-taskserver/server.go index c350d28..d605db0 100644 --- a/src/ga4gh-taskserver/server.go +++ b/src/ga4gh-taskserver/server.go @@ -9,7 +9,7 @@ import ( "golang.org/x/net/context" "github.com/gorilla/mux" "google.golang.org/grpc" - "github.com/gengo/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/runtime" "ga4gh-tasks" "ga4gh-server" "runtime/debug"