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: remove unnecessary app context on celery #15422

Merged
merged 3 commits into from
Jun 29, 2021

Conversation

dpgaspar
Copy link
Member

SUMMARY

All celery tasks on superset already have an app context created. https://github.com/apache/superset/blob/master/superset/initialization/__init__.py#L102

Recreating this context will make the task run on a Flask context inside a Flask context.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Jun 28, 2021

Codecov Report

Merging #15422 (e5ddd52) into master (ddcf461) will increase coverage by 0.01%.
The diff coverage is 68.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15422      +/-   ##
==========================================
+ Coverage   76.99%   77.01%   +0.01%     
==========================================
  Files         975      975              
  Lines       50634    50642       +8     
  Branches     6222     6222              
==========================================
+ Hits        38988    39001      +13     
+ Misses      11435    11430       -5     
  Partials      211      211              
Flag Coverage Δ
mysql 81.73% <68.42%> (+0.02%) ⬆️
postgres 81.75% <68.42%> (+0.02%) ⬆️
python 81.84% <68.42%> (+0.02%) ⬆️
sqlite 81.37% <68.42%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
superset/tasks/thumbnails.py 45.16% <5.88%> (+2.73%) ⬆️
superset/tasks/async_queries.py 96.77% <95.00%> (-0.25%) ⬇️
superset/app.py 68.42% <0.00%> (-14.92%) ⬇️
superset/config.py 97.03% <0.00%> (+5.88%) ⬆️

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 ddcf461...e5ddd52. Read the comment docs.

@dpgaspar dpgaspar merged commit 727847d into apache:master Jun 29, 2021
@dpgaspar dpgaspar deleted the fix/celery-app-context branch June 29, 2021 11:16
dpgaspar added a commit to preset-io/superset that referenced this pull request Jul 5, 2021
* fix: remove unnecessary app context on celery

* fix lint

* fix lint
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* fix: remove unnecessary app context on celery

* fix lint

* fix lint
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* fix: remove unnecessary app context on celery

* fix lint

* fix lint
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* fix: remove unnecessary app context on celery

* fix lint

* fix lint
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.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 preset-io size/L 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants