-
Notifications
You must be signed in to change notification settings - Fork 10
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
Propagate stack trace from Server:exec() #398
Merged
locker
merged 2 commits into
tarantool:master
from
locker:server-exec-stack-traceback-fix
Oct 25, 2024
Merged
Propagate stack trace from Server:exec() #398
locker
merged 2 commits into
tarantool:master
from
locker:server-exec-stack-traceback-fix
Oct 25, 2024
+189
−16
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locker
force-pushed
the
server-exec-stack-traceback-fix
branch
from
October 25, 2024 07:45
a045e17
to
f4d3ba4
Compare
Totktonada
reviewed
Oct 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Questions for the first commit.
locker
force-pushed
the
server-exec-stack-traceback-fix
branch
from
October 25, 2024 11:02
f4d3ba4
to
d507318
Compare
Totktonada
reviewed
Oct 25, 2024
* Strip uselss `...` and `eval` lines. * Scan the stack trace backwards so as to skip `[C]`, `...`, and `eval` lines that were called by luatest internal files, not vice versa. * Don't strip lines related to luatest test files (from luatest/test), even though they match the luatest internal file pattern, because we do want to see stack traces when we test luatest. Needed for tarantool#396
locker
force-pushed
the
server-exec-stack-traceback-fix
branch
2 times, most recently
from
October 25, 2024 13:25
c4d9c7a
to
ad991cc
Compare
Totktonada
reviewed
Oct 25, 2024
Totktonada
approved these changes
Oct 25, 2024
locker
force-pushed
the
server-exec-stack-traceback-fix
branch
from
October 25, 2024 18:25
ad991cc
to
701e551
Compare
If a function executed with `Server:exec()` fails, luatest prints the stack trace only up to the `Server:exec()` call. If the failure happens to be in a nested function, this makes it impossible to figure out what happened. Let's propagate the error stack trace from the server to the runner and make the runner concatenate it with its own stack trace. To achieve that, we wrap errors raised by the function executed by `Serer:exec()` to save the trace. Closes tarantool#396
locker
force-pushed
the
server-exec-stack-traceback-fix
branch
from
October 25, 2024 18:40
701e551
to
292bf80
Compare
Totktonada
approved these changes
Oct 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If a function executed with
Server:exec()
fails, luatest prints the stack trace only up to theServer:exec()
call. If the failure happens to be in a nested function, this makes it impossible to figure out what happened.Let's propagate the error stack trace from the server to the runner and make the runner concatenate it with its own stack trace. To achieve that, we wrap errors raised by the function executed by
Serer:exec()
to save the trace.Closes #396