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

fix(server): Fixing nil Trace #3197

Merged
merged 1 commit into from
Oct 2, 2023
Merged

fix(server): Fixing nil Trace #3197

merged 1 commit into from
Oct 2, 2023

Conversation

xoscar
Copy link
Collaborator

@xoscar xoscar commented Sep 29, 2023

This PR adds a check to validate if a trace is nil before starting to manipulate it as part of the evaluation process

Changes

  • Adds trace nil validation check

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

if job.Run.Trace == nil {
newTrace := traces.NewTrace(job.Run.TraceID.String(), []traces.Span{})
job.Run.Trace = &newTrace
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a problem caused by this change:
https://github.com/kubeshop/tracetest/pull/3170/files#diff-8477c1b1ce0272a42d729b310d1dacfd4452b274c8de5e0737d701593965b150R84

Which make every incoming trace without spans to be marked as nil, but for no tracing mode, this is expected

@xoscar xoscar self-assigned this Sep 29, 2023
@xoscar xoscar marked this pull request as ready for review September 29, 2023 20:26
@xoscar xoscar merged commit 7115ccb into main Oct 2, 2023
38 checks passed
@xoscar xoscar deleted the fix/no-tracing-mode branch October 2, 2023 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants