-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix(cubesql): Propagate errors from SqlAuthService to the user #9665
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
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #9665 +/- ##
===========================================
+ Coverage 0 84.17% +84.17%
===========================================
Files 0 230 +230
Lines 0 85114 +85114
===========================================
+ Hits 0 71647 +71647
- Misses 0 13467 +13467
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4799615
to
894901e
Compare
skipPasswordCheck, | ||
}; | ||
} catch (e) { | ||
this.apiGateway.log({ |
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 just another problem related to how users write check_sql_auth
.
Default example from the documentation:
https://cube.dev/docs/product/configuration/reference/config#check_sql_auth
It will throw an exception for incorrect username/password, but the biggest problem is that we will start to spam it in our logs.
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 don't think it's a problem. In a common standard flow, there will be no exceptions thrown as every real good user would be authorized and logged in. While any auth denial is an outstanding event and might be a reason to look into it.
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.
cC @igorlukanin
When using cube.py it’s fundamental to see errors and even better the stack trace of errors generated from python code, currently the logs doesn’t show any errors generated from python check_sql_auth.
This PR propagates such errors to the log.
Imaging this cube.py config:
And let's try to connect to Cube via psql:
And here is what we now can see in logs:
Check List