Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: health status implementation #1406

Merged
merged 13 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ require (
go.uber.org/multierr v1.7.0
go.uber.org/zap v1.24.0
golang.org/x/crypto v0.17.0
golang.org/x/net v0.17.0
golang.org/x/oauth2 v0.7.0
golang.org/x/sync v0.3.0
google.golang.org/genproto/googleapis/api v0.0.0-20230525234035-dd9d682886f9
Expand Down Expand Up @@ -190,7 +191,6 @@ require (
go.mongodb.org/mongo-driver v1.7.3 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/term v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
Expand Down
173 changes: 116 additions & 57 deletions pkg/apis/proto/daemon/daemon.pb.go

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

1 change: 1 addition & 0 deletions pkg/apis/proto/daemon/daemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ message VertexMetrics {
message PipelineStatus {
required string status = 1;
required string message = 2;
required string code = 3;
}

message ListBuffersRequest {
Expand Down
17 changes: 13 additions & 4 deletions pkg/daemon/server/daemon_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,16 @@ import (
)

type daemonServer struct {
pipeline *v1alpha1.Pipeline
isbSvcType v1alpha1.ISBSvcType
pipeline *v1alpha1.Pipeline
isbSvcType v1alpha1.ISBSvcType
metaDataQuery *service.PipelineMetadataQuery
}

func NewDaemonServer(pl *v1alpha1.Pipeline, isbSvcType v1alpha1.ISBSvcType) *daemonServer {
return &daemonServer{
pipeline: pl,
isbSvcType: isbSvcType,
pipeline: pl,
isbSvcType: isbSvcType,
metaDataQuery: nil,
}
}

Expand Down Expand Up @@ -138,11 +140,17 @@ func (ds *daemonServer) Run(ctx context.Context) error {
go func() { _ = httpServer.Serve(httpL) }()
go func() { _ = tcpm.Serve() }()

// Start the Data flow health status updater
go func() {
ds.metaDataQuery.StartHealthCheck(ctx)
}()

log.Infof("Daemon server started successfully on %s", address)
// Start the rater
if err := rater.Start(ctx); err != nil {
return fmt.Errorf("failed to start the rater: %w", err)
}

<-ctx.Done()
return nil
}
Expand All @@ -169,6 +177,7 @@ func (ds *daemonServer) newGRPCServer(
return nil, err
}
daemon.RegisterDaemonServiceServer(grpcServer, pipelineMetadataQuery)
ds.metaDataQuery = pipelineMetadataQuery
return grpcServer, nil
}

Expand Down
Loading
Loading