diff --git a/agent/logger.go b/agent/logger.go index 89ccaf3a5..508cc5ff5 100644 --- a/agent/logger.go +++ b/agent/logger.go @@ -36,7 +36,7 @@ func (r *Runner) createLogger(_logger zerolog.Logger, uploads *sync.WaitGroup, w return func(step *backend.Step, rc io.Reader) error { logger := _logger.With(). Str("image", step.Image). - Str("workflowID", workflow.ID). + Str("workflow_id", workflow.ID). Logger() uploads.Add(1) diff --git a/agent/rpc/client_grpc.go b/agent/rpc/client_grpc.go index 2ee8f322a..b49b0e98f 100644 --- a/agent/rpc/client_grpc.go +++ b/agent/rpc/client_grpc.go @@ -161,17 +161,14 @@ func (c *client) Wait(ctx context.Context, id string) (err error) { } // Init signals the workflow is initialized. -func (c *client) Init(ctx context.Context, id string, state rpc.State) (err error) { +func (c *client) Init(ctx context.Context, workflowID string, state rpc.WorkflowState) (err error) { retry := c.newBackOff() req := new(proto.InitRequest) - req.Id = id - req.State = new(proto.State) - req.State.Error = state.Error - req.State.ExitCode = int32(state.ExitCode) - req.State.Exited = state.Exited - req.State.Finished = state.Finished + req.Id = workflowID + req.State = new(proto.WorkflowState) req.State.Started = state.Started - req.State.StepUuid = state.StepUUID + req.State.Finished = state.Finished + req.State.Error = state.Error for { _, err = c.client.Init(ctx, req) if err == nil { @@ -201,18 +198,15 @@ func (c *client) Init(ctx context.Context, id string, state rpc.State) (err erro return nil } -// Done signals the work is complete. -func (c *client) Done(ctx context.Context, id string, state rpc.State) (err error) { +// Done signals the workflow is complete. +func (c *client) Done(ctx context.Context, workflowID string, state rpc.WorkflowState) (err error) { retry := c.newBackOff() req := new(proto.DoneRequest) - req.Id = id - req.State = new(proto.State) - req.State.Error = state.Error - req.State.ExitCode = int32(state.ExitCode) - req.State.Exited = state.Exited - req.State.Finished = state.Finished + req.Id = workflowID + req.State = new(proto.WorkflowState) req.State.Started = state.Started - req.State.StepUuid = state.StepUUID + req.State.Finished = state.Finished + req.State.Error = state.Error for { _, err = c.client.Done(ctx, req) if err == nil { @@ -277,17 +271,17 @@ func (c *client) Extend(ctx context.Context, id string) (err error) { } // Update updates the workflow state. -func (c *client) Update(ctx context.Context, id string, state rpc.State) (err error) { +func (c *client) Update(ctx context.Context, id string, state rpc.StepState) (err error) { retry := c.newBackOff() req := new(proto.UpdateRequest) req.Id = id - req.State = new(proto.State) - req.State.Error = state.Error - req.State.ExitCode = int32(state.ExitCode) - req.State.Exited = state.Exited - req.State.Finished = state.Finished - req.State.Started = state.Started + req.State = new(proto.StepState) req.State.StepUuid = state.StepUUID + req.State.Started = state.Started + req.State.Finished = state.Finished + req.State.Exited = state.Exited + req.State.ExitCode = int32(state.ExitCode) + req.State.Error = state.Error for { _, err = c.client.Update(ctx, req) if err == nil { diff --git a/agent/runner.go b/agent/runner.go index 2d96ff41b..5cf8be64d 100644 --- a/agent/runner.go +++ b/agent/runner.go @@ -23,7 +23,6 @@ import ( "time" "github.com/rs/zerolog/log" - "github.com/tevino/abool/v2" "google.golang.org/grpc/metadata" "go.woodpecker-ci.org/woodpecker/v2/pipeline" @@ -57,34 +56,34 @@ func (r *Runner) Run(runnerCtx context.Context) error { //nolint:contextcheck ctxMeta := metadata.NewOutgoingContext(context.Background(), meta) // get the next workflow from the queue - work, err := r.client.Next(runnerCtx, r.filter) + workflow, err := r.client.Next(runnerCtx, r.filter) if err != nil { return err } - if work == nil { + if workflow == nil { return nil } timeout := time.Hour - if minutes := work.Timeout; minutes != 0 { + if minutes := workflow.Timeout; minutes != 0 { timeout = time.Duration(minutes) * time.Minute } - repoName := extractRepositoryName(work.Config) // hack - pipelineNumber := extractPipelineNumber(work.Config) // hack + repoName := extractRepositoryName(workflow.Config) // hack + pipelineNumber := extractPipelineNumber(workflow.Config) // hack r.counter.Add( - work.ID, + workflow.ID, timeout, repoName, pipelineNumber, ) - defer r.counter.Done(work.ID) + defer r.counter.Done(workflow.ID) logger := log.With(). Str("repo", repoName). Str("pipeline", pipelineNumber). - Str("id", work.ID). + Str("workflow_id", workflow.ID). Logger() logger.Debug().Msg("received execution") @@ -99,17 +98,17 @@ func (r *Runner) Run(runnerCtx context.Context) error { //nolint:contextcheck logger.Error().Msg("Received sigterm termination signal") }) - canceled := abool.New() + canceled := false go func() { logger.Debug().Msg("listen for cancel signal") - if err := r.client.Wait(workflowCtx, work.ID); err != nil { - canceled.SetTo(true) + if err := r.client.Wait(workflowCtx, workflow.ID); err != nil { + canceled = true logger.Warn().Err(err).Msg("cancel signal received") cancel() } else { - logger.Debug().Msg("stop listening for cancel signal") + logger.Debug().Msg("done listening for cancel signal") } }() @@ -123,76 +122,66 @@ func (r *Runner) Run(runnerCtx context.Context) error { //nolint:contextcheck case <-time.After(time.Minute): logger.Debug().Msg("pipeline lease renewed") - if err := r.client.Extend(workflowCtx, work.ID); err != nil { + if err := r.client.Extend(workflowCtx, workflow.ID); err != nil { log.Error().Err(err).Msg("extending pipeline deadline failed") } } } }() - state := rpc.State{} + state := rpc.WorkflowState{} state.Started = time.Now().Unix() - err = r.client.Init(runnerCtx, work.ID, state) + err = r.client.Init(runnerCtx, workflow.ID, state) if err != nil { - logger.Error().Err(err).Msg("pipeline initialization failed") + logger.Error().Err(err).Msg("workflow initialization failed") + // TODO: should we return here? } var uploads sync.WaitGroup //nolint:contextcheck - err = pipeline.New(work.Config, + err = pipeline.New(workflow.Config, pipeline.WithContext(workflowCtx), - pipeline.WithTaskUUID(fmt.Sprint(work.ID)), - pipeline.WithLogger(r.createLogger(logger, &uploads, work)), - pipeline.WithTracer(r.createTracer(ctxMeta, logger, work)), + pipeline.WithTaskUUID(fmt.Sprint(workflow.ID)), + pipeline.WithLogger(r.createLogger(logger, &uploads, workflow)), + pipeline.WithTracer(r.createTracer(ctxMeta, logger, workflow)), pipeline.WithBackend(*r.backend), pipeline.WithDescription(map[string]string{ - "ID": work.ID, - "Repo": repoName, - "Pipeline": pipelineNumber, + "workflow_id": workflow.ID, + "repo": repoName, + "pipeline_number": pipelineNumber, }), ).Run(runnerCtx) state.Finished = time.Now().Unix() - state.Exited = true - if canceled.IsSet() { - state.Error = "" - state.ExitCode = pipeline.ExitCodeKilled - } else if err != nil { - pExitError := &pipeline.ExitError{} - switch { - case errors.As(err, &pExitError): - state.ExitCode = pExitError.Code - case errors.Is(err, pipeline.ErrCancel): - state.Error = "" - state.ExitCode = pipeline.ExitCodeKilled - canceled.SetTo(true) - default: - state.ExitCode = 1 - state.Error = err.Error() - } + if errors.Is(err, pipeline.ErrCancel) { + canceled = true + } else if canceled { + err = errors.Join(err, pipeline.ErrCancel) + } + + if err != nil { + state.Error = err.Error() } logger.Debug(). Str("error", state.Error). - Int("exit_code", state.ExitCode). - Bool("canceled", canceled.IsSet()). - Msg("pipeline complete") + Bool("canceled", canceled). + Msg("workflow finished") - logger.Debug().Msg("uploading logs") + logger.Debug().Msg("uploading logs ...") uploads.Wait() - logger.Debug().Msg("uploading logs complete") + logger.Debug().Msg("uploaded logs") logger.Debug(). Str("error", state.Error). - Int("exit_code", state.ExitCode). - Msg("updating pipeline status") + Msg("updating workflow status") - if err := r.client.Done(runnerCtx, work.ID, state); err != nil { - logger.Error().Err(err).Msg("updating pipeline status failed") + if err := r.client.Done(runnerCtx, workflow.ID, state); err != nil { + logger.Error().Err(err).Msg("updating workflow status failed") } else { - logger.Debug().Msg("updating pipeline status complete") + logger.Debug().Msg("updating workflow status complete") } return nil diff --git a/agent/tracer.go b/agent/tracer.go index 985c185d0..9f3588126 100644 --- a/agent/tracer.go +++ b/agent/tracer.go @@ -36,7 +36,7 @@ func (r *Runner) createTracer(ctxMeta context.Context, logger zerolog.Logger, wo Bool("exited", state.Process.Exited). Logger() - stepState := rpc.State{ + stepState := rpc.StepState{ StepUUID: state.Pipeline.Step.UUID, Exited: state.Process.Exited, ExitCode: state.Process.ExitCode, @@ -69,11 +69,11 @@ func (r *Runner) createTracer(ctxMeta context.Context, logger zerolog.Logger, wo state.Pipeline.Step.Environment["CI_MACHINE"] = r.hostname state.Pipeline.Step.Environment["CI_PIPELINE_STATUS"] = "success" - state.Pipeline.Step.Environment["CI_PIPELINE_STARTED"] = strconv.FormatInt(state.Pipeline.Time, 10) + state.Pipeline.Step.Environment["CI_PIPELINE_STARTED"] = strconv.FormatInt(state.Pipeline.Started, 10) state.Pipeline.Step.Environment["CI_PIPELINE_FINISHED"] = strconv.FormatInt(time.Now().Unix(), 10) state.Pipeline.Step.Environment["CI_STEP_STATUS"] = "success" - state.Pipeline.Step.Environment["CI_STEP_STARTED"] = strconv.FormatInt(state.Pipeline.Time, 10) + state.Pipeline.Step.Environment["CI_STEP_STARTED"] = strconv.FormatInt(state.Pipeline.Started, 10) state.Pipeline.Step.Environment["CI_STEP_FINISHED"] = strconv.FormatInt(time.Now().Unix(), 10) state.Pipeline.Step.Environment["CI_SYSTEM_PLATFORM"] = runtime.GOOS + "/" + runtime.GOARCH diff --git a/pipeline/pipeline.go b/pipeline/pipeline.go index 7267c6a57..1c23061da 100644 --- a/pipeline/pipeline.go +++ b/pipeline/pipeline.go @@ -38,7 +38,7 @@ type ( // Global state of the pipeline. Pipeline struct { // Pipeline time started - Time int64 `json:"time"` + Started int64 `json:"time"` // Current pipeline step Step *backend.Step `json:"step"` // Current pipeline error state @@ -147,7 +147,7 @@ func (r *Runtime) traceStep(processState *backend.State, err error, step *backen } state := new(State) - state.Pipeline.Time = r.started + state.Pipeline.Started = r.started state.Pipeline.Step = step state.Process = processState // empty state.Pipeline.Error = r.err diff --git a/pipeline/rpc/mocks/peer.go b/pipeline/rpc/mocks/peer.go index 3279e2b3a..8d0c45d18 100644 --- a/pipeline/rpc/mocks/peer.go +++ b/pipeline/rpc/mocks/peer.go @@ -17,17 +17,17 @@ type Peer struct { mock.Mock } -// Done provides a mock function with given fields: c, id, state -func (_m *Peer) Done(c context.Context, id string, state rpc.State) error { - ret := _m.Called(c, id, state) +// Done provides a mock function with given fields: c, workflowID, state +func (_m *Peer) Done(c context.Context, workflowID string, state rpc.WorkflowState) error { + ret := _m.Called(c, workflowID, state) if len(ret) == 0 { panic("no return value specified for Done") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, rpc.State) error); ok { - r0 = rf(c, id, state) + if rf, ok := ret.Get(0).(func(context.Context, string, rpc.WorkflowState) error); ok { + r0 = rf(c, workflowID, state) } else { r0 = ret.Error(0) } @@ -35,9 +35,9 @@ func (_m *Peer) Done(c context.Context, id string, state rpc.State) error { return r0 } -// Extend provides a mock function with given fields: c, id -func (_m *Peer) Extend(c context.Context, id string) error { - ret := _m.Called(c, id) +// Extend provides a mock function with given fields: c, workflowID +func (_m *Peer) Extend(c context.Context, workflowID string) error { + ret := _m.Called(c, workflowID) if len(ret) == 0 { panic("no return value specified for Extend") @@ -45,7 +45,7 @@ func (_m *Peer) Extend(c context.Context, id string) error { var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(c, id) + r0 = rf(c, workflowID) } else { r0 = ret.Error(0) } @@ -53,17 +53,17 @@ func (_m *Peer) Extend(c context.Context, id string) error { return r0 } -// Init provides a mock function with given fields: c, id, state -func (_m *Peer) Init(c context.Context, id string, state rpc.State) error { - ret := _m.Called(c, id, state) +// Init provides a mock function with given fields: c, workflowID, state +func (_m *Peer) Init(c context.Context, workflowID string, state rpc.WorkflowState) error { + ret := _m.Called(c, workflowID, state) if len(ret) == 0 { panic("no return value specified for Init") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, rpc.State) error); ok { - r0 = rf(c, id, state) + if rf, ok := ret.Get(0).(func(context.Context, string, rpc.WorkflowState) error); ok { + r0 = rf(c, workflowID, state) } else { r0 = ret.Error(0) } @@ -183,17 +183,17 @@ func (_m *Peer) UnregisterAgent(ctx context.Context) error { return r0 } -// Update provides a mock function with given fields: c, id, state -func (_m *Peer) Update(c context.Context, id string, state rpc.State) error { - ret := _m.Called(c, id, state) +// Update provides a mock function with given fields: c, workflowID, state +func (_m *Peer) Update(c context.Context, workflowID string, state rpc.StepState) error { + ret := _m.Called(c, workflowID, state) if len(ret) == 0 { panic("no return value specified for Update") } var r0 error - if rf, ok := ret.Get(0).(func(context.Context, string, rpc.State) error); ok { - r0 = rf(c, id, state) + if rf, ok := ret.Get(0).(func(context.Context, string, rpc.StepState) error); ok { + r0 = rf(c, workflowID, state) } else { r0 = ret.Error(0) } @@ -231,9 +231,9 @@ func (_m *Peer) Version(c context.Context) (*rpc.Version, error) { return r0, r1 } -// Wait provides a mock function with given fields: c, id -func (_m *Peer) Wait(c context.Context, id string) error { - ret := _m.Called(c, id) +// Wait provides a mock function with given fields: c, workflowID +func (_m *Peer) Wait(c context.Context, workflowID string) error { + ret := _m.Called(c, workflowID) if len(ret) == 0 { panic("no return value specified for Wait") @@ -241,7 +241,7 @@ func (_m *Peer) Wait(c context.Context, id string) error { var r0 error if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { - r0 = rf(c, id) + r0 = rf(c, workflowID) } else { r0 = ret.Error(0) } diff --git a/pipeline/rpc/peer.go b/pipeline/rpc/peer.go index d8d82a163..b38b01051 100644 --- a/pipeline/rpc/peer.go +++ b/pipeline/rpc/peer.go @@ -27,11 +27,18 @@ type ( Labels map[string]string `json:"labels"` } - // State defines the step state. - State struct { + // StepState defines the step state. + StepState struct { StepUUID string `json:"step_uuid"` + Started int64 `json:"started"` + Finished int64 `json:"finished"` Exited bool `json:"exited"` ExitCode int `json:"exit_code"` + Error string `json:"error"` + } + + // WorkflowState defines the workflow state. + WorkflowState struct { Started int64 `json:"started"` Finished int64 `json:"finished"` Error string `json:"error"` @@ -61,21 +68,21 @@ type Peer interface { Next(c context.Context, f Filter) (*Workflow, error) // Wait blocks until the workflow is complete - Wait(c context.Context, id string) error + Wait(c context.Context, workflowID string) error - // Init signals the step is initialized - Init(c context.Context, id string, state State) error + // Init signals the workflow is initialized + Init(c context.Context, workflowID string, state WorkflowState) error - // Done signals the step is complete - Done(c context.Context, id string, state State) error + // Done signals the workflow is complete + Done(c context.Context, workflowID string, state WorkflowState) error // Extend extends the workflow deadline - Extend(c context.Context, id string) error + Extend(c context.Context, workflowID string) error // Update updates the step state - Update(c context.Context, id string, state State) error + Update(c context.Context, workflowID string, state StepState) error - // Log writes the workflow log entry + // Log writes the step log entry Log(c context.Context, logEntry *LogEntry) error // RegisterAgent register our agent to the server diff --git a/pipeline/rpc/proto/version.go b/pipeline/rpc/proto/version.go index b009af074..2de7645f3 100644 --- a/pipeline/rpc/proto/version.go +++ b/pipeline/rpc/proto/version.go @@ -16,4 +16,4 @@ package proto // Version is the version of the woodpecker.proto file, // IMPORTANT: increased by 1 each time it get changed. -const Version int32 = 8 +const Version int32 = 9 diff --git a/pipeline/rpc/proto/woodpecker.pb.go b/pipeline/rpc/proto/woodpecker.pb.go index 2bda93f06..f66e9be5b 100644 --- a/pipeline/rpc/proto/woodpecker.pb.go +++ b/pipeline/rpc/proto/woodpecker.pb.go @@ -35,21 +35,21 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type State struct { +type StepState struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields StepUuid string `protobuf:"bytes,1,opt,name=step_uuid,json=stepUuid,proto3" json:"step_uuid,omitempty"` - Exited bool `protobuf:"varint,2,opt,name=exited,proto3" json:"exited,omitempty"` - ExitCode int32 `protobuf:"varint,3,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` - Started int64 `protobuf:"varint,4,opt,name=started,proto3" json:"started,omitempty"` - Finished int64 `protobuf:"varint,5,opt,name=finished,proto3" json:"finished,omitempty"` + Started int64 `protobuf:"varint,2,opt,name=started,proto3" json:"started,omitempty"` + Finished int64 `protobuf:"varint,3,opt,name=finished,proto3" json:"finished,omitempty"` + Exited bool `protobuf:"varint,4,opt,name=exited,proto3" json:"exited,omitempty"` + ExitCode int32 `protobuf:"varint,5,opt,name=exit_code,json=exitCode,proto3" json:"exit_code,omitempty"` Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` } -func (x *State) Reset() { - *x = State{} +func (x *StepState) Reset() { + *x = StepState{} if protoimpl.UnsafeEnabled { mi := &file_woodpecker_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -57,13 +57,13 @@ func (x *State) Reset() { } } -func (x *State) String() string { +func (x *StepState) String() string { return protoimpl.X.MessageStringOf(x) } -func (*State) ProtoMessage() {} +func (*StepState) ProtoMessage() {} -func (x *State) ProtoReflect() protoreflect.Message { +func (x *StepState) ProtoReflect() protoreflect.Message { mi := &file_woodpecker_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -75,47 +75,110 @@ func (x *State) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use State.ProtoReflect.Descriptor instead. -func (*State) Descriptor() ([]byte, []int) { +// Deprecated: Use StepState.ProtoReflect.Descriptor instead. +func (*StepState) Descriptor() ([]byte, []int) { return file_woodpecker_proto_rawDescGZIP(), []int{0} } -func (x *State) GetStepUuid() string { +func (x *StepState) GetStepUuid() string { if x != nil { return x.StepUuid } return "" } -func (x *State) GetExited() bool { - if x != nil { - return x.Exited - } - return false -} - -func (x *State) GetExitCode() int32 { - if x != nil { - return x.ExitCode - } - return 0 -} - -func (x *State) GetStarted() int64 { +func (x *StepState) GetStarted() int64 { if x != nil { return x.Started } return 0 } -func (x *State) GetFinished() int64 { +func (x *StepState) GetFinished() int64 { if x != nil { return x.Finished } return 0 } -func (x *State) GetError() string { +func (x *StepState) GetExited() bool { + if x != nil { + return x.Exited + } + return false +} + +func (x *StepState) GetExitCode() int32 { + if x != nil { + return x.ExitCode + } + return 0 +} + +func (x *StepState) GetError() string { + if x != nil { + return x.Error + } + return "" +} + +type WorkflowState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Started int64 `protobuf:"varint,4,opt,name=started,proto3" json:"started,omitempty"` + Finished int64 `protobuf:"varint,5,opt,name=finished,proto3" json:"finished,omitempty"` + Error string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *WorkflowState) Reset() { + *x = WorkflowState{} + if protoimpl.UnsafeEnabled { + mi := &file_woodpecker_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WorkflowState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkflowState) ProtoMessage() {} + +func (x *WorkflowState) ProtoReflect() protoreflect.Message { + mi := &file_woodpecker_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkflowState.ProtoReflect.Descriptor instead. +func (*WorkflowState) Descriptor() ([]byte, []int) { + return file_woodpecker_proto_rawDescGZIP(), []int{1} +} + +func (x *WorkflowState) GetStarted() int64 { + if x != nil { + return x.Started + } + return 0 +} + +func (x *WorkflowState) GetFinished() int64 { + if x != nil { + return x.Finished + } + return 0 +} + +func (x *WorkflowState) GetError() string { if x != nil { return x.Error } @@ -137,7 +200,7 @@ type LogEntry struct { func (x *LogEntry) Reset() { *x = LogEntry{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[1] + mi := &file_woodpecker_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -150,7 +213,7 @@ func (x *LogEntry) String() string { func (*LogEntry) ProtoMessage() {} func (x *LogEntry) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[1] + mi := &file_woodpecker_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -163,7 +226,7 @@ func (x *LogEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use LogEntry.ProtoReflect.Descriptor instead. func (*LogEntry) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{1} + return file_woodpecker_proto_rawDescGZIP(), []int{2} } func (x *LogEntry) GetStepUuid() string { @@ -212,7 +275,7 @@ type Filter struct { func (x *Filter) Reset() { *x = Filter{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[2] + mi := &file_woodpecker_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -225,7 +288,7 @@ func (x *Filter) String() string { func (*Filter) ProtoMessage() {} func (x *Filter) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[2] + mi := &file_woodpecker_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -238,7 +301,7 @@ func (x *Filter) ProtoReflect() protoreflect.Message { // Deprecated: Use Filter.ProtoReflect.Descriptor instead. func (*Filter) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{2} + return file_woodpecker_proto_rawDescGZIP(), []int{3} } func (x *Filter) GetLabels() map[string]string { @@ -261,7 +324,7 @@ type Workflow struct { func (x *Workflow) Reset() { *x = Workflow{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[3] + mi := &file_woodpecker_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -274,7 +337,7 @@ func (x *Workflow) String() string { func (*Workflow) ProtoMessage() {} func (x *Workflow) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[3] + mi := &file_woodpecker_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -287,7 +350,7 @@ func (x *Workflow) ProtoReflect() protoreflect.Message { // Deprecated: Use Workflow.ProtoReflect.Descriptor instead. func (*Workflow) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{3} + return file_woodpecker_proto_rawDescGZIP(), []int{4} } func (x *Workflow) GetId() string { @@ -322,7 +385,7 @@ type NextRequest struct { func (x *NextRequest) Reset() { *x = NextRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[4] + mi := &file_woodpecker_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -335,7 +398,7 @@ func (x *NextRequest) String() string { func (*NextRequest) ProtoMessage() {} func (x *NextRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[4] + mi := &file_woodpecker_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -348,7 +411,7 @@ func (x *NextRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use NextRequest.ProtoReflect.Descriptor instead. func (*NextRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{4} + return file_woodpecker_proto_rawDescGZIP(), []int{5} } func (x *NextRequest) GetFilter() *Filter { @@ -363,14 +426,14 @@ type InitRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - State *State `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + State *WorkflowState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` } func (x *InitRequest) Reset() { *x = InitRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[5] + mi := &file_woodpecker_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -383,7 +446,7 @@ func (x *InitRequest) String() string { func (*InitRequest) ProtoMessage() {} func (x *InitRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[5] + mi := &file_woodpecker_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -396,7 +459,7 @@ func (x *InitRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InitRequest.ProtoReflect.Descriptor instead. func (*InitRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{5} + return file_woodpecker_proto_rawDescGZIP(), []int{6} } func (x *InitRequest) GetId() string { @@ -406,7 +469,7 @@ func (x *InitRequest) GetId() string { return "" } -func (x *InitRequest) GetState() *State { +func (x *InitRequest) GetState() *WorkflowState { if x != nil { return x.State } @@ -424,7 +487,7 @@ type WaitRequest struct { func (x *WaitRequest) Reset() { *x = WaitRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[6] + mi := &file_woodpecker_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -437,7 +500,7 @@ func (x *WaitRequest) String() string { func (*WaitRequest) ProtoMessage() {} func (x *WaitRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[6] + mi := &file_woodpecker_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -450,7 +513,7 @@ func (x *WaitRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WaitRequest.ProtoReflect.Descriptor instead. func (*WaitRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{6} + return file_woodpecker_proto_rawDescGZIP(), []int{7} } func (x *WaitRequest) GetId() string { @@ -465,14 +528,14 @@ type DoneRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - State *State `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + State *WorkflowState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` } func (x *DoneRequest) Reset() { *x = DoneRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[7] + mi := &file_woodpecker_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -485,7 +548,7 @@ func (x *DoneRequest) String() string { func (*DoneRequest) ProtoMessage() {} func (x *DoneRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[7] + mi := &file_woodpecker_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -498,7 +561,7 @@ func (x *DoneRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DoneRequest.ProtoReflect.Descriptor instead. func (*DoneRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{7} + return file_woodpecker_proto_rawDescGZIP(), []int{8} } func (x *DoneRequest) GetId() string { @@ -508,7 +571,7 @@ func (x *DoneRequest) GetId() string { return "" } -func (x *DoneRequest) GetState() *State { +func (x *DoneRequest) GetState() *WorkflowState { if x != nil { return x.State } @@ -526,7 +589,7 @@ type ExtendRequest struct { func (x *ExtendRequest) Reset() { *x = ExtendRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[8] + mi := &file_woodpecker_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -539,7 +602,7 @@ func (x *ExtendRequest) String() string { func (*ExtendRequest) ProtoMessage() {} func (x *ExtendRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[8] + mi := &file_woodpecker_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -552,7 +615,7 @@ func (x *ExtendRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtendRequest.ProtoReflect.Descriptor instead. func (*ExtendRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{8} + return file_woodpecker_proto_rawDescGZIP(), []int{9} } func (x *ExtendRequest) GetId() string { @@ -567,14 +630,14 @@ type UpdateRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - State *State `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + State *StepState `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` } func (x *UpdateRequest) Reset() { *x = UpdateRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[9] + mi := &file_woodpecker_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -587,7 +650,7 @@ func (x *UpdateRequest) String() string { func (*UpdateRequest) ProtoMessage() {} func (x *UpdateRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[9] + mi := &file_woodpecker_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -600,7 +663,7 @@ func (x *UpdateRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead. func (*UpdateRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{9} + return file_woodpecker_proto_rawDescGZIP(), []int{10} } func (x *UpdateRequest) GetId() string { @@ -610,7 +673,7 @@ func (x *UpdateRequest) GetId() string { return "" } -func (x *UpdateRequest) GetState() *State { +func (x *UpdateRequest) GetState() *StepState { if x != nil { return x.State } @@ -628,7 +691,7 @@ type LogRequest struct { func (x *LogRequest) Reset() { *x = LogRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[10] + mi := &file_woodpecker_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -641,7 +704,7 @@ func (x *LogRequest) String() string { func (*LogRequest) ProtoMessage() {} func (x *LogRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[10] + mi := &file_woodpecker_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -654,7 +717,7 @@ func (x *LogRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LogRequest.ProtoReflect.Descriptor instead. func (*LogRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{10} + return file_woodpecker_proto_rawDescGZIP(), []int{11} } func (x *LogRequest) GetLogEntry() *LogEntry { @@ -673,7 +736,7 @@ type Empty struct { func (x *Empty) Reset() { *x = Empty{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[11] + mi := &file_woodpecker_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -686,7 +749,7 @@ func (x *Empty) String() string { func (*Empty) ProtoMessage() {} func (x *Empty) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[11] + mi := &file_woodpecker_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -699,7 +762,7 @@ func (x *Empty) ProtoReflect() protoreflect.Message { // Deprecated: Use Empty.ProtoReflect.Descriptor instead. func (*Empty) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{11} + return file_woodpecker_proto_rawDescGZIP(), []int{12} } type ReportHealthRequest struct { @@ -713,7 +776,7 @@ type ReportHealthRequest struct { func (x *ReportHealthRequest) Reset() { *x = ReportHealthRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[12] + mi := &file_woodpecker_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -726,7 +789,7 @@ func (x *ReportHealthRequest) String() string { func (*ReportHealthRequest) ProtoMessage() {} func (x *ReportHealthRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[12] + mi := &file_woodpecker_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -739,7 +802,7 @@ func (x *ReportHealthRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReportHealthRequest.ProtoReflect.Descriptor instead. func (*ReportHealthRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{12} + return file_woodpecker_proto_rawDescGZIP(), []int{13} } func (x *ReportHealthRequest) GetStatus() string { @@ -763,7 +826,7 @@ type RegisterAgentRequest struct { func (x *RegisterAgentRequest) Reset() { *x = RegisterAgentRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[13] + mi := &file_woodpecker_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -776,7 +839,7 @@ func (x *RegisterAgentRequest) String() string { func (*RegisterAgentRequest) ProtoMessage() {} func (x *RegisterAgentRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[13] + mi := &file_woodpecker_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -789,7 +852,7 @@ func (x *RegisterAgentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterAgentRequest.ProtoReflect.Descriptor instead. func (*RegisterAgentRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{13} + return file_woodpecker_proto_rawDescGZIP(), []int{14} } func (x *RegisterAgentRequest) GetPlatform() string { @@ -832,7 +895,7 @@ type VersionResponse struct { func (x *VersionResponse) Reset() { *x = VersionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[14] + mi := &file_woodpecker_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -845,7 +908,7 @@ func (x *VersionResponse) String() string { func (*VersionResponse) ProtoMessage() {} func (x *VersionResponse) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[14] + mi := &file_woodpecker_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -858,7 +921,7 @@ func (x *VersionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead. func (*VersionResponse) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{14} + return file_woodpecker_proto_rawDescGZIP(), []int{15} } func (x *VersionResponse) GetGrpcVersion() int32 { @@ -886,7 +949,7 @@ type NextResponse struct { func (x *NextResponse) Reset() { *x = NextResponse{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[15] + mi := &file_woodpecker_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -899,7 +962,7 @@ func (x *NextResponse) String() string { func (*NextResponse) ProtoMessage() {} func (x *NextResponse) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[15] + mi := &file_woodpecker_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -912,7 +975,7 @@ func (x *NextResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use NextResponse.ProtoReflect.Descriptor instead. func (*NextResponse) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{15} + return file_woodpecker_proto_rawDescGZIP(), []int{16} } func (x *NextResponse) GetWorkflow() *Workflow { @@ -933,7 +996,7 @@ type RegisterAgentResponse struct { func (x *RegisterAgentResponse) Reset() { *x = RegisterAgentResponse{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[16] + mi := &file_woodpecker_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -946,7 +1009,7 @@ func (x *RegisterAgentResponse) String() string { func (*RegisterAgentResponse) ProtoMessage() {} func (x *RegisterAgentResponse) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[16] + mi := &file_woodpecker_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -959,7 +1022,7 @@ func (x *RegisterAgentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RegisterAgentResponse.ProtoReflect.Descriptor instead. func (*RegisterAgentResponse) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{16} + return file_woodpecker_proto_rawDescGZIP(), []int{17} } func (x *RegisterAgentResponse) GetAgentId() int64 { @@ -981,7 +1044,7 @@ type AuthRequest struct { func (x *AuthRequest) Reset() { *x = AuthRequest{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[17] + mi := &file_woodpecker_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -994,7 +1057,7 @@ func (x *AuthRequest) String() string { func (*AuthRequest) ProtoMessage() {} func (x *AuthRequest) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[17] + mi := &file_woodpecker_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1007,7 +1070,7 @@ func (x *AuthRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead. func (*AuthRequest) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{17} + return file_woodpecker_proto_rawDescGZIP(), []int{18} } func (x *AuthRequest) GetAgentToken() string { @@ -1037,7 +1100,7 @@ type AuthResponse struct { func (x *AuthResponse) Reset() { *x = AuthResponse{} if protoimpl.UnsafeEnabled { - mi := &file_woodpecker_proto_msgTypes[18] + mi := &file_woodpecker_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1050,7 +1113,7 @@ func (x *AuthResponse) String() string { func (*AuthResponse) ProtoMessage() {} func (x *AuthResponse) ProtoReflect() protoreflect.Message { - mi := &file_woodpecker_proto_msgTypes[18] + mi := &file_woodpecker_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1063,7 +1126,7 @@ func (x *AuthResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AuthResponse.ProtoReflect.Descriptor instead. func (*AuthResponse) Descriptor() ([]byte, []int) { - return file_woodpecker_proto_rawDescGZIP(), []int{18} + return file_woodpecker_proto_rawDescGZIP(), []int{19} } func (x *AuthResponse) GetStatus() string { @@ -1091,141 +1154,149 @@ var File_woodpecker_proto protoreflect.FileDescriptor var file_woodpecker_proto_rawDesc = []byte{ 0x0a, 0x10, 0x77, 0x6f, 0x6f, 0x64, 0x70, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x01, 0x0a, 0x05, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x75, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x65, 0x70, 0x55, 0x75, 0x69, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x65, 0x78, 0x69, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, - 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x78, 0x69, - 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, - 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x22, 0x77, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1b, 0x0a, - 0x09, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x73, 0x74, 0x65, 0x70, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, - 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x76, 0x0a, 0x06, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x69, 0x6c, - 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x4e, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, - 0x61, 0x64, 0x22, 0x34, 0x0a, 0x0b, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x25, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x41, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x1d, 0x0a, 0x0b, 0x57, - 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x41, 0x0a, 0x0b, 0x44, 0x6f, - 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x22, 0x0a, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x1f, 0x0a, - 0x0d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x43, - 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x74, 0x6f, 0x12, 0x05, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x01, 0x0a, 0x09, 0x53, 0x74, + 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x74, 0x65, 0x70, 0x5f, + 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x74, 0x65, 0x70, + 0x55, 0x75, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, 0x12, 0x1a, + 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, + 0x69, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x74, + 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x78, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x65, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x5b, 0x0a, 0x0d, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, + 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x65, 0x64, + 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x22, 0x77, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x1b, + 0x0a, 0x09, 0x73, 0x74, 0x65, 0x70, 0x5f, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x73, 0x74, 0x65, 0x70, 0x55, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, + 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x76, 0x0a, 0x06, 0x46, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0x4e, 0x0a, 0x08, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x22, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x22, 0x39, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x2b, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x07, - 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x63, - 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, - 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, - 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, - 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x5b, 0x0a, 0x0f, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x0c, 0x4e, 0x65, 0x78, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, - 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x52, 0x08, 0x77, 0x6f, 0x72, - 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x32, 0x0a, 0x15, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x49, 0x0a, 0x0b, 0x41, 0x75, 0x74, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x19, 0x0a, 0x08, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xbb, 0x04, 0x0a, 0x0a, 0x57, - 0x6f, 0x6f, 0x64, 0x70, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x31, 0x0a, 0x07, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x04, - 0x4e, 0x65, 0x78, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x65, 0x78, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x2a, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x04, 0x57, - 0x61, 0x69, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x57, 0x61, 0x69, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x04, 0x44, 0x6f, 0x6e, 0x65, 0x12, - 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x06, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x12, 0x14, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x14, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x28, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x11, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x4c, 0x0a, - 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x1b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, - 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2f, 0x0a, 0x0f, 0x55, - 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x0c, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0c, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x0c, - 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x1a, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, - 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x32, 0x43, 0x0a, 0x0e, 0x57, 0x6f, 0x6f, 0x64, - 0x70, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, 0x31, 0x0a, 0x04, 0x41, 0x75, - 0x74, 0x68, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x41, - 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x37, 0x5a, - 0x35, 0x67, 0x6f, 0x2e, 0x77, 0x6f, 0x6f, 0x64, 0x70, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x2d, 0x63, - 0x69, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x77, 0x6f, 0x6f, 0x64, 0x70, 0x65, 0x63, 0x6b, 0x65, 0x72, - 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x0a, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x22, 0x34, 0x0a, 0x0b, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x49, 0x0a, 0x0b, 0x49, 0x6e, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x22, 0x1d, 0x0a, 0x0b, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x49, 0x0a, 0x0b, 0x44, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, + 0x6f, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x1f, + 0x0a, 0x0d, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x47, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x26, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x74, 0x65, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x39, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x08, 0x6c, 0x6f, 0x67, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2d, 0x0a, 0x13, + 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x82, 0x01, 0x0a, 0x14, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, + 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x70, 0x61, 0x63, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, + 0x62, 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x62, + 0x61, 0x63, 0x6b, 0x65, 0x6e, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x22, 0x5b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x67, 0x72, 0x70, 0x63, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, + 0x0c, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, + 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, + 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x22, 0x32, 0x0a, 0x15, 0x52, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x49, + 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x19, + 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x0c, 0x41, 0x75, 0x74, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, + 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, + 0xbb, 0x04, 0x0a, 0x0a, 0x57, 0x6f, 0x6f, 0x64, 0x70, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x12, 0x31, + 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x31, 0x0a, 0x04, 0x4e, 0x65, 0x78, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4e, 0x65, 0x78, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x12, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, + 0x12, 0x2a, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x04, + 0x44, 0x6f, 0x6e, 0x65, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x6f, 0x6e, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x06, 0x45, 0x78, 0x74, 0x65, + 0x6e, 0x64, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x2e, 0x0a, 0x06, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x28, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, + 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x2f, 0x0a, 0x0f, 0x55, 0x6e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x12, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x1a, 0x0c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x00, 0x12, 0x3a, 0x0a, 0x0c, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x48, 0x65, 0x61, 0x6c, 0x74, + 0x68, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x32, 0x43, 0x0a, + 0x0e, 0x57, 0x6f, 0x6f, 0x64, 0x70, 0x65, 0x63, 0x6b, 0x65, 0x72, 0x41, 0x75, 0x74, 0x68, 0x12, + 0x31, 0x0a, 0x04, 0x41, 0x75, 0x74, 0x68, 0x12, 0x12, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x6f, 0x2e, 0x77, 0x6f, 0x6f, 0x64, 0x70, 0x65, 0x63, + 0x6b, 0x65, 0x72, 0x2d, 0x63, 0x69, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x77, 0x6f, 0x6f, 0x64, 0x70, + 0x65, 0x63, 0x6b, 0x65, 0x72, 0x2f, 0x76, 0x32, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1240,61 +1311,62 @@ func file_woodpecker_proto_rawDescGZIP() []byte { return file_woodpecker_proto_rawDescData } -var file_woodpecker_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_woodpecker_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_woodpecker_proto_goTypes = []interface{}{ - (*State)(nil), // 0: proto.State - (*LogEntry)(nil), // 1: proto.LogEntry - (*Filter)(nil), // 2: proto.Filter - (*Workflow)(nil), // 3: proto.Workflow - (*NextRequest)(nil), // 4: proto.NextRequest - (*InitRequest)(nil), // 5: proto.InitRequest - (*WaitRequest)(nil), // 6: proto.WaitRequest - (*DoneRequest)(nil), // 7: proto.DoneRequest - (*ExtendRequest)(nil), // 8: proto.ExtendRequest - (*UpdateRequest)(nil), // 9: proto.UpdateRequest - (*LogRequest)(nil), // 10: proto.LogRequest - (*Empty)(nil), // 11: proto.Empty - (*ReportHealthRequest)(nil), // 12: proto.ReportHealthRequest - (*RegisterAgentRequest)(nil), // 13: proto.RegisterAgentRequest - (*VersionResponse)(nil), // 14: proto.VersionResponse - (*NextResponse)(nil), // 15: proto.NextResponse - (*RegisterAgentResponse)(nil), // 16: proto.RegisterAgentResponse - (*AuthRequest)(nil), // 17: proto.AuthRequest - (*AuthResponse)(nil), // 18: proto.AuthResponse - nil, // 19: proto.Filter.LabelsEntry + (*StepState)(nil), // 0: proto.StepState + (*WorkflowState)(nil), // 1: proto.WorkflowState + (*LogEntry)(nil), // 2: proto.LogEntry + (*Filter)(nil), // 3: proto.Filter + (*Workflow)(nil), // 4: proto.Workflow + (*NextRequest)(nil), // 5: proto.NextRequest + (*InitRequest)(nil), // 6: proto.InitRequest + (*WaitRequest)(nil), // 7: proto.WaitRequest + (*DoneRequest)(nil), // 8: proto.DoneRequest + (*ExtendRequest)(nil), // 9: proto.ExtendRequest + (*UpdateRequest)(nil), // 10: proto.UpdateRequest + (*LogRequest)(nil), // 11: proto.LogRequest + (*Empty)(nil), // 12: proto.Empty + (*ReportHealthRequest)(nil), // 13: proto.ReportHealthRequest + (*RegisterAgentRequest)(nil), // 14: proto.RegisterAgentRequest + (*VersionResponse)(nil), // 15: proto.VersionResponse + (*NextResponse)(nil), // 16: proto.NextResponse + (*RegisterAgentResponse)(nil), // 17: proto.RegisterAgentResponse + (*AuthRequest)(nil), // 18: proto.AuthRequest + (*AuthResponse)(nil), // 19: proto.AuthResponse + nil, // 20: proto.Filter.LabelsEntry } var file_woodpecker_proto_depIdxs = []int32{ - 19, // 0: proto.Filter.labels:type_name -> proto.Filter.LabelsEntry - 2, // 1: proto.NextRequest.filter:type_name -> proto.Filter - 0, // 2: proto.InitRequest.state:type_name -> proto.State - 0, // 3: proto.DoneRequest.state:type_name -> proto.State - 0, // 4: proto.UpdateRequest.state:type_name -> proto.State - 1, // 5: proto.LogRequest.logEntry:type_name -> proto.LogEntry - 3, // 6: proto.NextResponse.workflow:type_name -> proto.Workflow - 11, // 7: proto.Woodpecker.Version:input_type -> proto.Empty - 4, // 8: proto.Woodpecker.Next:input_type -> proto.NextRequest - 5, // 9: proto.Woodpecker.Init:input_type -> proto.InitRequest - 6, // 10: proto.Woodpecker.Wait:input_type -> proto.WaitRequest - 7, // 11: proto.Woodpecker.Done:input_type -> proto.DoneRequest - 8, // 12: proto.Woodpecker.Extend:input_type -> proto.ExtendRequest - 9, // 13: proto.Woodpecker.Update:input_type -> proto.UpdateRequest - 10, // 14: proto.Woodpecker.Log:input_type -> proto.LogRequest - 13, // 15: proto.Woodpecker.RegisterAgent:input_type -> proto.RegisterAgentRequest - 11, // 16: proto.Woodpecker.UnregisterAgent:input_type -> proto.Empty - 12, // 17: proto.Woodpecker.ReportHealth:input_type -> proto.ReportHealthRequest - 17, // 18: proto.WoodpeckerAuth.Auth:input_type -> proto.AuthRequest - 14, // 19: proto.Woodpecker.Version:output_type -> proto.VersionResponse - 15, // 20: proto.Woodpecker.Next:output_type -> proto.NextResponse - 11, // 21: proto.Woodpecker.Init:output_type -> proto.Empty - 11, // 22: proto.Woodpecker.Wait:output_type -> proto.Empty - 11, // 23: proto.Woodpecker.Done:output_type -> proto.Empty - 11, // 24: proto.Woodpecker.Extend:output_type -> proto.Empty - 11, // 25: proto.Woodpecker.Update:output_type -> proto.Empty - 11, // 26: proto.Woodpecker.Log:output_type -> proto.Empty - 16, // 27: proto.Woodpecker.RegisterAgent:output_type -> proto.RegisterAgentResponse - 11, // 28: proto.Woodpecker.UnregisterAgent:output_type -> proto.Empty - 11, // 29: proto.Woodpecker.ReportHealth:output_type -> proto.Empty - 18, // 30: proto.WoodpeckerAuth.Auth:output_type -> proto.AuthResponse + 20, // 0: proto.Filter.labels:type_name -> proto.Filter.LabelsEntry + 3, // 1: proto.NextRequest.filter:type_name -> proto.Filter + 1, // 2: proto.InitRequest.state:type_name -> proto.WorkflowState + 1, // 3: proto.DoneRequest.state:type_name -> proto.WorkflowState + 0, // 4: proto.UpdateRequest.state:type_name -> proto.StepState + 2, // 5: proto.LogRequest.logEntry:type_name -> proto.LogEntry + 4, // 6: proto.NextResponse.workflow:type_name -> proto.Workflow + 12, // 7: proto.Woodpecker.Version:input_type -> proto.Empty + 5, // 8: proto.Woodpecker.Next:input_type -> proto.NextRequest + 6, // 9: proto.Woodpecker.Init:input_type -> proto.InitRequest + 7, // 10: proto.Woodpecker.Wait:input_type -> proto.WaitRequest + 8, // 11: proto.Woodpecker.Done:input_type -> proto.DoneRequest + 9, // 12: proto.Woodpecker.Extend:input_type -> proto.ExtendRequest + 10, // 13: proto.Woodpecker.Update:input_type -> proto.UpdateRequest + 11, // 14: proto.Woodpecker.Log:input_type -> proto.LogRequest + 14, // 15: proto.Woodpecker.RegisterAgent:input_type -> proto.RegisterAgentRequest + 12, // 16: proto.Woodpecker.UnregisterAgent:input_type -> proto.Empty + 13, // 17: proto.Woodpecker.ReportHealth:input_type -> proto.ReportHealthRequest + 18, // 18: proto.WoodpeckerAuth.Auth:input_type -> proto.AuthRequest + 15, // 19: proto.Woodpecker.Version:output_type -> proto.VersionResponse + 16, // 20: proto.Woodpecker.Next:output_type -> proto.NextResponse + 12, // 21: proto.Woodpecker.Init:output_type -> proto.Empty + 12, // 22: proto.Woodpecker.Wait:output_type -> proto.Empty + 12, // 23: proto.Woodpecker.Done:output_type -> proto.Empty + 12, // 24: proto.Woodpecker.Extend:output_type -> proto.Empty + 12, // 25: proto.Woodpecker.Update:output_type -> proto.Empty + 12, // 26: proto.Woodpecker.Log:output_type -> proto.Empty + 17, // 27: proto.Woodpecker.RegisterAgent:output_type -> proto.RegisterAgentResponse + 12, // 28: proto.Woodpecker.UnregisterAgent:output_type -> proto.Empty + 12, // 29: proto.Woodpecker.ReportHealth:output_type -> proto.Empty + 19, // 30: proto.WoodpeckerAuth.Auth:output_type -> proto.AuthResponse 19, // [19:31] is the sub-list for method output_type 7, // [7:19] is the sub-list for method input_type 7, // [7:7] is the sub-list for extension type_name @@ -1309,7 +1381,7 @@ func file_woodpecker_proto_init() { } if !protoimpl.UnsafeEnabled { file_woodpecker_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*State); i { + switch v := v.(*StepState); i { case 0: return &v.state case 1: @@ -1321,7 +1393,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogEntry); i { + switch v := v.(*WorkflowState); i { case 0: return &v.state case 1: @@ -1333,7 +1405,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Filter); i { + switch v := v.(*LogEntry); i { case 0: return &v.state case 1: @@ -1345,7 +1417,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Workflow); i { + switch v := v.(*Filter); i { case 0: return &v.state case 1: @@ -1357,7 +1429,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NextRequest); i { + switch v := v.(*Workflow); i { case 0: return &v.state case 1: @@ -1369,7 +1441,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InitRequest); i { + switch v := v.(*NextRequest); i { case 0: return &v.state case 1: @@ -1381,7 +1453,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WaitRequest); i { + switch v := v.(*InitRequest); i { case 0: return &v.state case 1: @@ -1393,7 +1465,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DoneRequest); i { + switch v := v.(*WaitRequest); i { case 0: return &v.state case 1: @@ -1405,7 +1477,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExtendRequest); i { + switch v := v.(*DoneRequest); i { case 0: return &v.state case 1: @@ -1417,7 +1489,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateRequest); i { + switch v := v.(*ExtendRequest); i { case 0: return &v.state case 1: @@ -1429,7 +1501,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogRequest); i { + switch v := v.(*UpdateRequest); i { case 0: return &v.state case 1: @@ -1441,7 +1513,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Empty); i { + switch v := v.(*LogRequest); i { case 0: return &v.state case 1: @@ -1453,7 +1525,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReportHealthRequest); i { + switch v := v.(*Empty); i { case 0: return &v.state case 1: @@ -1465,7 +1537,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterAgentRequest); i { + switch v := v.(*ReportHealthRequest); i { case 0: return &v.state case 1: @@ -1477,7 +1549,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionResponse); i { + switch v := v.(*RegisterAgentRequest); i { case 0: return &v.state case 1: @@ -1489,7 +1561,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NextResponse); i { + switch v := v.(*VersionResponse); i { case 0: return &v.state case 1: @@ -1501,7 +1573,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RegisterAgentResponse); i { + switch v := v.(*NextResponse); i { case 0: return &v.state case 1: @@ -1513,7 +1585,7 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AuthRequest); i { + switch v := v.(*RegisterAgentResponse); i { case 0: return &v.state case 1: @@ -1525,6 +1597,18 @@ func file_woodpecker_proto_init() { } } file_woodpecker_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AuthRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_woodpecker_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AuthResponse); i { case 0: return &v.state @@ -1543,7 +1627,7 @@ func file_woodpecker_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_woodpecker_proto_rawDesc, NumEnums: 0, - NumMessages: 20, + NumMessages: 21, NumExtensions: 0, NumServices: 2, }, diff --git a/pipeline/rpc/proto/woodpecker.proto b/pipeline/rpc/proto/woodpecker.proto index 4d752c243..8fc577586 100644 --- a/pipeline/rpc/proto/woodpecker.proto +++ b/pipeline/rpc/proto/woodpecker.proto @@ -41,10 +41,16 @@ service Woodpecker { // Basic Types // -message State { +message StepState { string step_uuid = 1; - bool exited = 2; - int32 exit_code = 3; + int64 started = 2; + int64 finished = 3; + bool exited = 4; + int32 exit_code = 5; + string error = 6; +} + +message WorkflowState { int64 started = 4; int64 finished = 5; string error = 6; @@ -78,7 +84,7 @@ message NextRequest { message InitRequest { string id = 1; - State state = 2; + WorkflowState state = 2; } message WaitRequest { @@ -87,7 +93,7 @@ message WaitRequest { message DoneRequest { string id = 1; - State state = 2; + WorkflowState state = 2; } message ExtendRequest { @@ -96,7 +102,7 @@ message ExtendRequest { message UpdateRequest { string id = 1; - State state = 2; + StepState state = 2; } message LogRequest { diff --git a/pipeline/tracer.go b/pipeline/tracer.go index 88db83586..fb9194be1 100644 --- a/pipeline/tracer.go +++ b/pipeline/tracer.go @@ -44,11 +44,11 @@ var DefaultTracer = TraceFunc(func(state *State) error { return nil } state.Pipeline.Step.Environment["CI_PIPELINE_STATUS"] = "success" - state.Pipeline.Step.Environment["CI_PIPELINE_STARTED"] = strconv.FormatInt(state.Pipeline.Time, 10) + state.Pipeline.Step.Environment["CI_PIPELINE_STARTED"] = strconv.FormatInt(state.Pipeline.Started, 10) state.Pipeline.Step.Environment["CI_PIPELINE_FINISHED"] = strconv.FormatInt(time.Now().Unix(), 10) state.Pipeline.Step.Environment["CI_STEP_STATUS"] = "success" - state.Pipeline.Step.Environment["CI_STEP_STARTED"] = strconv.FormatInt(state.Pipeline.Time, 10) + state.Pipeline.Step.Environment["CI_STEP_STARTED"] = strconv.FormatInt(state.Pipeline.Started, 10) state.Pipeline.Step.Environment["CI_STEP_FINISHED"] = strconv.FormatInt(time.Now().Unix(), 10) if state.Pipeline.Error != nil { diff --git a/server/grpc/rpc.go b/server/grpc/rpc.go index 94cda672c..0631dd330 100644 --- a/server/grpc/rpc.go +++ b/server/grpc/rpc.go @@ -48,7 +48,7 @@ type RPC struct { pipelineCount *prometheus.CounterVec } -// Next implements the rpc.Next function. +// Next blocks until it provides the next workflow to execute. func (s *RPC) Next(c context.Context, agentFilter rpc.Filter) (*rpc.Workflow, error) { if hostname, err := s.getHostnameFromContext(c); err == nil { log.Debug().Msgf("agent connected: %s: polling", hostname) @@ -80,25 +80,25 @@ func (s *RPC) Next(c context.Context, agentFilter rpc.Filter) (*rpc.Workflow, er } // task should not run, so mark it as done - if err := s.Done(c, task.ID, rpc.State{}); err != nil { - log.Error().Err(err).Msgf("mark task '%s' done failed", task.ID) + if err := s.Done(c, task.ID, rpc.WorkflowState{}); err != nil { + log.Error().Err(err).Msgf("marking workflow task '%s' as done failed", task.ID) } } } -// Wait implements the rpc.Wait function. -func (s *RPC) Wait(c context.Context, id string) error { - return s.queue.Wait(c, id) +// Wait blocks until the workflow with the given ID is done. +func (s *RPC) Wait(c context.Context, workflowID string) error { + return s.queue.Wait(c, workflowID) } -// Extend implements the rpc.Extend function. -func (s *RPC) Extend(c context.Context, id string) error { - return s.queue.Extend(c, id) +// Extend extends the lease for the workflow with the given ID. +func (s *RPC) Extend(c context.Context, workflowID string) error { + return s.queue.Extend(c, workflowID) } -// Update implements the rpc.Update function. -func (s *RPC) Update(_ context.Context, id string, state rpc.State) error { - workflowID, err := strconv.ParseInt(id, 10, 64) +// Update updates the state of a step. +func (s *RPC) Update(_ context.Context, strWorkflowID string, state rpc.StepState) error { + workflowID, err := strconv.ParseInt(strWorkflowID, 10, 64) if err != nil { return err } @@ -163,15 +163,15 @@ func (s *RPC) Update(_ context.Context, id string, state rpc.State) error { } // Init implements the rpc.Init function. -func (s *RPC) Init(c context.Context, id string, state rpc.State) error { - stepID, err := strconv.ParseInt(id, 10, 64) +func (s *RPC) Init(c context.Context, strWorkflowID string, state rpc.WorkflowState) error { + workflowID, err := strconv.ParseInt(strWorkflowID, 10, 64) if err != nil { return err } - workflow, err := s.store.WorkflowLoad(stepID) + workflow, err := s.store.WorkflowLoad(workflowID) if err != nil { - log.Error().Err(err).Msgf("cannot find step with id %d", stepID) + log.Error().Err(err).Msgf("cannot find workflow with id %d", workflowID) return err } @@ -195,7 +195,7 @@ func (s *RPC) Init(c context.Context, id string, state rpc.State) error { if currentPipeline.Status == model.StatusPending { if currentPipeline, err = pipeline.UpdateToStatusRunning(s.store, *currentPipeline, state.Started); err != nil { - log.Error().Err(err).Msgf("init: cannot update build_id %d state", currentPipeline.ID) + log.Error().Err(err).Msgf("init: cannot update pipeline %d state", currentPipeline.ID) } } @@ -220,24 +220,25 @@ func (s *RPC) Init(c context.Context, id string, state rpc.State) error { s.pubsub.Publish(message) }() - workflow, err = pipeline.UpdateWorkflowToStatusStarted(s.store, *workflow, state) + workflow, err = pipeline.UpdateWorkflowStatusToRunning(s.store, *workflow, state) if err != nil { return err } s.updateForgeStatus(c, repo, currentPipeline, workflow) + return nil } -// Done implements the rpc.Done function. -func (s *RPC) Done(c context.Context, id string, state rpc.State) error { - workflowID, err := strconv.ParseInt(id, 10, 64) +// Done marks the workflow with the given ID as done. +func (s *RPC) Done(c context.Context, strWorkflowID string, state rpc.WorkflowState) error { + workflowID, err := strconv.ParseInt(strWorkflowID, 10, 64) if err != nil { return err } workflow, err := s.store.WorkflowLoad(workflowID) if err != nil { - log.Error().Err(err).Msgf("cannot find step with id %d", workflowID) + log.Error().Err(err).Msgf("cannot find workflow with id %d", workflowID) return err } @@ -261,19 +262,19 @@ func (s *RPC) Done(c context.Context, id string, state rpc.State) error { logger := log.With(). Str("repo_id", fmt.Sprint(repo.ID)). Str("pipeline_id", fmt.Sprint(currentPipeline.ID)). - Str("workflow_id", id).Logger() + Str("workflow_id", strWorkflowID).Logger() logger.Trace().Msgf("gRPC Done with state: %#v", state) if workflow, err = pipeline.UpdateWorkflowStatusToDone(s.store, *workflow, state); err != nil { - logger.Error().Err(err).Msgf("pipeline.UpdateStepStatusToDone: cannot update workflow state: %s", err) + logger.Error().Err(err).Msgf("pipeline.UpdateWorkflowStatusToDone: cannot update workflow state: %s", err) } var queueErr error if workflow.Failing() { - queueErr = s.queue.Error(c, id, fmt.Errorf("step finished with exit code %d, %s", state.ExitCode, state.Error)) + queueErr = s.queue.Error(c, strWorkflowID, fmt.Errorf("workflow finished with error %s", state.Error)) } else { - queueErr = s.queue.Done(c, id, workflow.State) + queueErr = s.queue.Done(c, strWorkflowID, workflow.State) } if queueErr != nil { logger.Error().Err(queueErr).Msg("queue.Done: cannot ack workflow") @@ -286,8 +287,8 @@ func (s *RPC) Done(c context.Context, id string, state rpc.State) error { s.completeChildrenIfParentCompleted(workflow) if !model.IsThereRunningStage(currentPipeline.Workflows) { - if currentPipeline, err = pipeline.UpdateStatusToDone(s.store, *currentPipeline, model.PipelineStatus(currentPipeline.Workflows), workflow.Stopped); err != nil { - logger.Error().Err(err).Msgf("pipeline.UpdateStatusToDone: cannot update workflow final state") + if currentPipeline, err = pipeline.UpdateStatusToDone(s.store, *currentPipeline, model.PipelineStatus(currentPipeline.Workflows), workflow.Finished); err != nil { + logger.Error().Err(err).Msgf("pipeline.UpdateStatusToDone: cannot update workflows final state") } } @@ -311,25 +312,25 @@ func (s *RPC) Done(c context.Context, id string, state rpc.State) error { s.pipelineTime.WithLabelValues(repo.FullName, currentPipeline.Branch, string(currentPipeline.Status), "total").Set(float64(currentPipeline.Finished - currentPipeline.Started)) } if currentPipeline.IsMultiPipeline() { - s.pipelineTime.WithLabelValues(repo.FullName, currentPipeline.Branch, string(workflow.State), workflow.Name).Set(float64(workflow.Stopped - workflow.Started)) + s.pipelineTime.WithLabelValues(repo.FullName, currentPipeline.Branch, string(workflow.State), workflow.Name).Set(float64(workflow.Finished - workflow.Started)) } return nil } -// Log implements the rpc.Log function. -func (s *RPC) Log(c context.Context, _logEntry *rpc.LogEntry) error { +// Log writes a log entry to the database and publishes it to the pubsub. +func (s *RPC) Log(c context.Context, rpcLogEntry *rpc.LogEntry) error { // convert rpc log_entry to model.log_entry - step, err := s.store.StepByUUID(_logEntry.StepUUID) + step, err := s.store.StepByUUID(rpcLogEntry.StepUUID) if err != nil { - return fmt.Errorf("could not find step with uuid %s in store: %w", _logEntry.StepUUID, err) + return fmt.Errorf("could not find step with uuid %s in store: %w", rpcLogEntry.StepUUID, err) } logEntry := &model.LogEntry{ StepID: step.ID, - Time: _logEntry.Time, - Line: _logEntry.Line, - Data: _logEntry.Data, - Type: model.LogEntryType(_logEntry.Type), + Time: rpcLogEntry.Time, + Line: rpcLogEntry.Line, + Data: rpcLogEntry.Data, + Type: model.LogEntryType(rpcLogEntry.Type), } // make sure writes to pubsub are non blocking (https://github.com/woodpecker-ci/woodpecker/blob/c919f32e0b6432a95e1a6d3d0ad662f591adf73f/server/logging/log.go#L9) go func() { @@ -366,13 +367,14 @@ func (s *RPC) RegisterAgent(ctx context.Context, platform, backend, version stri return agent.ID, nil } +// UnregisterAgent removes the agent from the database. func (s *RPC) UnregisterAgent(ctx context.Context) error { agent, err := s.getAgentFromContext(ctx) if !agent.IsSystemAgent() { // registered with individual agent token -> do not unregister return nil } - log.Debug().Msgf("unregistering agent with ID %d", agent.ID) + log.Debug().Msgf("un-registering agent with ID %d", agent.ID) if err != nil { return err } @@ -401,7 +403,7 @@ func (s *RPC) ReportHealth(ctx context.Context, status string) error { func (s *RPC) completeChildrenIfParentCompleted(completedWorkflow *model.Workflow) { for _, c := range completedWorkflow.Children { if c.Running() { - if _, err := pipeline.UpdateStepToStatusSkipped(s.store, *c, completedWorkflow.Stopped); err != nil { + if _, err := pipeline.UpdateStepToStatusSkipped(s.store, *c, completedWorkflow.Finished); err != nil { log.Error().Err(err).Msgf("done: cannot update step_id %d child state", c.ID) } } diff --git a/server/grpc/server.go b/server/grpc/server.go index 67c942223..d6882c0f8 100644 --- a/server/grpc/server.go +++ b/server/grpc/server.go @@ -85,13 +85,10 @@ func (s *WoodpeckerServer) Next(c context.Context, req *proto.NextRequest) (*pro } func (s *WoodpeckerServer) Init(c context.Context, req *proto.InitRequest) (*proto.Empty, error) { - state := rpc.State{ - Error: req.GetState().GetError(), - ExitCode: int(req.GetState().GetExitCode()), - Finished: req.GetState().GetFinished(), + state := rpc.WorkflowState{ Started: req.GetState().GetStarted(), - StepUUID: req.GetState().GetStepUuid(), - Exited: req.GetState().GetExited(), + Finished: req.GetState().GetFinished(), + Error: req.GetState().GetError(), } res := new(proto.Empty) err := s.peer.Init(c, req.GetId(), state) @@ -99,13 +96,13 @@ func (s *WoodpeckerServer) Init(c context.Context, req *proto.InitRequest) (*pro } func (s *WoodpeckerServer) Update(c context.Context, req *proto.UpdateRequest) (*proto.Empty, error) { - state := rpc.State{ + state := rpc.StepState{ + StepUUID: req.GetState().GetStepUuid(), + Started: req.GetState().GetStarted(), + Finished: req.GetState().GetFinished(), + Exited: req.GetState().GetExited(), Error: req.GetState().GetError(), ExitCode: int(req.GetState().GetExitCode()), - Finished: req.GetState().GetFinished(), - Started: req.GetState().GetStarted(), - StepUUID: req.GetState().GetStepUuid(), - Exited: req.GetState().GetExited(), } res := new(proto.Empty) err := s.peer.Update(c, req.GetId(), state) @@ -113,13 +110,10 @@ func (s *WoodpeckerServer) Update(c context.Context, req *proto.UpdateRequest) ( } func (s *WoodpeckerServer) Done(c context.Context, req *proto.DoneRequest) (*proto.Empty, error) { - state := rpc.State{ - Error: req.GetState().GetError(), - ExitCode: int(req.GetState().GetExitCode()), - Finished: req.GetState().GetFinished(), + state := rpc.WorkflowState{ Started: req.GetState().GetStarted(), - StepUUID: req.GetState().GetStepUuid(), - Exited: req.GetState().GetExited(), + Finished: req.GetState().GetFinished(), + Error: req.GetState().GetError(), } res := new(proto.Empty) err := s.peer.Done(c, req.GetId(), state) diff --git a/server/model/step.go b/server/model/step.go index 7c0379fdb..97189e733 100644 --- a/server/model/step.go +++ b/server/model/step.go @@ -37,7 +37,7 @@ type Step struct { Failure string `json:"-" xorm:"failure"` ExitCode int `json:"exit_code" xorm:"exit_code"` Started int64 `json:"start_time,omitempty" xorm:"started"` - Stopped int64 `json:"end_time,omitempty" xorm:"stopped"` + Finished int64 `json:"end_time,omitempty" xorm:"stopped"` Type StepType `json:"type,omitempty" xorm:"type"` } // @name Step diff --git a/server/model/workflow.go b/server/model/workflow.go index 52df70233..7efd5f151 100644 --- a/server/model/workflow.go +++ b/server/model/workflow.go @@ -24,7 +24,7 @@ type Workflow struct { State StatusValue `json:"state" xorm:"state"` Error string `json:"error,omitempty" xorm:"TEXT 'error'"` Started int64 `json:"start_time,omitempty" xorm:"started"` - Stopped int64 `json:"end_time,omitempty" xorm:"stopped"` + Finished int64 `json:"end_time,omitempty" xorm:"stopped"` AgentID int64 `json:"agent_id,omitempty" xorm:"agent_id"` Platform string `json:"platform,omitempty" xorm:"platform"` Environ map[string]string `json:"environ,omitempty" xorm:"json 'environ'"` diff --git a/server/pipeline/step_status.go b/server/pipeline/step_status.go index 4fb869fcc..8ee5b83ba 100644 --- a/server/pipeline/step_status.go +++ b/server/pipeline/step_status.go @@ -24,9 +24,9 @@ import ( "go.woodpecker-ci.org/woodpecker/v2/server/store" ) -func UpdateStepStatus(store store.Store, step *model.Step, state rpc.State) error { +func UpdateStepStatus(store store.Store, step *model.Step, state rpc.StepState) error { if state.Exited { - step.Stopped = state.Finished + step.Finished = state.Finished step.ExitCode = state.ExitCode step.Error = state.Error step.State = model.StatusSuccess @@ -36,30 +36,30 @@ func UpdateStepStatus(store store.Store, step *model.Step, state rpc.State) erro if state.ExitCode == pipeline.ExitCodeKilled { step.State = model.StatusKilled } - } else if step.Stopped == 0 { + } else if step.Finished == 0 { step.Started = state.Started step.State = model.StatusRunning } return store.StepUpdate(step) } -func UpdateStepToStatusStarted(store store.Store, step model.Step, state rpc.State) (*model.Step, error) { +func UpdateStepToStatusStarted(store store.Store, step model.Step, state rpc.StepState) (*model.Step, error) { step.Started = state.Started step.State = model.StatusRunning return &step, store.StepUpdate(&step) } -func UpdateStepToStatusSkipped(store store.Store, step model.Step, stopped int64) (*model.Step, error) { +func UpdateStepToStatusSkipped(store store.Store, step model.Step, finished int64) (*model.Step, error) { step.State = model.StatusSkipped if step.Started != 0 { step.State = model.StatusSuccess // for daemons that are killed - step.Stopped = stopped + step.Finished = finished } return &step, store.StepUpdate(&step) } -func UpdateStepStatusToDone(store store.Store, step model.Step, state rpc.State) (*model.Step, error) { - step.Stopped = state.Finished +func UpdateStepStatusToDone(store store.Store, step model.Step, state rpc.StepState) (*model.Step, error) { + step.Finished = state.Finished step.Error = state.Error step.ExitCode = state.ExitCode if state.Started == 0 { @@ -75,9 +75,9 @@ func UpdateStepStatusToDone(store store.Store, step model.Step, state rpc.State) func UpdateStepToStatusKilled(store store.Store, step model.Step) (*model.Step, error) { step.State = model.StatusKilled - step.Stopped = time.Now().Unix() + step.Finished = time.Now().Unix() if step.Started == 0 { - step.Started = step.Stopped + step.Started = step.Finished } step.ExitCode = pipeline.ExitCodeKilled return &step, store.StepUpdate(&step) diff --git a/server/pipeline/step_status_test.go b/server/pipeline/step_status_test.go index 9ac124d99..c2e9564cf 100644 --- a/server/pipeline/step_status_test.go +++ b/server/pipeline/step_status_test.go @@ -41,7 +41,7 @@ func TestUpdateStepStatusNotExited(t *testing.T) { step := &model.Step{} // advertised step status - state := rpc.State{ + state := rpc.StepState{ Started: int64(42), Exited: false, // Dummy data @@ -54,7 +54,7 @@ func TestUpdateStepStatusNotExited(t *testing.T) { assert.NoError(t, err) assert.EqualValues(t, model.StatusRunning, step.State) assert.EqualValues(t, 42, step.Started) - assert.EqualValues(t, 0, step.Stopped) + assert.EqualValues(t, 0, step.Finished) assert.EqualValues(t, 0, step.ExitCode) assert.EqualValues(t, "", step.Error) } @@ -63,10 +63,10 @@ func TestUpdateStepStatusNotExitedButStopped(t *testing.T) { t.Parallel() // step in db before update - step := &model.Step{Started: 42, Stopped: 64, State: model.StatusKilled} + step := &model.Step{Started: 42, Finished: 64, State: model.StatusKilled} // advertised step status - state := rpc.State{ + state := rpc.StepState{ Exited: false, // Dummy data Finished: int64(1), @@ -78,7 +78,7 @@ func TestUpdateStepStatusNotExitedButStopped(t *testing.T) { assert.NoError(t, err) assert.EqualValues(t, model.StatusKilled, step.State) assert.EqualValues(t, 42, step.Started) - assert.EqualValues(t, 64, step.Stopped) + assert.EqualValues(t, 64, step.Finished) assert.EqualValues(t, 0, step.ExitCode) assert.EqualValues(t, "", step.Error) } @@ -90,7 +90,7 @@ func TestUpdateStepStatusExited(t *testing.T) { step := &model.Step{Started: 42} // advertised step status - state := rpc.State{ + state := rpc.StepState{ Started: int64(42), Exited: true, Finished: int64(34), @@ -102,7 +102,7 @@ func TestUpdateStepStatusExited(t *testing.T) { assert.NoError(t, err) assert.EqualValues(t, model.StatusKilled, step.State) assert.EqualValues(t, 42, step.Started) - assert.EqualValues(t, 34, step.Stopped) + assert.EqualValues(t, 34, step.Finished) assert.EqualValues(t, pipeline.ExitCodeKilled, step.ExitCode) assert.EqualValues(t, "an error", step.Error) } @@ -114,7 +114,7 @@ func TestUpdateStepStatusExitedButNot137(t *testing.T) { step := &model.Step{Started: 42} // advertised step status - state := rpc.State{ + state := rpc.StepState{ Started: int64(42), Exited: true, Finished: int64(34), @@ -125,7 +125,7 @@ func TestUpdateStepStatusExitedButNot137(t *testing.T) { assert.NoError(t, err) assert.EqualValues(t, model.StatusFailure, step.State) assert.EqualValues(t, 42, step.Started) - assert.EqualValues(t, 34, step.Stopped) + assert.EqualValues(t, 34, step.Finished) assert.EqualValues(t, 0, step.ExitCode) assert.EqualValues(t, "an error", step.Error) } @@ -134,7 +134,7 @@ func TestUpdateStepStatusExitedWithCode(t *testing.T) { t.Parallel() // advertised step status - state := rpc.State{ + state := rpc.StepState{ Started: int64(42), Exited: true, Finished: int64(34), @@ -149,10 +149,10 @@ func TestUpdateStepStatusExitedWithCode(t *testing.T) { assert.Equal(t, 1, step.ExitCode) } -func TestUpdateStepPToStatusStarted(t *testing.T) { +func TestUpdateStepToStatusStarted(t *testing.T) { t.Parallel() - state := rpc.State{Started: int64(42)} + state := rpc.StepState{Started: int64(42)} step, _ := UpdateStepToStatusStarted(mockStoreStep(t), model.Step{}, state) assert.Equal(t, model.StatusRunning, step.State) @@ -165,7 +165,7 @@ func TestUpdateStepToStatusSkipped(t *testing.T) { step, _ := UpdateStepToStatusSkipped(mockStoreStep(t), model.Step{}, int64(1)) assert.Equal(t, model.StatusSkipped, step.State) - assert.EqualValues(t, 0, step.Stopped) + assert.EqualValues(t, 0, step.Finished) } func TestUpdateStepToStatusSkippedButStarted(t *testing.T) { @@ -178,20 +178,20 @@ func TestUpdateStepToStatusSkippedButStarted(t *testing.T) { step, _ = UpdateStepToStatusSkipped(mockStoreStep(t), *step, int64(1)) assert.Equal(t, model.StatusSuccess, step.State) - assert.EqualValues(t, 1, step.Stopped) + assert.EqualValues(t, 1, step.Finished) } func TestUpdateStepStatusToDoneSkipped(t *testing.T) { t.Parallel() - state := rpc.State{ + state := rpc.StepState{ Finished: int64(34), } step, _ := UpdateStepStatusToDone(mockStoreStep(t), model.Step{}, state) assert.Equal(t, model.StatusSkipped, step.State) - assert.EqualValues(t, 34, step.Stopped) + assert.EqualValues(t, 34, step.Finished) assert.Empty(t, step.Error) assert.Equal(t, 0, step.ExitCode) } @@ -199,7 +199,7 @@ func TestUpdateStepStatusToDoneSkipped(t *testing.T) { func TestUpdateStepStatusToDoneSuccess(t *testing.T) { t.Parallel() - state := rpc.State{ + state := rpc.StepState{ Started: int64(42), Finished: int64(34), } @@ -207,7 +207,7 @@ func TestUpdateStepStatusToDoneSuccess(t *testing.T) { step, _ := UpdateStepStatusToDone(mockStoreStep(t), model.Step{}, state) assert.Equal(t, model.StatusSuccess, step.State) - assert.EqualValues(t, 34, step.Stopped) + assert.EqualValues(t, 34, step.Finished) assert.Empty(t, step.Error) assert.Equal(t, 0, step.ExitCode) } @@ -215,7 +215,7 @@ func TestUpdateStepStatusToDoneSuccess(t *testing.T) { func TestUpdateStepStatusToDoneFailureWithError(t *testing.T) { t.Parallel() - state := rpc.State{Error: "an error"} + state := rpc.StepState{Error: "an error"} step, _ := UpdateStepStatusToDone(mockStoreStep(t), model.Step{}, state) @@ -225,7 +225,7 @@ func TestUpdateStepStatusToDoneFailureWithError(t *testing.T) { func TestUpdateStepStatusToDoneFailureWithExitCode(t *testing.T) { t.Parallel() - state := rpc.State{ExitCode: 43} + state := rpc.StepState{ExitCode: 43} step, _ := UpdateStepStatusToDone(mockStoreStep(t), model.Step{}, state) @@ -240,8 +240,8 @@ func TestUpdateStepToStatusKilledStarted(t *testing.T) { step, _ := UpdateStepToStatusKilled(mockStoreStep(t), model.Step{}) assert.Equal(t, model.StatusKilled, step.State) - assert.LessOrEqual(t, now, step.Stopped) - assert.Equal(t, step.Stopped, step.Started) + assert.LessOrEqual(t, now, step.Finished) + assert.Equal(t, step.Finished, step.Started) assert.Equal(t, 137, step.ExitCode) } diff --git a/server/pipeline/workflowStatus.go b/server/pipeline/workflow_status.go similarity index 86% rename from server/pipeline/workflowStatus.go rename to server/pipeline/workflow_status.go index f29105ebd..a99ef8ddd 100644 --- a/server/pipeline/workflowStatus.go +++ b/server/pipeline/workflow_status.go @@ -20,7 +20,7 @@ import ( "go.woodpecker-ci.org/woodpecker/v2/server/store" ) -func UpdateWorkflowToStatusStarted(store store.Store, workflow model.Workflow, state rpc.State) (*model.Workflow, error) { +func UpdateWorkflowStatusToRunning(store store.Store, workflow model.Workflow, state rpc.WorkflowState) (*model.Workflow, error) { workflow.Started = state.Started workflow.State = model.StatusRunning return &workflow, store.WorkflowUpdate(&workflow) @@ -31,8 +31,8 @@ func UpdateWorkflowToStatusSkipped(store store.Store, workflow model.Workflow) ( return &workflow, store.WorkflowUpdate(&workflow) } -func UpdateWorkflowStatusToDone(store store.Store, workflow model.Workflow, state rpc.State) (*model.Workflow, error) { - workflow.Stopped = state.Finished +func UpdateWorkflowStatusToDone(store store.Store, workflow model.Workflow, state rpc.WorkflowState) (*model.Workflow, error) { + workflow.Finished = state.Finished workflow.Error = state.Error if state.Started == 0 { workflow.State = model.StatusSkipped