From bfdc72fc477eb296924ccd14e3e77b7cf49d7767 Mon Sep 17 00:00:00 2001 From: Vladislav Sukhin Date: Tue, 3 Dec 2024 13:54:21 +0300 Subject: [PATCH] fix: lint Signed-off-by: Vladislav Sukhin --- pkg/agent/agent.go | 13 ++++++++----- pkg/agent/agent_test.go | 6 ++++++ pkg/agent/events_test.go | 6 ++++++ pkg/agent/logs_test.go | 5 +++++ 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/pkg/agent/agent.go b/pkg/agent/agent.go index 45b8a40e56..59de74f63c 100644 --- a/pkg/agent/agent.go +++ b/pkg/agent/agent.go @@ -111,11 +111,14 @@ func NewAgent(logger *zap.SugaredLogger, testWorkflowNotificationsRequestBuffer: make(chan *cloud.TestWorkflowNotificationsRequest, bufferSizePerWorker*proContext.WorkflowNotificationsWorkerCount), testWorkflowNotificationsResponseBuffer: make(chan *cloud.TestWorkflowNotificationsResponse, bufferSizePerWorker*proContext.WorkflowNotificationsWorkerCount), testWorkflowNotificationsFunc: workflowNotificationsFunc, - testWorkflowServiceNotificationsWorkerCount: proContext.WorkflowServiceNotificationsWorkerCount, - testWorkflowServiceNotificationsRequestBuffer: make(chan *cloud.TestWorkflowServiceNotificationsRequest, bufferSizePerWorker*proContext.WorkflowServiceNotificationsWorkerCount), - testWorkflowServiceNotificationsResponseBuffer: make(chan *cloud.TestWorkflowServiceNotificationsResponse, bufferSizePerWorker*proContext.WorkflowServiceNotificationsWorkerCount), - testWorkflowServiceNotificationsFunc: workflowServiceNotificationsFunc, - + testWorkflowServiceNotificationsWorkerCount: proContext.WorkflowServiceNotificationsWorkerCount, + testWorkflowServiceNotificationsRequestBuffer: make(chan *cloud.TestWorkflowServiceNotificationsRequest, bufferSizePerWorker*proContext.WorkflowServiceNotificationsWorkerCount), + testWorkflowServiceNotificationsResponseBuffer: make(chan *cloud.TestWorkflowServiceNotificationsResponse, bufferSizePerWorker*proContext.WorkflowServiceNotificationsWorkerCount), + testWorkflowServiceNotificationsFunc: workflowServiceNotificationsFunc, + testWorkflowParallelStepNotificationsWorkerCount: proContext.WorkflowParallelStepNotificationsWorkerCount, + testWorkflowParallelStepNotificationsRequestBuffer: make(chan *cloud.TestWorkflowParallelStepNotificationsRequest, bufferSizePerWorker*proContext.WorkflowParallelStepNotificationsWorkerCount), + testWorkflowParallelStepNotificationsResponseBuffer: make(chan *cloud.TestWorkflowParallelStepNotificationsResponse, bufferSizePerWorker*proContext.WorkflowParallelStepNotificationsWorkerCount), + testWorkflowParallelStepNotificationsFunc: workflowParallelStepNotificationsFunc, clusterID: clusterID, clusterName: clusterName, features: features, diff --git a/pkg/agent/agent_test.go b/pkg/agent/agent_test.go index 4b4936dd6c..8cc2301fa0 100644 --- a/pkg/agent/agent_test.go +++ b/pkg/agent/agent_test.go @@ -106,6 +106,12 @@ func (cs *CloudServer) GetTestWorkflowServiceNotificationsStream(srv cloud.TestK return nil } +func (cs *CloudServer) GetTestWorkflowParallelStepNotificationsStream(srv cloud.TestKubeCloudAPI_GetTestWorkflowParallelStepNotificationsStreamServer) error { + <-cs.ctx.Done() + + return nil +} + func (cs *CloudServer) ExecuteAsync(srv cloud.TestKubeCloudAPI_ExecuteAsyncServer) error { md, ok := metadata.FromIncomingContext(srv.Context()) if !ok { diff --git a/pkg/agent/events_test.go b/pkg/agent/events_test.go index 201b456015..ff08dbd462 100644 --- a/pkg/agent/events_test.go +++ b/pkg/agent/events_test.go @@ -119,6 +119,12 @@ func (cws *CloudEventServer) GetTestWorkflowServiceNotificationsStream(srv cloud return nil } +func (cws *CloudEventServer) GetTestWorkflowParallelStepNotificationsStream(srv cloud.TestKubeCloudAPI_GetTestWorkflowParallelStepNotificationsStreamServer) error { + <-cws.ctx.Done() + + return nil +} + func (cws *CloudEventServer) Send(srv cloud.TestKubeCloudAPI_SendServer) error { md, ok := metadata.FromIncomingContext(srv.Context()) if !ok { diff --git a/pkg/agent/logs_test.go b/pkg/agent/logs_test.go index 1c4ea04639..7f27bccbbf 100644 --- a/pkg/agent/logs_test.go +++ b/pkg/agent/logs_test.go @@ -110,6 +110,11 @@ func (cs *CloudLogsServer) GetTestWorkflowServiceNotificationsStream(srv cloud.T return nil } +func (cs *CloudLogsServer) GetTestWorkflowParallelStepNotificationsStream(srv cloud.TestKubeCloudAPI_GetTestWorkflowParallelStepNotificationsStreamServer) error { + <-cs.ctx.Done() + return nil +} + func (cs *CloudLogsServer) GetLogsStream(srv cloud.TestKubeCloudAPI_GetLogsStreamServer) error { md, ok := metadata.FromIncomingContext(srv.Context()) if !ok {