Skip to content

Commit

Permalink
Merge pull request #134 from buchanae/tes-output-files
Browse files Browse the repository at this point in the history
TaskLog implementation (output files, start/end time, metadata)
  • Loading branch information
adamstruck authored Jun 1, 2017
2 parents 4a9e5c8 + 635776c commit ba8ffac
Show file tree
Hide file tree
Showing 21 changed files with 666 additions and 192 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ gen-mocks:
@mockery -dir server -name Database -print > server/mocks/Database_mock.go
@mockery -dir scheduler -name Database -print > scheduler/mocks/Database_mock.go
@mockery -dir scheduler -name Client -print > scheduler/mocks/Client_mock.go
@mockery -dir proto/tes -name TaskServiceClient -print > proto/tes/mocks/TaskServiceClient_mock.go

# Bundle example task messages into Go code.
bundle-examples:
Expand Down
173 changes: 123 additions & 50 deletions proto/funnel/funnel.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions proto/funnel/funnel.proto
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,20 @@ message GetWorkerRequest {
string id = 1;
}

message UpdateTaskLogsRequest {
string id = 1;
tes.TaskLog task_log = 2;
}

message UpdateTaskLogsResponse {}

/**
* Scheduler Service
*/
service SchedulerService {
rpc UpdateExecutorLogs(UpdateExecutorLogsRequest) returns (UpdateExecutorLogsResponse) {};
rpc UpdateWorker(Worker) returns (UpdateWorkerResponse) {};
rpc UpdateTaskLogs(UpdateTaskLogsRequest) returns (UpdateTaskLogsResponse) {};

rpc ListWorkers(ListWorkersRequest) returns (ListWorkersResponse) {
option (google.api.http) = {
Expand Down
23 changes: 23 additions & 0 deletions scheduler/mocks/Client_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,29 @@ func (_m *Client) UpdateExecutorLogs(ctx context.Context, in *funnel.UpdateExecu
return r0, r1
}

// UpdateTaskLogs provides a mock function with given fields: ctx, in, opts
func (_m *Client) UpdateTaskLogs(ctx context.Context, in *funnel.UpdateTaskLogsRequest, opts ...grpc.CallOption) (*funnel.UpdateTaskLogsResponse, error) {
ret := _m.Called(ctx, in, opts)

var r0 *funnel.UpdateTaskLogsResponse
if rf, ok := ret.Get(0).(func(context.Context, *funnel.UpdateTaskLogsRequest, ...grpc.CallOption) *funnel.UpdateTaskLogsResponse); ok {
r0 = rf(ctx, in, opts...)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*funnel.UpdateTaskLogsResponse)
}
}

var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *funnel.UpdateTaskLogsRequest, ...grpc.CallOption) error); ok {
r1 = rf(ctx, in, opts...)
} else {
r1 = ret.Error(1)
}

return r0, r1
}

// UpdateWorker provides a mock function with given fields: ctx, in, opts
func (_m *Client) UpdateWorker(ctx context.Context, in *funnel.Worker, opts ...grpc.CallOption) (*funnel.UpdateWorkerResponse, error) {
ret := _m.Called(ctx, in, opts)
Expand Down
23 changes: 23 additions & 0 deletions server/mocks/Database_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,29 @@ func (_m *Database) UpdateExecutorLogs(_a0 context.Context, _a1 *funnel.UpdateEx
return r0, r1
}

// UpdateTaskLogs provides a mock function with given fields: _a0, _a1
func (_m *Database) UpdateTaskLogs(_a0 context.Context, _a1 *funnel.UpdateTaskLogsRequest) (*funnel.UpdateTaskLogsResponse, error) {
ret := _m.Called(_a0, _a1)

var r0 *funnel.UpdateTaskLogsResponse
if rf, ok := ret.Get(0).(func(context.Context, *funnel.UpdateTaskLogsRequest) *funnel.UpdateTaskLogsResponse); ok {
r0 = rf(_a0, _a1)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*funnel.UpdateTaskLogsResponse)
}
}

var r1 error
if rf, ok := ret.Get(1).(func(context.Context, *funnel.UpdateTaskLogsRequest) error); ok {
r1 = rf(_a0, _a1)
} else {
r1 = ret.Error(1)
}

return r0, r1
}

// UpdateWorker provides a mock function with given fields: _a0, _a1
func (_m *Database) UpdateWorker(_a0 context.Context, _a1 *funnel.Worker) (*funnel.UpdateWorkerResponse, error) {
ret := _m.Called(_a0, _a1)
Expand Down
Loading

0 comments on commit ba8ffac

Please sign in to comment.