Skip to content

Commit

Permalink
Don't truncate error messages when listing task executions (flyteorg#536
Browse files Browse the repository at this point in the history
)
  • Loading branch information
katrogan authored Mar 9, 2023
1 parent 993661d commit 9733f38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion flyteadmin/pkg/manager/impl/task_execution_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ func (m *TaskExecutionManager) ListTaskExecutions(
return nil, err
}

taskExecutionList, err := transformers.FromTaskExecutionModels(output.TaskExecutions, transformers.ListExecutionTransformerOptions)
// Use default transformer options so that error messages shown for task execution attempts in the console sidebar show the full error stack trace.
taskExecutionList, err := transformers.FromTaskExecutionModels(output.TaskExecutions, transformers.DefaultExecutionTransformerOptions)
if err != nil {
logger.Debugf(ctx, "failed to transform task execution models for request [%+v] with err: %v", request, err)
return nil, err
Expand Down
7 changes: 5 additions & 2 deletions flyteadmin/pkg/manager/impl/task_execution_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,11 @@ func TestListTaskExecutions(t *testing.T) {
repository := repositoryMocks.NewMockRepository()

expectedLogs := []*core.TaskLog{{Uri: "test-log1.txt"}}
expectedOutputResult := &admin.TaskExecutionClosure_OutputUri{
OutputUri: "test-output.pb",
extraLongErrMsg := string(make([]byte, 2*100))
expectedOutputResult := &admin.TaskExecutionClosure_Error{
Error: &core.ExecutionError{
Message: extraLongErrMsg,
},
}
expectedClosure := &admin.TaskExecutionClosure{
StartedAt: sampleTaskEventOccurredAt,
Expand Down

0 comments on commit 9733f38

Please sign in to comment.