-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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: use nullpool even for user lookup in the celery #10938
Conversation
42f0e4d
to
e828d5a
Compare
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.
Two minor non-blocking comments
func.lower(security_manager.user_model.username) | ||
== func.lower(config["EMAIL_REPORTS_USER"]) |
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.
Curious about this, what are the cases where it's needed?
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.
ah, this is from security manager implementation, wanted them to be aligned, email is case insensitive
superset/tasks/schedules.py
Outdated
func.lower(security_manager.user_model.username) | ||
== func.lower(config["EMAIL_REPORTS_USER"]) | ||
) | ||
.one_or_none() |
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.
nit: this is mostly personal preference, but I almost feel we should be able to assume that a reports user exists, and raise if it doesn't, i.e. call .one()
.
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.
good point, fixed
e828d5a
to
fa3f078
Compare
Codecov Report
@@ Coverage Diff @@
## master #10938 +/- ##
==========================================
- Coverage 65.87% 65.81% -0.07%
==========================================
Files 815 815
Lines 38333 38334 +1
Branches 3600 3600
==========================================
- Hits 25252 25228 -24
- Misses 12979 13002 +23
- Partials 102 104 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…l_access/dashboard_by_id_endpoints * upstream/master: (29 commits) fix(presto): default unknown types to string type (apache#10753) feat(row-level-security): add base filter type and filter grouping (apache#10946) docs: add gallery screenshot & link in README (apache#10988) docs: add a "Gallery" page (apache#10968) build: add PR lint action (apache#10990) adding filters back that caused issues (apache#10989) chore: selectors refactor in SQLLab test suite (Cypress) (apache#10944) ESLint: Remove ts-ignore comments (apache#10933) style: fix checkbox color (apache#10970) fix: changed disabled rules in datasets module (apache#10979) fix: update the time filter for 'Last Year' option in explore (apache#10829) fix: use nullpool even for user lookup in the celery (apache#10938) Allow empty observations in alerting (apache#10939) fix: re-enabling several globally disabled lint rules (apache#10957) fix: setting specific exceptions common/query_context.py (apache#10942) Pylint disabled rule `pointless-string-statement` is not raising warining anymore - removing (apache#10975) fix: pylint disabled rules in dashboard/api.py (apache#10976) fix: removed disabled lint rule `too-many-locals` in connectors/base/models.py (apache#10958) ESLint: Re-enable rule no-access-state-in-setstate (apache#10870) fix: simply is_adhoc_metric (apache#10964) ...
* Use nullpool even for user lookup in the celery * Address feedback Co-authored-by: bogdan kyryliuk <[email protected]>
SUMMARY
Follow up to the #10819
Security manager still relies on the default superset db pool instead of nullpool for celery.
TEST PLAN
[x] existing unit tests
[x] local & staging env
Error msg: