Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Show additional info in errors
  • Loading branch information
jsoriano committed Jul 23, 2024
commit b91155614c243a3c91e5252d17f2d1727bab2c44
17 changes: 14 additions & 3 deletions internal/testrunner/runners/system/tester.go
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,12 @@ type scenarioTest struct {

type failureStoreDocument struct {
Error struct {
Type string `json:"type"`
Message string `json:"message"`
Type string `json:"type"`
Message string `json:"message"`
StackTrace string `json:"stack_trace"`
PipelineTrace []string `json:"pipeline_trace"`
Pipeline string `json:"pipeline"`
ProcessorType string `json:"processor_type"`
} `json:"error"`
}

Expand Down Expand Up @@ -1966,7 +1970,14 @@ func writeSampleEvent(path string, doc common.MapStr, specVersion semver.Version
func validateFailureStore(failureStore []failureStoreDocument) error {
var multiErr multierror.Error
for _, doc := range failureStore {
multiErr = append(multiErr, errors.New(doc.Error.Message))
// TODO: Move this to the trace log level when available.
logger.Debug("Error found in failure store: ", doc.Error.StackTrace)
multiErr = append(multiErr,
fmt.Errorf("%s: %s (processor: %s, pipelines: %s)",
doc.Error.Type,
doc.Error.Message,
doc.Error.ProcessorType,
strings.Join(doc.Error.PipelineTrace, ",")))
}

if len(multiErr) > 0 {
Expand Down