Commit 730d0d0
szachovy
Fix SQL_QUERY_MUTATOR=None in Celery worker and downgrade mysql-connector-python
Two fixes:
1. SQL_QUERY_MUTATOR=None: superset.sql_lab captures SQL_QUERY_MUTATOR at
module import time from current_app.config. In Celery's prefork model,
import_default_modules() runs in child processes before worker_process_init
(which provides the app context), so the capture can result in None.
Fix: add superset_celery_app.py wrapper that explicitly sets
sql_lab.SQL_QUERY_MUTATOR = flask_app.config["SQL_QUERY_MUTATOR"] after
create_app() completes but before any worker processes are forked.
2. Downgrade mysql-connector-python from 9.0.0 to 8.4.0: version 9.0.0
was removed from PyPI; 8.4.0 is the latest stable 8.x release and is
better aligned with SQLAlchemy 1.4 which Superset 4.0.2 targets.1 parent 1e662c3 commit 730d0d0
3 files changed
Lines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
0 commit comments