Runtime Retries Limit (#1163)

* Implement Runtime Retries

* Remove Debug

* Action Feedback

* Refactor Retries

* Fix WithRetires Typo
This commit is contained in:
ben-toogood 2020-02-07 12:02:41 +00:00 committed by GitHub
parent 19c454ec4b
commit fe7f5a4134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 90 additions and 70 deletions

View File

@ -92,7 +92,7 @@ func (r *runtime) run(events <-chan Event) {
// check running services // check running services
r.RLock() r.RLock()
for _, service := range r.services { for _, service := range r.services {
if service.Running() { if !service.ShouldStart() {
continue continue
} }
@ -104,7 +104,7 @@ func (r *runtime) run(events <-chan Event) {
} }
r.RUnlock() r.RUnlock()
case service := <-r.start: case service := <-r.start:
if service.Running() { if !service.ShouldStart() {
continue continue
} }
// TODO: check service error // TODO: check service error
@ -245,7 +245,7 @@ func (r *runtime) Delete(s *Service) error {
log.Debugf("Runtime deleting service %s", s.Name) log.Debugf("Runtime deleting service %s", s.Name)
if s, ok := r.services[s.Name]; ok { if s, ok := r.services[s.Name]; ok {
// check if running // check if running
if !s.Running() { if s.Running() {
delete(r.services, s.Name) delete(r.services, s.Name)
return nil return nil
} }

View File

@ -51,6 +51,8 @@ type CreateOptions struct {
Output io.Writer Output io.Writer
// Type of service to create // Type of service to create
Type string Type string
// Retries before failing deploy
Retries int
} }
// ReadOptions queries runtime services // ReadOptions queries runtime services
@ -78,6 +80,13 @@ func WithCommand(args ...string) CreateOption {
} }
} }
// WithRetries sets the max retries attemps
func WithRetries(retries int) CreateOption {
return func(o *CreateOptions) {
o.Retries = retries
}
}
// WithEnv sets the created service environment // WithEnv sets the created service environment
func WithEnv(env []string) CreateOption { func WithEnv(env []string) CreateOption {
return func(o *CreateOptions) { return func(o *CreateOptions) {
@ -99,7 +108,7 @@ func ReadService(service string) ReadOption {
} }
} }
// WithVersion confifgures service version // ReadVersion confifgures service version
func ReadVersion(version string) ReadOption { func ReadVersion(version string) ReadOption {
return func(o *ReadOptions) { return func(o *ReadOptions) {
o.Version = version o.Version = version

View File

@ -2,6 +2,7 @@ package runtime
import ( import (
"io" "io"
"strconv"
"sync" "sync"
"time" "time"
@ -19,6 +20,9 @@ type service struct {
err error err error
updated time.Time updated time.Time
retries int
maxRetries int
// output for logs // output for logs
output io.Writer output io.Writer
@ -54,9 +58,10 @@ func newService(s *Service, c CreateOptions) *service {
Env: c.Env, Env: c.Env,
Args: args, Args: args,
}, },
closed: make(chan bool), closed: make(chan bool),
output: c.Output, output: c.Output,
updated: time.Now(), updated: time.Now(),
maxRetries: c.Retries,
} }
} }
@ -65,7 +70,17 @@ func (s *service) streamOutput() {
go io.Copy(s.output, s.PID.Error) go io.Copy(s.output, s.PID.Error)
} }
// Running returns true is the service is running func (s *service) ShouldStart() bool {
s.RLock()
defer s.RUnlock()
if s.running {
return false
}
return s.maxRetries < s.retries
}
func (s *service) Running() bool { func (s *service) Running() bool {
s.RLock() s.RLock()
defer s.RUnlock() defer s.RUnlock()
@ -77,7 +92,7 @@ func (s *service) Start() error {
s.Lock() s.Lock()
defer s.Unlock() defer s.Unlock()
if s.running { if !s.ShouldStart() {
return nil return nil
} }
@ -167,9 +182,11 @@ func (s *service) Wait() {
// save the error // save the error
if err != nil { if err != nil {
log.Debugf("Error running service (%v): %v", s.Name, err) s.retries++
s.Metadata["status"] = "error" s.Metadata["status"] = "error"
s.Metadata["error"] = err.Error() s.Metadata["error"] = err.Error()
s.Metadata["retries"] = strconv.Itoa(s.retries)
s.err = err s.err = err
} else { } else {
s.Metadata["status"] = "done" s.Metadata["status"] = "done"

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// source: micro/go-micro/runtime/service/proto/runtime.proto // source: runtime/service/proto/runtime.proto
package go_micro_runtime package go_micro_runtime
@ -38,7 +38,7 @@ func (m *Service) Reset() { *m = Service{} }
func (m *Service) String() string { return proto.CompactTextString(m) } func (m *Service) String() string { return proto.CompactTextString(m) }
func (*Service) ProtoMessage() {} func (*Service) ProtoMessage() {}
func (*Service) Descriptor() ([]byte, []int) { func (*Service) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{0} return fileDescriptor_2434d8152598889b, []int{0}
} }
func (m *Service) XXX_Unmarshal(b []byte) error { func (m *Service) XXX_Unmarshal(b []byte) error {
@ -101,7 +101,7 @@ func (m *Event) Reset() { *m = Event{} }
func (m *Event) String() string { return proto.CompactTextString(m) } func (m *Event) String() string { return proto.CompactTextString(m) }
func (*Event) ProtoMessage() {} func (*Event) ProtoMessage() {}
func (*Event) Descriptor() ([]byte, []int) { func (*Event) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{1} return fileDescriptor_2434d8152598889b, []int{1}
} }
func (m *Event) XXX_Unmarshal(b []byte) error { func (m *Event) XXX_Unmarshal(b []byte) error {
@ -166,7 +166,7 @@ func (m *CreateOptions) Reset() { *m = CreateOptions{} }
func (m *CreateOptions) String() string { return proto.CompactTextString(m) } func (m *CreateOptions) String() string { return proto.CompactTextString(m) }
func (*CreateOptions) ProtoMessage() {} func (*CreateOptions) ProtoMessage() {}
func (*CreateOptions) Descriptor() ([]byte, []int) { func (*CreateOptions) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{2} return fileDescriptor_2434d8152598889b, []int{2}
} }
func (m *CreateOptions) XXX_Unmarshal(b []byte) error { func (m *CreateOptions) XXX_Unmarshal(b []byte) error {
@ -220,7 +220,7 @@ func (m *CreateRequest) Reset() { *m = CreateRequest{} }
func (m *CreateRequest) String() string { return proto.CompactTextString(m) } func (m *CreateRequest) String() string { return proto.CompactTextString(m) }
func (*CreateRequest) ProtoMessage() {} func (*CreateRequest) ProtoMessage() {}
func (*CreateRequest) Descriptor() ([]byte, []int) { func (*CreateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{3} return fileDescriptor_2434d8152598889b, []int{3}
} }
func (m *CreateRequest) XXX_Unmarshal(b []byte) error { func (m *CreateRequest) XXX_Unmarshal(b []byte) error {
@ -265,7 +265,7 @@ func (m *CreateResponse) Reset() { *m = CreateResponse{} }
func (m *CreateResponse) String() string { return proto.CompactTextString(m) } func (m *CreateResponse) String() string { return proto.CompactTextString(m) }
func (*CreateResponse) ProtoMessage() {} func (*CreateResponse) ProtoMessage() {}
func (*CreateResponse) Descriptor() ([]byte, []int) { func (*CreateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{4} return fileDescriptor_2434d8152598889b, []int{4}
} }
func (m *CreateResponse) XXX_Unmarshal(b []byte) error { func (m *CreateResponse) XXX_Unmarshal(b []byte) error {
@ -302,7 +302,7 @@ func (m *ReadOptions) Reset() { *m = ReadOptions{} }
func (m *ReadOptions) String() string { return proto.CompactTextString(m) } func (m *ReadOptions) String() string { return proto.CompactTextString(m) }
func (*ReadOptions) ProtoMessage() {} func (*ReadOptions) ProtoMessage() {}
func (*ReadOptions) Descriptor() ([]byte, []int) { func (*ReadOptions) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{5} return fileDescriptor_2434d8152598889b, []int{5}
} }
func (m *ReadOptions) XXX_Unmarshal(b []byte) error { func (m *ReadOptions) XXX_Unmarshal(b []byte) error {
@ -355,7 +355,7 @@ func (m *ReadRequest) Reset() { *m = ReadRequest{} }
func (m *ReadRequest) String() string { return proto.CompactTextString(m) } func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
func (*ReadRequest) ProtoMessage() {} func (*ReadRequest) ProtoMessage() {}
func (*ReadRequest) Descriptor() ([]byte, []int) { func (*ReadRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{6} return fileDescriptor_2434d8152598889b, []int{6}
} }
func (m *ReadRequest) XXX_Unmarshal(b []byte) error { func (m *ReadRequest) XXX_Unmarshal(b []byte) error {
@ -394,7 +394,7 @@ func (m *ReadResponse) Reset() { *m = ReadResponse{} }
func (m *ReadResponse) String() string { return proto.CompactTextString(m) } func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
func (*ReadResponse) ProtoMessage() {} func (*ReadResponse) ProtoMessage() {}
func (*ReadResponse) Descriptor() ([]byte, []int) { func (*ReadResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{7} return fileDescriptor_2434d8152598889b, []int{7}
} }
func (m *ReadResponse) XXX_Unmarshal(b []byte) error { func (m *ReadResponse) XXX_Unmarshal(b []byte) error {
@ -433,7 +433,7 @@ func (m *DeleteRequest) Reset() { *m = DeleteRequest{} }
func (m *DeleteRequest) String() string { return proto.CompactTextString(m) } func (m *DeleteRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteRequest) ProtoMessage() {} func (*DeleteRequest) ProtoMessage() {}
func (*DeleteRequest) Descriptor() ([]byte, []int) { func (*DeleteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{8} return fileDescriptor_2434d8152598889b, []int{8}
} }
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error { func (m *DeleteRequest) XXX_Unmarshal(b []byte) error {
@ -471,7 +471,7 @@ func (m *DeleteResponse) Reset() { *m = DeleteResponse{} }
func (m *DeleteResponse) String() string { return proto.CompactTextString(m) } func (m *DeleteResponse) String() string { return proto.CompactTextString(m) }
func (*DeleteResponse) ProtoMessage() {} func (*DeleteResponse) ProtoMessage() {}
func (*DeleteResponse) Descriptor() ([]byte, []int) { func (*DeleteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{9} return fileDescriptor_2434d8152598889b, []int{9}
} }
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error { func (m *DeleteResponse) XXX_Unmarshal(b []byte) error {
@ -503,7 +503,7 @@ func (m *UpdateRequest) Reset() { *m = UpdateRequest{} }
func (m *UpdateRequest) String() string { return proto.CompactTextString(m) } func (m *UpdateRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateRequest) ProtoMessage() {} func (*UpdateRequest) ProtoMessage() {}
func (*UpdateRequest) Descriptor() ([]byte, []int) { func (*UpdateRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{10} return fileDescriptor_2434d8152598889b, []int{10}
} }
func (m *UpdateRequest) XXX_Unmarshal(b []byte) error { func (m *UpdateRequest) XXX_Unmarshal(b []byte) error {
@ -541,7 +541,7 @@ func (m *UpdateResponse) Reset() { *m = UpdateResponse{} }
func (m *UpdateResponse) String() string { return proto.CompactTextString(m) } func (m *UpdateResponse) String() string { return proto.CompactTextString(m) }
func (*UpdateResponse) ProtoMessage() {} func (*UpdateResponse) ProtoMessage() {}
func (*UpdateResponse) Descriptor() ([]byte, []int) { func (*UpdateResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{11} return fileDescriptor_2434d8152598889b, []int{11}
} }
func (m *UpdateResponse) XXX_Unmarshal(b []byte) error { func (m *UpdateResponse) XXX_Unmarshal(b []byte) error {
@ -572,7 +572,7 @@ func (m *ListRequest) Reset() { *m = ListRequest{} }
func (m *ListRequest) String() string { return proto.CompactTextString(m) } func (m *ListRequest) String() string { return proto.CompactTextString(m) }
func (*ListRequest) ProtoMessage() {} func (*ListRequest) ProtoMessage() {}
func (*ListRequest) Descriptor() ([]byte, []int) { func (*ListRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{12} return fileDescriptor_2434d8152598889b, []int{12}
} }
func (m *ListRequest) XXX_Unmarshal(b []byte) error { func (m *ListRequest) XXX_Unmarshal(b []byte) error {
@ -604,7 +604,7 @@ func (m *ListResponse) Reset() { *m = ListResponse{} }
func (m *ListResponse) String() string { return proto.CompactTextString(m) } func (m *ListResponse) String() string { return proto.CompactTextString(m) }
func (*ListResponse) ProtoMessage() {} func (*ListResponse) ProtoMessage() {}
func (*ListResponse) Descriptor() ([]byte, []int) { func (*ListResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4bc91a8efec81434, []int{13} return fileDescriptor_2434d8152598889b, []int{13}
} }
func (m *ListResponse) XXX_Unmarshal(b []byte) error { func (m *ListResponse) XXX_Unmarshal(b []byte) error {
@ -651,42 +651,42 @@ func init() {
} }
func init() { func init() {
proto.RegisterFile("micro/go-micro/runtime/service/proto/runtime.proto", fileDescriptor_4bc91a8efec81434) proto.RegisterFile("runtime/service/proto/runtime.proto", fileDescriptor_2434d8152598889b)
} }
var fileDescriptor_4bc91a8efec81434 = []byte{ var fileDescriptor_2434d8152598889b = []byte{
// 526 bytes of a gzipped FileDescriptorProto // 521 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4b, 0x6b, 0xdb, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4b, 0x6f, 0xd3, 0x40,
0x10, 0x8e, 0x2d, 0xc7, 0x4e, 0x46, 0x55, 0x31, 0x4b, 0x29, 0x6a, 0xe8, 0xc3, 0xe8, 0xd2, 0x5c, 0x10, 0xae, 0xeb, 0x34, 0x69, 0xc7, 0x18, 0x45, 0x2b, 0x84, 0x4c, 0xc5, 0x23, 0x32, 0x07, 0x7a,
0x2a, 0x83, 0x42, 0xe9, 0xeb, 0x18, 0xbb, 0xbd, 0xd4, 0x14, 0x14, 0xf2, 0x03, 0xb6, 0xf6, 0x10, 0x72, 0xa4, 0x54, 0x88, 0xd7, 0xb1, 0x09, 0x5c, 0x88, 0x90, 0x5c, 0xf5, 0x07, 0x2c, 0xc9, 0x08,
0x44, 0x23, 0xad, 0xaa, 0x5d, 0x09, 0x7c, 0xea, 0xb5, 0x7f, 0xaf, 0xff, 0xa8, 0xec, 0x4b, 0x0f, 0x59, 0xd4, 0xbb, 0xc6, 0xbb, 0xb6, 0x94, 0x13, 0x57, 0xfe, 0x1e, 0xff, 0x08, 0xed, 0x2b, 0xb6,
0x47, 0xca, 0xc5, 0xb7, 0x99, 0xd9, 0xd9, 0x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5f, 0x02, 0x19, 0x7c, 0x3d, 0xe6, 0xeb, 0x17, 0x59, 0xc3, 0xd8, 0xbc, 0x04, 0x32, 0xf8, 0x7a, 0xec, 0xd7, 0x2f, 0x67, 0xc3, 0x03, 0x96, 0xee,
0x8b, 0xe1, 0x05, 0x43, 0xf7, 0x84, 0x7c, 0x83, 0x89, 0xcc, 0x89, 0x0c, 0xe4, 0x6a, 0xa1, 0x5e, 0x09, 0xf9, 0x02, 0x23, 0x95, 0x13, 0x19, 0xc8, 0xd5, 0x41, 0xbd, 0x1c, 0xba, 0xde, 0x03, 0xad,
0x0f, 0x1d, 0xd7, 0x40, 0x1b, 0x98, 0x6a, 0x8f, 0xfb, 0x78, 0x75, 0x32, 0xec, 0xe3, 0x75, 0x10, 0x61, 0x6c, 0x3c, 0xee, 0xe3, 0xd5, 0xc9, 0xb0, 0x8f, 0xd7, 0x41, 0x3c, 0x1a, 0xce, 0x58, 0xdb,
0x8f, 0x82, 0xd3, 0xd6, 0xf6, 0xc1, 0x75, 0xa2, 0xeb, 0x83, 0x3b, 0x48, 0x45, 0xc9, 0x94, 0x41, 0x07, 0xd7, 0x89, 0xae, 0x0f, 0xee, 0x20, 0x15, 0x2d, 0x53, 0x05, 0xd1, 0x27, 0xb3, 0x95, 0x57,
0xf4, 0xc9, 0x6c, 0xe5, 0xd5, 0x27, 0xb3, 0x9d, 0x5f, 0x70, 0xf2, 0x73, 0xaa, 0x7e, 0xdd, 0x57, 0x9f, 0xcc, 0x76, 0x7e, 0xf1, 0xc9, 0xf7, 0xb1, 0xfe, 0x75, 0x5f, 0xff, 0x0b, 0x00, 0x00, 0xff,
0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x8e, 0xbb, 0xe1, 0xf0, 0x05, 0x00, 0x00, 0xff, 0x43, 0x9c, 0x97, 0x62, 0xe1, 0x05, 0x00, 0x00,
} }

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-micro. DO NOT EDIT. // Code generated by protoc-gen-micro. DO NOT EDIT.
// source: micro/go-micro/runtime/service/proto/runtime.proto // source: runtime/service/proto/runtime.proto
package go_micro_runtime package go_micro_runtime
@ -47,12 +47,6 @@ type runtimeService struct {
} }
func NewRuntimeService(name string, c client.Client) RuntimeService { func NewRuntimeService(name string, c client.Client) RuntimeService {
if c == nil {
c = client.NewClient()
}
if len(name) == 0 {
name = "go.micro.runtime"
}
return &runtimeService{ return &runtimeService{
c: c, c: c,
name: name, name: name,

View File

@ -17,8 +17,8 @@ message Service {
string version = 2; string version = 2;
// git url of the source // git url of the source
string source = 3; string source = 3;
// service metadata // service metadata
map<string,string> metadata = 4; map<string,string> metadata = 4;
} }
message Event { message Event {