-
Notifications
You must be signed in to change notification settings - Fork 615
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
feat(error): report the error's source chain through psql #13264
Merged
+111
−46
Merged
Changes from 1 commit
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
589d525
as report
BugenZhao a474acb
gate on pretty error
BugenZhao 148b368
refine panic error message
BugenZhao 0a887c0
remove cleaned-up note
BugenZhao 8759113
always use pretty
BugenZhao 723aa2d
remove prompt in sqllogictest
BugenZhao e8f0365
cleanup imports
BugenZhao e0d4500
Merge remote-tracking branch 'origin/main' into bz/display-error-source
BugenZhao 39493a0
add ui test file
BugenZhao 3cd7a6f
add readme
BugenZhao d60b7e1
add readme and bump version in risedev
BugenZhao 2600f30
Merge remote-tracking branch 'origin/main' into bz/display-error-source
BugenZhao 11b2834
add ui test to ci script
BugenZhao bb0ce45
bump ci image for sqllogictest 0.18
BugenZhao 41c88a5
fix duplicated error message
BugenZhao File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gate on pretty error
Signed-off-by: Bugen Zhao <i@bugenzhao.com>
commit a474acbc5d9a1ff33cfb6b9d844e21c06a7bf756
There are no files selected for viewing
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
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.
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.
Why would we ever want the
Compact
behavior? I prefer not to offer too many choices unless there's a good reason.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.
Besides, can we add a test (maybe expect test) for an error message to demonstrate the error format?
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.
This could be a temporary workaround. 😕 SQL logic tests and planner tests are heavily relying on the error message, and I don't want to mess them into this PR.
Also, I'm not sure if the developers writing SQL logic tests are intended to match the full messages (instead of the interesting part only), like below. If so, then
Pretty
will be less friendly.risingwave/e2e_test/source/basic/ddl.slt
Line 21 in 761130c
risingwave/e2e_test/ddl/invalid_operation.slt
Line 267 in 761130c
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.
There's one in
thiserror-ext
. Do you want another one for RisingWave's real cases? Then I'll write an integration test connecting to thepgwire
server.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.
If DX is the only concern or trouble, I think we should try to fix it now or later. At least pretty should be the default behavior. (Otherwise what's the meaning of these work? lol)
I think it's ok to update tests in this PR, as the core changes are very small.
If you don't want to do it now, maybe we should introduce
RW_COMPACT_ERROR
, instead ofRW_PRETTY_ERROR
.Yes, that's preferred. So that we can prevent either
risingwave
orthiserror-ext
's unexpected changes.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.
Update error messages in
slt
and pretty is always enabled now.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.
I find the error message is not good enough... Maybe let's do this in future PRs. 🤡
caused by
:risingwave/src/frontend/src/binder/expr/mod.rs
Lines 71 to 76 in e0d4500
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.
It's OK if the error message is not good. Just have a
expect-test
to let us know what's the current status is enough. 🤣 And we can see more easily how it's improved in future PRs.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.
I find writing tests with madsim is the easiest way, but the udf example does not work there. 🤡
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.
🤡