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

Merge master into lyft-release-sp8 #7484

Merged
merged 48 commits into from
May 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
7192d36
filter out all nan series (#7313)
datability-io Apr 19, 2019
8fd7d4b
improve not rich tooltip (#7345)
datability-io Apr 22, 2019
845218d
Create issue_label_bot.yaml (#7341)
Apr 22, 2019
5f14b55
fix: do not save colors without a color scheme (#7347)
khtruong Apr 22, 2019
cf87173
[wtforms] Strip leading/trailing whitespace (#7084)
john-bodley Apr 23, 2019
621cef7
[schema] Updating the datasources schema (#5451)
john-bodley Apr 23, 2019
4bc69c0
limit tables/views returned if schema is not provided (#7358)
datability-io Apr 23, 2019
48b2af4
Add type anno (#7342)
craig-rueda Apr 23, 2019
1388452
[schema] Updating the base column schema (#5452)
john-bodley Apr 24, 2019
f58e7b2
Update 937d04c16b64_update_datasources.py (#7361)
john-bodley Apr 24, 2019
cb7c806
Feature flag for client cache (#7348)
betodealmeida Apr 24, 2019
fef5b5e
Fix raw HTML in SliceAdder (#7338)
mistercrunch Apr 24, 2019
7788124
remove backendSync.json (#7331)
kristw Apr 24, 2019
e61a8ee
[bubbles] issue when using duplicated metrics (#7087)
mistercrunch Apr 24, 2019
e8af852
SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04 (#7359)
andrewmusselman Apr 24, 2019
7bc8355
SUPERSET-8: Update text in docs copyright footer (#7360)
andrewmusselman Apr 24, 2019
3a359fd
[schema] Adding commits and removing unnecessary foreign-key definiti…
john-bodley Apr 24, 2019
f83b979
Store last selected dashboard in sessionStorage (#7181)
leakingoxide Apr 24, 2019
f488a32
[schema] Updating the base metric schema (#5453)
john-bodley Apr 25, 2019
929fb6b
Merge branch 'lyftga'
mistercrunch Apr 25, 2019
4fe152d
Fix NoneType bug & fill the test recipients with original recipients …
tssujt Apr 25, 2019
ca2996c
Added living goods as among the users of Superset (#7407)
chelule Apr 30, 2019
9e703f3
[dashboard] allow user re-order top-level tabs (#7390)
Apr 30, 2019
11408d0
[SQL Lab] Increase timeout threshold for offline check (#7411)
Apr 30, 2019
06c4610
Bump FAB to 2.0.0 (#7323)
dpgaspar Apr 30, 2019
f504568
[annotations] Improves UX on annotation validation, start_dttm, end_d…
dpgaspar Apr 30, 2019
8703244
Setting renderTrigger on label_colors (#7410)
michellethomas Apr 30, 2019
46579b1
Refactor out controlUtils.js module + unit tests (#7350)
mistercrunch Apr 30, 2019
a6aabf8
feature: see Presto row and array data types (#7413)
DiggidyDave May 1, 2019
70be44a
Removed --console-log and superset runserver (#7421)
rjurney May 2, 2019
f6ebd78
Fixes dashboard export button missing download and #7353 (#7427)
rjurney May 2, 2019
ee78fd7
Added additional German translations to string file (#6604)
KilimAnnejaro May 2, 2019
fb627ba
[fix] Fixing SQL parsing issue (#7374)
john-bodley May 2, 2019
598526a
add chinese translate (#7402)
cscainiao May 2, 2019
c8bb7e0
Quick fix to address deadlock issue (#7434)
craig-rueda May 2, 2019
88e6ec9
feat: view presto row objects in data grid (#7445)
khtruong May 3, 2019
5cf454b
feat: Scheduling queries from SQL Lab (#7416) (#7446)
DiggidyDave May 3, 2019
2497048
feat: Add `validate_sql_json` endpoint for checking that a given sql …
bearcage May 6, 2019
f3d8e8a
Adds missing metric sum__SP_RUR_TOTL (#7452)
rjurney May 7, 2019
e2be022
Late import for optional lib pyhive (#7471)
mistercrunch May 8, 2019
a3f0912
fix: calendar heatmap examples (#7375)
mistercrunch May 8, 2019
959c35d
bugfix: Improve support for special characters in schema and table na…
villebro May 8, 2019
6b8bda6
[dashboard] After update filter, trigger new queries when charts are …
May 8, 2019
ca48f32
fix: alter sql columns to long text #7463 (#7476)
khtruong May 8, 2019
ef13500
Refactor ConsoleLog (#7428)
betodealmeida May 8, 2019
f59ed02
Revised Chinese translation (#7464)
cscainiao May 8, 2019
51fd43a
druid connector: avoid using 'dimensions' for scan queries (#7377)
elukey May 9, 2019
26d82de
Merge apache/master into lyft-release-sp8
May 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,19 @@ FLASK_ENV=development flask run -p 8088 --with-threads --reload --debugger

#### Logging to the browser console

This feature is only available on Python 3. When debugging your application, you can have the server logs sent directly to the browser console:
This feature is only available on Python 3. When debugging your application, you can have the server logs sent directly to the browser console using the [ConsoleLog](https://github.com/betodealmeida/consolelog) package. You need to mutate the app, by adding the following to your `config.py` or `superset_config.py`:

```python
from console_log import ConsoleLog

def FLASK_APP_MUTATOR(app):
app.wsgi_app = ConsoleLog(app.wsgi_app, app.logger)
```

Then make sure you run your WSGI server using the right worker type:

```bash
FLASK_ENV=development flask run -p 8088 --with-threads --reload --debugger --console-log
FLASK_ENV=development gunicorn superset:app -k "geventwebsocket.gunicorn.workers.GeventWebSocketWorker" -b 127.0.0.1:8088 --reload
```

You can log anything to the browser console, including objects:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ the world know they are using Superset. Join our growing community!
1. [Konfío](http://konfio.mx)
1. [Kuaishou](https://www.kuaishou.com/)
1. [Lime](https://www.limebike.com/)
1. [Living Goods](https://www.livinggoods.org)
1. [Lyft](https://www.lyft.com/)
1. [Maieutical Labs](https://maieuticallabs.it)
1. [Myra Labs](http://www.myralabs.com/)
Expand Down
8 changes: 6 additions & 2 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ under the License.
This file documents any backwards-incompatible changes in Superset and
assists people when migrating to a new version.

## Superset 0.34.0
## Next Version

* [5451](https://github.com/apache/incubator-superset/pull/5451): a change
which adds missing non-nullable fields to the `datasources` table. Depending on
Expand All @@ -31,7 +31,11 @@ the integrity of the data, manual intervention may be required.
which adds missing non-nullable fields and uniqueness constraints to the
`columns`and `table_columns` tables. Depending on the integrity of the data,
manual intervention may be required.

* `fabmanager` command line is deprecated since Flask-AppBuilder 2.0.0, use
the new `flask fab <command>` integrated with *Flask cli*.
* `SUPERSET_UPDATE_PERMS` environment variable was replaced by
`FAB_UPDATE_PERMS` config boolean key. To disable automatic
creation of permissions set `FAB_UPDATE_PERMS = False` on config.
* [5453](https://github.com/apache/incubator-superset/pull/5453): a change
which adds missing non-nullable fields and uniqueness constraints to the metrics
and sql_metrics tables. Depending on the integrity of the data, manual
Expand Down
4 changes: 2 additions & 2 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ by setting the ``stagger_refresh`` to ``false`` and modify the stagger period by
Here, the entire dashboard will refresh at once if periodic refresh is on. The stagger time of
2.5 seconds is ignored.

Why does fabmanager or superset freezed/hung/not responding when started (my home directory is NFS mounted)?
------------------------------------------------------------------------------------------------------------
Why does 'flask fab' or superset freezed/hung/not responding when started (my home directory is NFS mounted)?
-------------------------------------------------------------------------------------------------------------
By default, superset creates and uses an sqlite database at ``~/.superset/superset.db``. Sqlite is known to `don't work well if used on NFS`__ due to broken file locking implementation on NFS.

__ https://www.sqlite.org/lockingv3.html
Expand Down
17 changes: 6 additions & 11 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,21 @@ Follow these few simple steps to install Superset.::
# Install superset
pip install superset

# Create an admin user (you will be prompted to set a username, first and last name before setting a password)
fabmanager create-admin --app superset

# Initialize the database
superset db upgrade

# Create an admin user (you will be prompted to set a username, first and last name before setting a password)
$ export FLASK_APP=superset
flask fab create-admin

# Load some data to play with
superset load_examples

# Create default roles and permissions
superset init

# To start a development web server on port 8088, use -p to bind to another port
superset runserver -d
flask run -p 8080 --with-threads --reload --debugger


After installation, you should be able to point your browser to the right
Expand Down Expand Up @@ -236,17 +237,11 @@ workers this creates a lot of contention and race conditions when defining
permissions and views.

To alleviate this issue, the automatic updating of permissions can be disabled
by setting the environment variable
`SUPERSET_UPDATE_PERMS` environment variable to `0`.
The value `1` enables it, `0` disables it. Note if undefined the functionality
is enabled to maintain backwards compatibility.
by setting `FAB_UPDATE_PERMS = False` (defaults to True).

In a production environment initialization could take on the following form:

export SUPERSET_UPDATE_PERMS=1
superset init

export SUPERSET_UPDATE_PERMS=0
gunicorn -w 10 ... superset:app

Configuration behind a load balancer
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
console_log==0.2.10
coverage==4.5.3
flake8-commas==2.0.0
flake8-import-order==0.18
Expand Down
17 changes: 13 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#
alembic==1.0.0 # via flask-migrate
amqp==2.3.2 # via kombu
apispec[yaml]==1.2.0 # via flask-appbuilder
asn1crypto==0.24.0 # via cryptography
attrs==19.1.0 # via jsonschema
babel==2.6.0 # via flask-babel
billiard==3.5.0.4 # via celery
bleach==3.0.2
Expand All @@ -21,10 +23,11 @@ croniter==0.3.29
cryptography==2.4.2
decorator==4.3.0 # via retry
defusedxml==0.5.0 # via python3-openid
flask-appbuilder==1.12.5
flask-appbuilder==2.0.0
flask-babel==0.11.1 # via flask-appbuilder
flask-caching==1.4.0
flask-compress==1.4.0
flask-jwt-extended==3.18.1 # via flask-appbuilder
flask-login==0.4.1 # via flask-appbuilder
flask-migrate==2.1.1
flask-openid==1.2.5 # via flask-appbuilder
Expand All @@ -38,19 +41,25 @@ idna==2.6
isodate==0.6.0
itsdangerous==0.24 # via flask
jinja2==2.10 # via flask, flask-babel
jsonschema==3.0.1 # via flask-appbuilder
kombu==4.2.1 # via celery
mako==1.0.7 # via alembic
markdown==3.0
markupsafe==1.0 # via jinja2, mako
marshmallow-enum==1.4.1 # via flask-appbuilder
marshmallow-sqlalchemy==0.16.2 # via flask-appbuilder
marshmallow==2.19.2 # via flask-appbuilder, marshmallow-enum, marshmallow-sqlalchemy
numpy==1.15.2 # via pandas
pandas==0.23.4
parsedatetime==2.0.0
pathlib2==2.3.0
polyline==1.3.2
prison==0.1.0 # via flask-appbuilder
py==1.7.0 # via retry
pycparser==2.19 # via cffi
pydruid==0.5.2
pyjwt==1.7.1 # via flask-appbuilder
pyjwt==1.7.1 # via flask-appbuilder, flask-jwt-extended
pyrsistent==0.14.11 # via jsonschema
python-dateutil==2.6.1
python-editor==1.0.3 # via alembic
python-geohash==0.8.5
Expand All @@ -61,14 +70,14 @@ requests==2.20.0
retry==0.9.2
selenium==3.141.0
simplejson==3.15.0
six==1.11.0 # via bleach, cryptography, isodate, pathlib2, polyline, pydruid, python-dateutil, sqlalchemy-utils, wtforms-json
six==1.11.0 # via bleach, cryptography, flask-jwt-extended, isodate, jsonschema, pathlib2, polyline, prison, pydruid, pyrsistent, python-dateutil, sqlalchemy-utils, wtforms-json
sqlalchemy-utils==0.32.21
sqlalchemy==1.3.1
sqlparse==0.2.4
unicodecsv==0.14.1
urllib3==1.22 # via requests, selenium
vine==1.1.4 # via amqp
webencodings==0.5.1 # via bleach
werkzeug==0.14.1 # via flask
werkzeug==0.14.1 # via flask, flask-jwt-extended
wtforms-json==0.3.3
wtforms==2.2.1 # via flask-wtf, wtforms-json
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_git_sha():
'croniter>=0.3.28',
'cryptography>=2.4.2',
'flask>=1.0.0, <2.0.0',
'flask-appbuilder>=1.12.5, <2.0.0',
'flask-appbuilder>=2.0.0, <2.3.0',
'flask-caching',
'flask-compress',
'flask-migrate',
Expand All @@ -92,7 +92,7 @@ def get_git_sha():
'parsedatetime',
'pathlib2',
'polyline',
'pydruid>=0.4.3',
'pydruid>=0.5.2',
'python-dateutil',
'python-geohash',
'pyyaml>=3.13',
Expand All @@ -108,7 +108,6 @@ def get_git_sha():
],
extras_require={
'cors': ['flask-cors>=2.0.0'],
'console_log': ['console_log==0.2.10'],
'hive': [
'pyhive[hive]>=0.6.1',
'tableschema',
Expand Down
29 changes: 14 additions & 15 deletions superset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
from superset import config
from superset.connectors.connector_registry import ConnectorRegistry
from superset.security import SupersetSecurityManager
from superset.utils.core import (
get_update_perms_flag, pessimistic_connection_handling, setup_cache)
from superset.utils.core import pessimistic_connection_handling, setup_cache

wtforms_json.init()

Expand Down Expand Up @@ -196,14 +195,14 @@ def index(self):
not FAB's security manager.
See [4565] in UPDATING.md""")

appbuilder = AppBuilder(
app,
db.session,
base_template='superset/base.html',
indexview=MyIndexView,
security_manager_class=custom_sm,
update_perms=get_update_perms_flag(),
)
with app.app_context():
appbuilder = AppBuilder(
app,
db.session,
base_template='superset/base.html',
indexview=MyIndexView,
security_manager_class=custom_sm,
)

security_manager = appbuilder.sm

Expand All @@ -226,11 +225,6 @@ def is_feature_enabled(feature):
return get_feature_flags().get(feature)


# Registering sources
module_datasource_map = app.config.get('DEFAULT_MODULE_DS_MAP')
module_datasource_map.update(app.config.get('ADDITIONAL_MODULE_DS_MAP'))
ConnectorRegistry.register_sources(module_datasource_map)

# Flask-Compress
if conf.get('ENABLE_FLASK_COMPRESS'):
Compress(app)
Expand All @@ -242,3 +236,8 @@ def is_feature_enabled(feature):
flask_app_mutator(app)

from superset import views # noqa

# Registering sources
module_datasource_map = app.config.get('DEFAULT_MODULE_DS_MAP')
module_datasource_map.update(app.config.get('ADDITIONAL_MODULE_DS_MAP'))
ConnectorRegistry.register_sources(module_datasource_map)
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
export const WORLD_HEALTH_DASHBOARD = '/superset/dashboard/world_health';
export const WORLD_HEALTH_DASHBOARD = '/superset/dashboard/world_health/';
export const TABBED_DASHBOARD = '/superset/dashboard/tabbed_dash/';

export const CHECK_DASHBOARD_FAVORITE_ENDPOINT = '/superset/favstar/Dashboard/*/count';

2 changes: 2 additions & 0 deletions superset/assets/cypress/integration/dashboard/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import DashboardFavStarTest from './fav_star';
import DashboardFilterTest from './filter';
import DashboardLoadTest from './load';
import DashboardSaveTest from './save';
import DashboardTabsTest from './tabs';

describe('Dashboard', () => {
DashboardControlsTest();
Expand All @@ -30,4 +31,5 @@ describe('Dashboard', () => {
DashboardFilterTest();
DashboardLoadTest();
DashboardSaveTest();
DashboardTabsTest();
});
Loading