Skip to content
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(alerts, thumbnails): celery tasks using flask-sqlalchemy sessions #11950

Merged
merged 2 commits into from Dec 8, 2020

Conversation

dpgaspar
Copy link
Member

@dpgaspar dpgaspar commented Dec 7, 2020

SUMMARY

celery tasks should use a scoped session with nullpool that closes and removes the session at the end of the context. When using security manager find_user we are using the normal flask-sqlalchemy session

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

codecov-io commented Dec 7, 2020

Codecov Report

Merging #11950 (95e3e84) into master (a7bba92) will decrease coverage by 9.35%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11950      +/-   ##
==========================================
- Coverage   64.45%   55.10%   -9.36%     
==========================================
  Files         937      425     -512     
  Lines       45319    14871   -30448     
  Branches     4317     3825     -492     
==========================================
- Hits        29211     8194   -21017     
+ Misses      15948     6677    -9271     
+ Partials      160        0     -160     
Flag Coverage Δ
cypress 55.10% <ø> (+27.22%) ⬆️
javascript ?
python ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...uperset-frontend/src/dashboard/util/dnd-reorder.js 0.00% <0.00%> (-100.00%) ⬇️
...rset-frontend/src/dashboard/util/getEmptyLayout.js 0.00% <0.00%> (-100.00%) ⬇️
...dashboard/components/resizable/ResizableHandle.jsx 0.00% <0.00%> (-100.00%) ⬇️
.../src/dashboard/util/getFilterScopeFromNodesTree.js 0.00% <0.00%> (-93.48%) ⬇️
...src/dashboard/components/gridComponents/Header.jsx 10.52% <0.00%> (-86.85%) ⬇️
...rc/dashboard/components/gridComponents/Divider.jsx 13.33% <0.00%> (-86.67%) ⬇️
...ontend/src/dashboard/util/getDashboardFilterKey.ts 14.28% <0.00%> (-85.72%) ⬇️
...nd/src/views/CRUD/data/query/QueryPreviewModal.tsx 14.70% <0.00%> (-82.97%) ⬇️
...set-frontend/src/views/CRUD/welcome/EmptyState.tsx 5.71% <0.00%> (-82.10%) ⬇️
...et-frontend/src/SqlLab/components/TableElement.jsx 4.70% <0.00%> (-81.35%) ⬇️
... and 834 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a7bba92...f405996. Read the comment docs.

@dpgaspar dpgaspar marked this pull request as ready for review December 7, 2020 14:43
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LTGM. I wonder if we should introduce some structures that explicitly require scoped sessions and nullpools when called from celery.

@dpgaspar dpgaspar merged commit 7e6f04f into apache:master Dec 8, 2020
@dpgaspar dpgaspar deleted the fix/alerts-find-user branch December 8, 2020 13:03
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/M 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants