You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "comphead (via GitHub)" <gi...@apache.org> on 2023/08/28 15:54:47 UTC
[GitHub] [arrow-datafusion] comphead opened a new pull request, #7434: Adding back trace
comphead opened a new pull request, #7434:
URL: https://github.com/apache/arrow-datafusion/pull/7434
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
-->
Part of #7360 .
## Rationale for this change
Currently the user getting only error description which sometimes makes investigation more complex, adding optional back trace
<!--
Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
-->
## What changes are included in this PR?
Adding the back trace for the errors being thrown.
By default the back is disabled, to enable it uses Rust mechanism described https://doc.rust-lang.org/std/backtrace/index.html#environment-variables
<!--
There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
-->
## Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
-->
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be updated before approving the PR.
-->
<!--
If there are any breaking changes to public APIs, please add the `api change` label.
-->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] comphead commented on pull request #7434: Adding back trace
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #7434:
URL: https://github.com/apache/arrow-datafusion/pull/7434#issuecomment-1696110338
@alamb do you know the reason why some test tasks running with `RUST_BACKTRACE: 1` but others not?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #7434: Adding back trace
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #7434:
URL: https://github.com/apache/arrow-datafusion/pull/7434#discussion_r1317576059
##########
datafusion/common/src/error.rs:
##########
@@ -444,7 +467,7 @@ macro_rules! make_error {
#[macro_export]
macro_rules! $NAME {
($d($d args:expr),*) => {
- Err(DataFusionError::$ERR(format!($d($d args),*).into()))
+ Err(DataFusionError::$ERR(format!("{}{}", format!($d($d args),*), DataFusionError::get_back_trace()).into()))
Review Comment:
this is pretty clever, to use the macro like this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on pull request #7434: Adding back trace
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7434:
URL: https://github.com/apache/arrow-datafusion/pull/7434#issuecomment-1697291518
> @alamb do you know the reason why some test tasks running with RUST_BACKTRACE: 1 but others not?
If you mean this:
https://github.com/search?q=repo%3Aapache%2Farrow-datafusion%20RUST_BACKTRACE&type=code
I don't know of any reasons for the discrepancy
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb commented on pull request #7434: Adding back trace
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #7434:
URL: https://github.com/apache/arrow-datafusion/pull/7434#issuecomment-1707036799
I have been away on vacation but am back now and will catch up with reviews over the next few days. This one looks great @comphead -- thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] comphead commented on pull request #7434: Adding back trace
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #7434:
URL: https://github.com/apache/arrow-datafusion/pull/7434#issuecomment-1699460488
Adding `.strip_backtrace()` to get only error message if the `RUST_BACKTRACE` enabled
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] comphead commented on pull request #7434: Adding back trace
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #7434:
URL: https://github.com/apache/arrow-datafusion/pull/7434#issuecomment-1697690574
Changing some tests checking exact error message to `.starts_with` as some test tasks get run with `BACKTRACE=1` so this trigger backtrace and the entire error message won't be stable if the code changes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] comphead commented on pull request #7434: Adding back trace
Posted by "comphead (via GitHub)" <gi...@apache.org>.
comphead commented on PR #7434:
URL: https://github.com/apache/arrow-datafusion/pull/7434#issuecomment-1699813152
I will add documentation and examples in follow up PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb merged pull request #7434: Add backtrace to error messages
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #7434:
URL: https://github.com/apache/arrow-datafusion/pull/7434
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org