Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
Signed-off-by: Haytham Abuelfutuh <[email protected]>
  • Loading branch information
EngHabu committed Jan 9, 2024
1 parent 181cb0a commit 35419b6
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion flyteplugins/go/tasks/pluginmachinery/k8s/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func NewKubeClient(config *rest.Config, options Options) (core.KubeClient, error
if options.ClientOptions == nil {
options.ClientOptions = &client.Options{
HTTPClient: httpClient,
Mapper: mapper,
Mapper: mapper,
}
}

Expand Down
19 changes: 12 additions & 7 deletions flyteplugins/go/tasks/plugins/webapi/agent/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ func (m *MockSyncTask) CreateTask(_ context.Context, createTaskRequest *admin.Cr
Res: &admin.CreateTaskResponse_Resource{
Resource: &admin.Resource{
State: admin.State_SUCCEEDED,
Outputs: &flyteIdlCore.LiteralMap{
Literals: map[string]*flyteIdlCore.Literal{},
Outputs: &flyteIdlCore.OutputData{
Outputs: &flyteIdlCore.LiteralMap{
Literals: map[string]*flyteIdlCore.Literal{},
},
},
Message: "Sync task finished",
LogLinks: []*flyteIdlCore.TaskLog{{Uri: "http://localhost:3000/log", Name: "Log Link"}},
Expand All @@ -89,11 +91,14 @@ func (m *MockSyncTask) CreateTask(_ context.Context, createTaskRequest *admin.Cr

func (m *MockSyncTask) GetTask(_ context.Context, req *admin.GetTaskRequest, _ ...grpc.CallOption) (*admin.GetTaskResponse, error) {
if req.GetTaskType() == "fake_task" {
return &admin.GetTaskResponse{Resource: &admin.Resource{State: admin.State_SUCCEEDED, Outputs: &flyteIdlCore.LiteralMap{
Literals: map[string]*flyteIdlCore.Literal{
"arr": coreutils.MustMakeLiteral([]interface{}{[]interface{}{"a", "b"}, []interface{}{1, 2}}),
},
}}}, nil
return &admin.GetTaskResponse{Resource: &admin.Resource{State: admin.State_SUCCEEDED,
Outputs: &flyteIdlCore.OutputData{
Outputs: &flyteIdlCore.LiteralMap{
Literals: map[string]*flyteIdlCore.Literal{
"arr": coreutils.MustMakeLiteral([]interface{}{[]interface{}{"a", "b"}, []interface{}{1, 2}}),
},
},
}}}, nil
}
return &admin.GetTaskResponse{Resource: &admin.Resource{State: admin.State_SUCCEEDED}}, nil
}
Expand Down
8 changes: 6 additions & 2 deletions flytepropeller/pkg/controller/nodes/array/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,9 @@ func TestHandleArrayNodePhaseExecutingSubNodeFailures(t *testing.T) {
arrayNodeState := &handler.ArrayNodeState{
Phase: v1alpha1.ArrayNodePhaseNone,
}
nCtx := createNodeExecutionContext(dataStore, eventRecorder, nil, literalMap, &arrayNodeSpec, arrayNodeState)
nCtx := createNodeExecutionContext(dataStore, eventRecorder, nil, &idlcore.InputData{
Inputs: literalMap,
}, &arrayNodeSpec, arrayNodeState)

// initialize ArrayNodeHandler
nodeHandler := &mocks.NodeHandler{}
Expand Down Expand Up @@ -776,7 +778,9 @@ func TestHandleArrayNodePhaseExecutingSubNodeFailures(t *testing.T) {
// evaluate node until failure
attempts := 1
for {
nCtx := createNodeExecutionContext(dataStore, eventRecorder, nil, literalMap, &arrayNodeSpec, arrayNodeState)
nCtx := createNodeExecutionContext(dataStore, eventRecorder, nil, &idlcore.InputData{
Inputs: literalMap,
}, &arrayNodeSpec, arrayNodeState)
_, err = arrayNodeHandler.Handle(ctx, nCtx)
assert.NoError(t, err)

Expand Down

0 comments on commit 35419b6

Please sign in to comment.