Commit Graph

168 Commits

Author SHA1 Message Date
Beto Dealmeida 852c51219b Update requests version (#6510)
* Update requests version

* Run pip-compile --output-file requirements.txt
2018-12-11 22:01:06 -08:00
Mahendra M 808622414c [SIP-3] Scheduled email reports for Slices / Dashboards (#5294)
* [scheduled reports] Add support for scheduled reports

* Scheduled email reports for slice and dashboard visualization
  (attachment or inline)
* Scheduled email reports for slice data (CSV attachment on inline table)
* Each schedule has a list of recipients (all of them can receive a single mail,
  or separate mails)
* All outgoing mails can have a mandatory bcc - for audit purposes.
* Each dashboard/slice can have multiple schedules.

In addition, this PR also makes a few minor improvements to the celery
infrastructure.
* Create a common celery app
* Added more celery annotations for the tasks
* Introduced celery beat
* Update docs about concurrency / pools

* [scheduled reports] - Debug mode for scheduled emails

* [scheduled reports] - Ability to send test mails

* [scheduled reports] - Test email functionality - minor improvements

* [scheduled reports] - Rebase with master. Minor fixes

* [scheduled reports] - Add warning messages

* [scheduled reports] - flake8

* [scheduled reports] - fix rebase

* [scheduled reports] - fix rebase

* [scheduled reports] - fix flake8

* [scheduled reports] Rebase in prep for merge

* Fixed alembic tree after rebase
* Updated requirements to latest version of packages (and tested)
* Removed py2 stuff

* [scheduled reports] - fix flake8

* [scheduled reports] - address review comments

* [scheduled reports] - rebase with master
2018-12-10 22:29:29 -08:00
Beto Dealmeida f366bbe735
Google spreadsheets (#5915)
* Google spreadsheets

* Fetch table metadata in SQL Lab

* Show full URL for spreadsheet

* Fix version

* Remove sqllab changes
2018-12-10 13:11:54 -08:00
Maxime Beauchemin e46ab4db52
Bump Flask, bleach and sync pip-compile (#6239)
* sync pip-compile

* Support Flask >= 1.0.0

* pylint

* Trying something else to fix pylint
2018-10-31 16:58:50 -07:00
Maxime Beauchemin 0f6b39a6f7
A few setup.py improvements, removing future lib (#6219) 2018-10-29 21:22:25 -07:00
Maxime Beauchemin 7db11d95b0 [setup.py] allow for range on boto library (#6071) 2018-10-29 11:05:35 -07:00
Maxime Beauchemin 81fc3dfbee [build] fix pip install issues on OSX High Sierra (#6201)
* [build] fix pip install issues on OSX High Sierra

I think requirements.txt was out-of-sync as well.

Also had to:
export
  LDFLAGS="-L/usr/local/opt/openssl/lib"
export
  CPPFLAGS="-I/usr/local/opt/openssl/include"
export
  PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

* Fix click
2018-10-29 10:33:51 -07:00
Maxime Beauchemin 9e6b171ee9 Bump FAB to 1.12.1 (#6138) 2018-10-23 15:02:29 -07:00
timifasubaa 46c86672c8 remove utf8 declaration (#6096) 2018-10-15 11:53:24 -07:00
timifasubaa dd9eeda03e
remove future (#6065) 2018-10-13 09:39:04 -07:00
timifasubaa 047c8b0943
remove six dependency (#6091) 2018-10-13 09:38:46 -07:00
Joshua Carp 9dcf8e101a Upgrade flask-appbuilder to latest. (#6030)
* Upgrade flask-appbuilder to latest.

* Skip constraint deletes if not exist.

* Document breaking change in flask-login.
2018-10-08 12:40:52 -04:00
Maxime Beauchemin 160e47720c
Deprecate support for Python < 3.6 (#5985)
* Deprecate support for Python < 3.6

This is a first step, beyond this we can:
* remove all from future imports
* remove 'six' lib as a dependency
* start using f-strings
* enjoy ourselves

* fix tox

* Rebasing

* fix
2018-10-05 13:44:45 -04:00
Mạnh Tài 458b2b5970 Explicit set markdown version to >= 3.0 (#5959)
* Explicit set markdown version to >= 3.0

* Pinning
2018-09-26 23:48:13 -07:00
Victor Noël 5811a26101 Constrain the max version of markdown (#5967)
Closes #5958
2018-09-24 11:41:16 -07:00
Maxime Beauchemin 94cb20cf96
Apply SQL_QUERY_MUTATOR to explore & dashboard (#5493)
* Apply SQL_QUERY_MUTATOR kn explore & dashboard

* Add unit test
2018-07-26 15:20:23 -07:00
timifasubaa bea0a0aa15 fix migration 3dda56f1c (#5468)
* fix migration 3dda56f1c

* add isodate to setup.py:
2018-07-23 16:27:41 -07:00
gbates101 90decbc5db Migrated to click (#5410)
* Migrate flask_script to the Flask built-in click.

Flask 0.11 is the built-in integration of the click command line interface.
Flask-Migrate support for the new Flask CLI based on Click after Release 2.0.0.

* Resolved merge conflicts.

* Fixed issue introduced from bad merge.

* Fixed flake8 errors, added build to excluded flake8 stuff.

* * Moved the FlaskGroup declaration to the driver script.
* Moved shell context definition to cli.py
* Switched shell context definition to use decorator.
* Moved create_app definition to cli.py
* Fixed InvocationError with a wrapped function

* Added extra newlines between functions

* Removed flask-script dependency.
2018-07-20 15:26:33 -07:00
Maxime Beauchemin 996304aba9
Make Pypi upload support markdown (#5352)
Moving to using Twine to upload to pypi and fixing up the markdown
support so that the page on Pypi looks like the README on Github.

This has been tested on the 0.26 branch starting 0.26.3
2018-07-16 12:27:57 -07:00
Ville Brofeldt 6fee0587ee Implement rolling api introduced in pandas 0.18 (#5328)
* Implement new rolling api introduced in pandas 0.18

* Bump pandas to 0.23.1

* Add 0.18 requirement in setup.py

* Require >=0.18.0, not just 0.18
2018-07-04 18:04:57 -04:00
Riccardo Magliocchetti 81bd5cc4c3 A couple of setup.py fixes (#5338)
* setup: fix long description read in python2

* setup: fix git_get_sha in python3

Fix #5317
2018-07-04 17:04:39 -04:00
Maxime Beauchemin 885d7791a0
[bugfix] README encoding-related UnicodeDecodeError on setup.py (#5309)
Seeing UnicodeDecodeError on our build system running py3.6, though I
couldn't reproduce on my local 3.6. This fix addresses the issue.
2018-07-01 08:57:14 -07:00
Jeffrey Wang fb988fee2e Pin boto3 to 1.4.7 (#5290) 2018-06-27 08:55:47 -07:00
timifasubaa b0eee129e9
add more precise types to hive table from csv (#5267) 2018-06-25 16:12:01 -07:00
Maxime Beauchemin 409ac6824a
[sql lab] Fix issue around VARBINARY type in Presto (#5121)
When receiving a VARBINARY field out of Presto, it shows up as type
`bytes` out of the pyhive driver. Then the pre 3.15 version of
simplejson attempts to convert it to utf8 by default and it craps out.

I bumped to simplejson>=3.25.0 and set `encoding=None` as documented
here
https://simplejson.readthedocs.io/en/latest/#basic-usage so that we can
handle bytes on our own.
2018-06-20 12:16:59 -07:00
Louis-Etienne 70679d4c93 Pin botocore version (#5184)
* Pin botocore version

* Version range for botocore
2018-06-19 08:49:51 -07:00
Riccardo Magliocchetti c670621012 setup: improve description (#5226)
* setup: improve description

* setup: use README.md as long_description

As pypy.io now should render markdown.
2018-06-18 08:42:48 -07:00
Ville Brofeldt ccf211036d Bump Celery to 4.2.0 (#5222)
* Downgrade celery and kombu

* Remove kombu from requirements.txt

* Pin kombu at 4.1.0

* Bump celery to 4.2.0
2018-06-18 08:19:07 -07:00
Maxime Beauchemin d2bc4ece3e
Bump celery to 4.1.1 (#5134)
* Bump celery to 4.1.1

Docs reference `celery worker --app=superset.sql_lab:celery_app
--pool=gevent -Ofair` command which seems only to work with Celery 4.1.1

* Add UPDATING.md message
2018-06-04 14:54:36 -07:00
Maxime Beauchemin ffd65ce623
Pin FAB to 1.10.0 (#5133)
Related to
https://github.com/apache/incubator-superset/issues/5088#issuecomment-394064133
2018-06-04 09:03:30 -07:00
Maxime Beauchemin f6117973e9
Bump dep on pydruid to 0.4.3 (#5098) 2018-05-30 09:15:10 -07:00
Maxime Beauchemin ce0011e5fc
Add missing dep on contextlib2 (#5027) 2018-05-21 13:19:07 -07:00
Maxime Beauchemin 2ba929ac9e Fix flask<1.0.0
Made a mistake originally, meant to flask<1.0.0
2018-05-16 18:37:14 -05:00
Maxime Beauchemin 2c5200affd
[deps] force flask<=1.0.0 (#4959)
flask 1.0 came out and has backwards incompatible changes. People
are reporting that fresh install doesn't work anymore.

fixes https://github.com/apache/incubator-superset/issues/4953

We should ship a 0.25.1 with this in
2018-05-13 11:16:09 -07:00
Maxime Beauchemin 45ffed9976
Move from deprecated flask-cache to flask-caching (#4944)
It appears the officially maintained fork of flask-cache is
flask-caching https://github.com/sh4nks/flask-caching . It is fully
compatible with flask-cache.
2018-05-07 23:18:46 -07:00
Maxime Beauchemin 590e3462d6
Fix 'pip install .' (#4856)
* Fix 'pip install .'

Fix error :
> flask-appbuilder 1.10.0 has requirement Flask-SQLAlchemy==2.1,
> but you'll have flask-sqlalchemy 2.3.2 which is incompatible.
> botocore 1.10.5 has requirement python-dateutil<2.7.0,>=2.1, but you'll
> have python-dateutil 2.7.2 which is incompatible.

* remove flask-sqlalchemy==2.1 from reqs.txt
2018-04-23 08:16:22 -07:00
John Bodley 44c2d5bdab
[setup] Dropping 3.4 and adding 3.6 (#4835)
* [setup] Dropping 3.4 and 3.6

* Update tox.ini

* Update .travis.yml
2018-04-17 21:30:12 -07:00
Beto Dealmeida fd84fd89ce RFC: add logger that logs into browser console (#4702)
* Option for logging into browser console

* Move import

* Add lint req

* Add docs, use Flask logger
2018-04-12 21:48:17 -07:00
John Bodley 1627fd096b
[travis/tox] Restructuring configuration (#4552) 2018-04-10 15:59:44 -07:00
John Bodley 68bfcefb27 [flask-appbuilder] Bumping version to 1.10.0 (#4603) 2018-04-02 21:35:10 -07:00
John Bodley b3442a7b53
[cli] Deprecating gunicorn/flower dependencies (#4451) 2018-03-30 09:28:16 -07:00
Maxime Beauchemin b24a6fd4b5
Fix setup.py, comma makes download_url a tuple (#4676) 2018-03-23 11:21:19 -07:00
John Bodley 3fbadd68a4 [code-climate] Deprecating Code Climate from JavaScript tests 2018-03-08 22:40:08 -08:00
Maxime Beauchemin d817b8ddbb
Setting up compression using flask-compress (#4543) 2018-03-06 21:19:29 -08:00
John Bodley b01a9bba1f [setup] Fixing URLs 2018-03-05 13:06:08 -08:00
timifasubaa 404e2d552a fixes to csv - hive upload (#4488) 2018-02-27 22:13:06 -08:00
John Bodley d57a37e341 [flake8] Adding flake8-coding (#4477) 2018-02-25 15:06:11 -08:00
John Bodley e112e4417c [flake8] Adding future-import check (#4476) 2018-02-23 16:42:09 -08:00
Maxime Beauchemin 5c35a2d210
A collection of bug fixes (#4444) 2018-02-20 14:41:35 -08:00
David Dworken 4ff17ffc8d Fix 4 security vulnerabilities (#4390)
* Switched yaml.load to yaml.safe_load to prevent code execution via crafted yaml files

Python's yaml.laod can lead to code execution via crafted yaml files such as:

```
code_exec: !!python/object/apply:subprocess.check_output ['ls']
```

* Fixed XSS via bleach

It was possible to get an XSS via the markdown library via simply setting a description containing arbitary HTML tags.
It was also possible to create links that went to the `javascript:` link handler (eg `[example](javascript:alert(0)`)
Using bleach to sanitize it solves both of these.

* Added XFO header by default to prevent clickjacking attacks

Note that with this application clickjacking can be relatively severe via the SQLLab functionality
which allows executing arbitary SQL.

* Added justification for dangerouslySetInnerHTML

* Fixed linting errors

* Fixed linting errors
2018-02-09 14:33:29 -08:00