-
Notifications
You must be signed in to change notification settings - Fork 14k
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
[cli] Preparing to deprecate wrapping of external commands #4451
[cli] Preparing to deprecate wrapping of external commands #4451
Conversation
This looks like painful for newcomers coming from outside the python world who have no clue on how to deploy a wsgi app though. The fact that superset looked like an http service while it's just a flask application it's handy to me, also quite "cloud native" :) Would it be possible to keep the dependencies and just remove the wrappers? Anyway if we remove the wrapper we have to provide the equivalent of superset runserver in the docs if we don't want to get swamped with github issues please. |
Having some docker / docker-compose predefined setup(s) could help compensate in a better-than-its-now kind of way. Personally cannot commit time to this but I think that'd be the modern alternative for good and easy setup. |
fddf5b9
to
59179fb
Compare
Codecov Report
@@ Coverage Diff @@
## master #4451 +/- ##
==========================================
- Coverage 71.88% 71.85% -0.04%
==========================================
Files 204 204
Lines 15329 15317 -12
Branches 1177 1177
==========================================
- Hits 11020 11006 -14
- Misses 4306 4308 +2
Partials 3 3
Continue to review full report at Codecov.
|
docs/installation.rst
Outdated
@@ -521,6 +513,10 @@ have the same configuration. | |||
|
|||
CELERY_CONFIG = CeleryConfig | |||
|
|||
To start a Celery worker to leverage the configuration run: :: | |||
|
|||
celery worker --app=superset.sql_lab:celery_app -Ofair |
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.
For celery the gevent flag is -P gevent
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.
Thanks. I added --pool=gevent
. I've used the long names as they're more descriptive.
so you'll want to craft your own `gunicorn` command in your production | ||
environment. Here's an **async** setup known to work well: :: | ||
application in a way that works well in your environment. Here's an **async** | ||
setup known to work well in production: :: | ||
|
||
gunicorn \ |
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.
We are running gunicorn with gevent which make superset more efficient handling requests -k gevent
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.
@fabianmenges the -k gevent
argument is specified.
07d51a6
to
5d7d526
Compare
@fabianmenges are you ok with the changes I made per your request? |
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 do somewhat agree with @xrmx that it may be painful for newcomers, at least for the gunicorn
wrapper. I still (and will probably still) use the superset cli wrapper as a shortcut for quickly spinning up an app locally.
docs/installation.rst
Outdated
superset runserver | ||
|
||
# To start a development web server, use the -d switch | ||
# To start a development web server on port 8088, use -p to bind to anothe port |
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: typo
SUPERSET_WORKERS = 2 | ||
SUPERSET_CELERY_WORKERS = 32 | ||
SUPERSET_WORKERS = 2 # deprecated | ||
SUPERSET_CELERY_WORKERS = 32 # deprecated | ||
|
||
SUPERSET_WEBSERVER_ADDRESS = '0.0.0.0' | ||
SUPERSET_WEBSERVER_PORT = 8088 |
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.
minor: would these configs (and the rest of the config vars that are only used in cli.py
also be tagged as # deprecated
?
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.
@jeffreythewang I added SUPERSET_WEBSERVER_TIMEOUT
. Am I missing other config variables from the commands which are slated to be deprecated?
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.
Sorry for the late response. I primarily meant it as adding a # deprecated
and [DEPRECATED]
comment, both in cli.py
and the sample config.py
, to the environment variables that are deprecated. I might be wrong, but I only see SUPERSET_WEBSERVER_PORT
, SUPERSET_WEBSERVER_ADDRESS
, and FLASK_USE_RELOAD
used in cli.py
.
2052f3e
to
5179d10
Compare
46e8c31
to
1b31e9b
Compare
(cherry picked from commit b3442a7)
This PR indicates to users that the Superset CLI commands which wrap external commands such as
gunicorn
,celery
, andflower
are deprecated prior to removing the functionality at a later stage.The reason for the change is:
to: @fabianmenges @mistercrunch