* feat: rename TABLE_NAMES_CACHE_CONFIG to DATA_CACHE_CONFIG
The corresponding cache will now also cache the query results.
* Slice use DATA_CACHE_CONFIG CACHE_DEFAULT_TIMEOUT
* Add test for default cache timeout
* rename FAR_FUTURE to ONE_YEAR_IN_SECS
* feat: new report schedule models
* lint and unique constraint
* support sqlite
* fix sqlite
* add audit mixin and minor fixes
* feat(api): alerts and reports REST API
* feat: new report schedule models
* lint and unique constraint
* support sqlite
* fix sqlite
* add audit mixin and minor fixes
* feat(api): alerts and reports REST API
* draft working version
* add tests
* test
* black
* remove copy pasta
* solve dashboard object representation being used on cache
* tests and custom filter
* fix PUT has PATCH on active field
* create feature flag
* fix lint
* address comments
* Add UUID to saved_query
* Reuse function from previous migration
* Point to new head
* feat: add backend to export saved queries using new format
* Rename ImportMixin to ImportExportMixin
* Create base class for exports
* Add saved queries as well
* Add constant, small fixes
* Fix wrong import
* Fix lint
* feat: enable metadata sync for virtual tables
* add migration and check for empty schema name
* simplify request
* truncate trailing column attributes for MySQL
* add unit test
* use db_engine_spec func to truncate collation and charset
* Remove redundant migration
* add more tests
* address review comments and apply templating to query
* add todo for refactoring
* remove schema from tests
* check column datatype
* Export datasets as ZIP files
* Add logging when failing to parse extra
* Export datasets as ZIP files
* Export charts as Zip file
* Export dashboards as a Zip file
* Add logging
* fix dataset editor for updating table_name and schema
* update test
* remove table_name from restrict list
* fix pylint
* fix cypress test
* fix test
* SO-1099 Parameterize some tests in alerts_tests.py
* Update alerts_tests.py
Remove commented out line
* Update alerts_tests.py
Reformatted using black
* Added fixtures for hidden and published dashboards. Added fixture to restore copied dashboard in dashboard tests. Changed number of dashboards in datasets/api_tests.py because copied dashboard is removed.
* Changed number of dashboards in database api tests after cleanup of dashboards in dashboards_tests
* Collapse alerting models into a single one
Fixing upgrade migration & tests
* Address feedback
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* Changed test_cache_logging to be idempotent and not depending on other data than tested one
* Changed cache uid to be depending on table, not datashource
* feat: possible to turn off SQL templating
* turn SQL templating off by default
* Update UPDATING.md
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* fix missing PR number
* fix missing PR number
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* Removed depemdency to unicode example in tests config.
* Added common methods for creating dashboards for tests.
* Added fixtures to all tests which were using unicode example.
* Added cleanup for unicode_test table
* Removed unnecessary fixture parts of unicode dashboard tests
* Parametrized creating slice for tests
* Moved fixtures for unicode test to separate file and refactored to several methods. Added param types and return types.
* Cleandup after fix
* Changed variable names to more readable
* Added cleanup for dashboards and slices
* Applied unicode fixture to charts api tests
* Update schema variable to dtype in dashboard utils
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* Changed variable schema to dtype in dashboards. Replaced accessing first element with one_or_none
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* Fix table existance validation function
* Drop left over table name index in mysql db
* Do not modify model
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* fix(api): unable to delete virtual dataset because of wrong permission name
* Still delete the dataset even when no permission was found
* migration script to fix possible existing faulty permissions on the db
* black
* fix db migration and one more test
* add more comments to the migration script
* freeze a partial schema of the model on the migration step
* fix mig script
* Update superset/migrations/versions/3fbbc6e8d654_fix_data_access_permissions_for_virtual_.py
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* feat(row-level-security): add filter type and group key
* simplify tests and add custom list widget
* address comments
* use enum value to ensure case sensitive value is used
* feat: SavedQuery REST API for bulk delete
* fix, singular msg and test
* remove 403 from OpenAPI spec
* filter by current user using created_by add sql_tables field
* fixes for new filter, add user field on pre_update, pre_add
* add lru cache to property
* Revert "add lru cache to property"
This reverts commit ad0d9428
* test connection api on databases
* update test connection tests
* update database api test and open api description
* moved test connection to commands
* update error message
* fix isort
* fix mypy
* fix black
* fix mypy pre commit
* feat(database): POST, PUT, DELETE API endpoints
* post tests
* more tests
* lint
* lint
* debug ci
* fix test
* fix test
* fix test
* fix test
* fix test
* fix test
* cleanup
* handle db connection failures
* lint
* skip hive and presto for connection fail test
* fix typo
* Log cache keys to the logs
* Add tests
* Use separate table for the cache keys
* Add migration for the cache lookup table
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* fix: change public role like gamma procedure
* lint and updating UPDATING with breaking change
* fix updating text
* add test and support PUBLIC_ROLE_LIKE_GAMMA
* fix, cleanup tests
* fix, new test
* fix, public default
* Update superset/config.py
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* add simple public welcome page
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* Add presto to the CI
Sample test data
Datetime conversion
Sample test data
Fix tests
* TODO to switch to timestamps
* Address feedback
* Update requirements
* Add TODOs
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* refractored alerting to not pass sqlalchemy obj as args
* updated to pass only alert id as arg
* used object id instead of argument
* updated alerts_tests.py to reflect change
Co-authored-by: Jason Davis <@dropbox.com>
* fix(log): log crashes if expired or not authenticated
* fix lint and rison
* add tests
* more tests
* perm fix
* fix test not found
* JS lint
* fix Jest test
* implemented updates to alerting
* fixed imports and teardown
* changed unittest to pytest conventions
* add app_context to tests
Co-authored-by: Jason Davis <@dropbox.com>
* fix(permissions): alpha role is inconsistent
* reverse and allow Alpha to access manager menu
* Bump FAB to 3.0.1rc1 to include del permission fix
* add docs, tests and UPDATING
* EOL
* Fix query view for Alpha
* fix: API marshmallow3 drop utc for naive datetime fields
* fix: API marshmallow3 drop utc for naive datetime fields
* fix, tests
* isort and test
* black
* add and fix test
* fix comment
* fix(chart-data-api): case insensitive evaluation of filter op
* fix(chart-data-api): case insensitive evaluation of filter op
* mypy
* remove print statement
* add test
* feat(api): bump marshmallow and FAB to version 3
* revert query context tests changes
* obey mypy
* fix tests
* ignore types that collide with marshmallow
* preparing for RC2
* fix tests for marshmallow 3
* typing fixes for marshmallow
* fix tests and black
* fix tests
* bump to RC3 and lint
* Test RC4
* Final 3.0.0
* Address comments, fix tests, better naming, docs
* fix test
* couple of fixes, addressing comments
* bumping marshmallow
* Support more table properties for the hive upload
Refactor
Add tests, and refactor them to be pytest friendly
Use lowercase table names
Ignore isort
* Use sql params
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* feat: add support for alerts
* Add ModelViews
* First pass at adding scheduled Alert support
* Fix syntax errors
* Add log_retention and database to model
* Improving screenshots
* Still refactoring screenshots
* Pass down thumb_size properly
* Progress on screenshot endpoint
* Add alerts.last_eval_dttm and alert query logic
* Getting ready to split compute_screenshot and screenshot/{SHA}
* split the endpoints
* Improving alerting loop
* empty methods
* Add CLI command 'superset alert' that runs a sched loop
* Getting things to work
* email delivery
* A working email\!
* Add feature flag
* Add some description_columns to AlertModelView
* Little tweaks
* Use database.get_df, eval cells for truthiness
* Migrate thumbnail/screenshot functions to use new arg pattern
* Addressing PR feedback
* Update alerts DB migration down_revision
* Resolve _deliver_email arg conflict
* Make mypy happy
* Make isort happy
* Make pylint happy
Co-authored-by: Rob DiCiuccio <rob.diciuccio@gmail.com>
* feat: add database dropdown to dashboard import
Currently, when importing a database from a JSON file, the process
looks at the database name from the source (the info is in the file)
and matches the datasources to that name. If no database by that name
exists, it simply fails.
With this PR, we add a database dropdown that allows the user to specify
which databases the datasources should target as the get upserted.
I want to stress that the code in this area is not in a great shape,
and that the challenge of serializing/deser the nested objects is
challenging, but that there should be a much better way to do this.
One of the improvement (out of scope for this PR) that would allow to
simplify those import/export would be to use UUIDs for
importable/exportable objects.
Another identified issue is the indirections between
`utils/import_expor_{model}.py` on top of `{Model}.import_object`. Not
addressing that here.
Next topic is the MVC stuff. Decided to stick with it for now as this is
more of a [obious missing feat:] than a rewrite.
* isort \!? 0%^$%Y$&?%$^?%0^?
* fix tests
* pre-committing to py3.6
* address dpgaspar's comments
* revert isort
* Switch from nosetest to pytest
Fix schedule tests
Collect pytest coverage
Move pytest config into pytest.ini
Move cov to the pytest.ini
* Append coverage for the 2nd run
* Add coverage to all commands
* Coverage only for tests
* Get coverage from 1 place
* Rename classes to be pytest compatible
* Test coverage for examples and tests
* Max diff to -1
* Explain how to run pytest for the whole project
* Do not append code coverage for the main run
* Do not run coverage on examples
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* feat: Add new timegrains and convert_dttm to Druid engine spec
* Add TemporalType enum and fix test case
* Remove DATETIME for athena (original spec)
* Add multiple table filters for Row Level Security
* Set ENABLE_ROW_LEVEL_SECURITY back to False (default)
* Merge DB migrations
* Drop table_id column and foreign key on PostgreSQL, MySQL, SQLite
* Support db records migration also
* Support downgrading from the new-fashioned formatted records
* Straighten up migrations
* Update migration's down_revision to comply master branch
* Implement table mutator and examples how to set date defaults
Fix tests
* Fix flaky test
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* Remove unreferenced function from views/core.py
* Remove excess constants from views/core.py
* Extract CssTemplate-related views to their own file from core.py
* Remove duplicate constant declaration and make the constant less racist
* Move free-floating functions in views/core.py to views/utils.py
* Move AccessRequestsModelView out of views/core.py into its own module
* Move health checks and KV ModelView out of core.py and into their own modules
* Move R model view to its own module
* Move after-request header setting to views/base.py from views/core.py
* black
* mypy
* isort
* Fix reference to imported app
* pylint
* Fix some imports
* Add some missing view imports
* Fix a missing import
* First draft for the slack integration
Fix slack
another typo
another typo
Fix slack
Add channels to the form
another typo
Another set of changes
Make code more transparent
Fix tests
Add logging
logging
use logger
import logging
import logging
import logging
add assert
more logging
Fix channels
Fix channels
* Address comments
* Move slack into a separate module
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* Add owners and physical/virtual status to Datasets API list endpoint
* black
* Update type definition for DatasourceKind
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* Fixin' tests and mypy
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* remove word cloud from viz.py
* Fix Run in SQL Lab
* remove deprecated python tests
* break out legacy endpoint type into function
* Break out exploreChart from exportChart and implement results type
* Fix jest tests and refactor accordingly
* lint
* Rename v1 payload function
* Add dashboard id to v1 chart data request url params
* Add support for domain sharding to v1 chart data request
* Removing the logic to add timeseries_limit_metric to the data for table viz
* Also make the change in viz_sip_38
* Fix tests
Co-authored-by: michelle_thomas <michelle.thomas@airbnb.com>
* chore: bump pyhton dependencies
* bump flask-testing
* Add note to UPDATING and bump flask-testing in requirements-dev.txt
* fix old sqlparse test case that is fixed with sqlparse==0.3.1
* Fix migration and sqlparse set test
* downgrade alembic
* Downgrade sqlalchemy-utils
* pin sqlalchemy-utils due to regression in 0.36.5
* Refine comment in setup.py
* make cachelib an explicit requirement
* Make all fields optional in QueryObject and fix having_druid schema
* fix: datasource type sql to table
* lint
* Add missing fields
* Refactor tests
* Linting
* Refactor query context fixtures
* Add typing to test func
* Add OpenAPI docs to /api/v1/chart/data EP
* Add missing fields to QueryObject, fix linting and unit test errors
* Fix unit test errors
* abc
* Fix errors uncovered by schema validation and add unit test for invalid payload
* Add schema for response
* Remove unnecessary pylint disable
* Deprecate groupby from query_obj
* Fix query_object bug
* Fix histogram
* Remove groupby from legacy druid connector and fix first batch of unit tests
* Deprecate some unnecessary tests + fix a few others
* Address comments
* hide SIP-38 changes behind feature flag
* Break out further SIP-38 related tests
* Reslove test errors
* Add feature flag to QueryContext
* Resolve tests and bad rebase
* Backport recent changes from viz.py and fix broken DeckGL charts
* Fix bad rebase
* backport #9522 and address comments
* Visualize after running Ctas query (#4)
* Visualize after running Ctas query.
Stub for table viz
Work on the viz
Add JS functionality for Ctas viz
Add test for the table viz flow
Fix test
Add js test for the ctas viz
* Fix tests
* Resolve comments
* Leverate tmpSchema in the query object
* Fix i18n string
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* Add post processing to QueryObject
* Simplify sort signature and require explicit sort order
* Add new operations and unit tests
* linting
* Address comments
* Simplify test method names
* Address comments
* Linting
* remove unnecessary logic
* Apply strict whitelisting to all getattr calls
* Add checking of rolling_type_options and add/improve docs
* [dashboards] New, tittle and slug OR filter
* Update requirements, because of prison bump
* Tests
* Fix tests
* Avoid like filter on empty string value
* merge master brings strict typing to the table
* filter owners select by text input
* use rison
* fix backend owners filter logic
* use fullname, not username on owners inputs
* fix some tests
* fixing tests
* deterministic tests
* appease linter
* add back search by username
* more comprehensive filter test
* add clarifying text
* formatting...
* [explore view] fix long query issue from Run in SQL LAB Button
* SQL Lab page needs to take the post form data, too
* fix variable names
* updated payload dict, rename hidden form
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
* feat: [explore] don't save filters inherited from a dashboard
When navigating to explore from a dashboard context, the current
dashboard filter(s) are passed along to explore so that the context is
kept. So say you're filtering on "country=Romania", in your dashboard
and pivot to explore, that filter is still there and keep on exploring.
Now a common issue is that you'll want to make some tweak to your chart
that are unrelated to the filter, say toggling the legend off for
instance, and then save it. Now you back to your dashboard and even
though you started with an "all countries" dashboard, with a global
filter on country, now that one chart is stuck on "Romania". Typically
you notice this when filtering on something else, say "Italy" and then
that one chart now has two mutually exclusive filters, and show "No data".
Now, the fix is to flag the filter as "extra" (that's the not-so-good internal
name we use for these inherited filters) and make it clear that that
specific filter is special and won't be saved when saving the chart.
* fix build
* [dashboard] Refactor API using SIP-35
* [dashboard] Fix, import
* [dashboard] more tests
* [dashboards] a misc of improvements
* [charts] Fix, DAO and tests
* [dashboards] small exceptions refactor
* [dashboards] lint
* [dashboards] Improves comments on base classes
* [dashboards] lint
* [datasets] new, react listview
* add hidden columns to support filtering by columns not rendered
* throw exception if config is incorrect
* fix database filter
* update endpoints to point to datasets; fix translation strings
* move Link into src/components
* add add new record button to datasets listview
* fix: change database save in DatasourceEditor
This addresses the issue where pointing a datasource to another database
in the datasource editor is not reflected.
Also addresses:
- a minorcosmetic issue in the datasource editor.
- user/owners list not getting populated
* tests
* Make schema name configurable
Fixing unit tests
Fix table quoting
Mypy
Split tests out for sqlite
Grant more permissions for mysql user
Postgres doesn't support if not exists
More logging
Commit for table creation
Priviliges for postgres
Update tests
Resolve comments
Lint
No limits for the CTA queries if configures
* CTA -> CTAS and dict -> {}
* Move database creation to the .travis file
* Black
* Move tweaks to travis db setup
* Remove left over version
* Address comments
* Quote table names in the CTAS queries
* Pass tmp_schema_name for the query execution
* Rebase alembic migration
* Switch to python3 mypy
* SQLLAB_CTA_SCHEMA_NAME_FUNC -> SQLLAB_CTAS_SCHEMA_NAME_FUNC
* Black
* Returning timeseries_limit_metric in table viz get_data
* Fixing issue with include_time field
* Reformatting and adding a test
* Changing if/else structure
* Reformatting
* Support and apply filters.
* Added the UI for row level security, and moved it all under SQLA in order to access the Table model more easily.
* Added a row level security filter documentation entry.
* Accidentally added two new lines to this file.
* Blacked and iSorted, hopefully. Also, sometimes g.user may not be set.
* Another isort, and handling g not having a user attribute another way.
* Let's try this again #CI tests.
* Adjusted import order for isort; I was sure I'd already done this..
* Row level filters should be wrapped in parentheses in case one contains an OR.
* Oops, did not think that would change Black's formatting.
* Changes as per @mistercrunch.
* RLS filters are now many-to-many with Roles.
* Updated documentation to reflect RLS filters supporting multiple rows.
* Let's see what happens when I set it to the previous revision ID
* Updated from upstream.
* There was a pylint error.
* Added RLS ids to the cache keys; modified documentation; added template processing to RLS filters.
* A new migration was merged in.
* Removed RLS cache key from query_object.
* RLS added to the cache_key from query_context.
* Changes as per @etr2460.
* Updating entry for RLS pull request.
* Another migration to skip.
* Changes as per @serenajiang.
* Blacked.
* Blacked and added some attributes to check for.
* Changed to a manual query as per @mistercrunch.
* Blacked.
* Another migration in the meantime.
* Black wanted some whitespace changes.
* AttributeError: 'AnonymousUserMixin' object has no attribute 'id'.
* Oops, did hasattr backwards.
* Changes as per @mistercrunch.
* Doesn't look like text us required here anymore.
* Changes as per @dpgaspar
* Two RLS tests.
* Row level security is now disabled by default via the feature flag ENABLE_ROW_LEVEL_SECURITY.
* New head to revise.
* Changed the comment.
* Add feature flags to control query sharing, KV exposure
* Add tests, fix bug
* Skip test for kv endpoints when they are disabled
* ESLint fixes
* Remove unnecessary binds
* Fix eslint errors
* Add note to UPDATING.md RE: new feature flag options
* Use expanded version of RBAC
* Enable KV_STORE and SHARE_QUERIES_VIA_KV_STORE feature flags in the test environment
* Fix black
* Wrap tagging endpoints in a feature flag (disabled by default)
* Add tests for new feature flag
* Reuse existing feature flag
* Add TAGGING_SYSTEM to feature flags defaulted to False
* Do not show stacktraces on some intentionally-thrown errors
* Fix pylint error
* Fix JavaScript looking for the wrong key in error response from connection check
* format -> f-string
* Run black because PyCharm missed it on the last save
Migrates and completely removes: '/superset/table/<database_id>/<table_name>/<schema>/'
- Guarantees database filtering based on the user permissions
- Full OpenAPI spec
- Better error handling
* fix: shut off all uneeded endpoints
We recently added a new feature to FAB allowing to whitelist the needed
endpoints in ModelView and ModelRestApi.
First, we set our base wrapper class to an empty set, forcing each
class inheriting from it to explicitely turn on the endpoints that
Superset intends to use.
Second, we go ModelView by ModelView to whitelist the actual endpoints
used in the app.
Notes:
* as a result a large set of [unneeded] permissions should be cleaned up
* outside of the "private" use of endpoints in the app, people that have
been using endpoints in their environment for other purposes may
experience loss of functionality
* Tweaking
* Reduce the amount of endpoints using white lists
* Fix, included needed endpoints for dashboard and druid
* Drying things up
* fixes
* limiting more endpoints
* Read only on some FAB model views
* fixing some tests
* fixes
* Fixing more tests
* Addressing comments
* Drying up route_methods
* further drying
Co-authored-by: Daniel Vaz Gaspar <danielvazgaspar@gmail.com>
* [dashboards] New, API for Bulk delete
* [dashboards] Tests
* [dashboards] Fix not found on multiple delete
* [dashboards] Bulk delete partial deletes on not owned dashes
* [dashboards] Improve OpenAPI spec and tests
* [dashboards] Test for bad request
* [dashboards] i18n
* [dashboards] black
* [dashboard] make bulk all or nothing
* [dashboard] Log on sqlalchemy error
* [dashboard] Log on sqlalchemy error
* [charts] New REST API
* [charts] Small improvements
* [charts] Fix, lint
* [charts] Tests and datasource validation
* [charts] Fix, lint
* [charts] DRY post schemas
* [charts] lint and improve type declarations
* [charts] DRY owned REST APIs
* [charts] Small fixes
* [charts] More tests
* [charts] Tests and DRY
* [charts] Tests for update
* [charts] More tests
* [charts] Fix, isort
* [charts] DRY and improve quality
* [charts] DRY and more tests
* [charts] Refactor base for api and schemas
* [charts] Fix bug on partial updates for dashboards
* [charts] Fix missing apache license
* black app.py after merge
* [charts] Fix, missing imports and black
* [api] Log on sqlalchemy error
* [api] isort
* Use PyArrow Table for query result serialization
* Cleanup dev comments
* Additional cleanup
* WIP: tests
* Remove explicit dtype logic from db_engine_specs
* Remove obsolete column property
* SupersetTable column types
* Port SupersetDataFrame methods to SupersetTable
* Add test for nullable boolean columns
* Support datetime values with timezone offsets
* Black formatting
* Pylint
* More linting/formatting
* Resolve issue with timezones not appearing in results
* Types
* Enable running of tests in tests/db_engine_specs
* Resolve application context errors
* Refactor and add tests for pyodbc.Row conversion
* Appease isort, regardless of isort:skip
* Re-enable RESULTS_BACKEND_USE_MSGPACK default based on benchmarks
* Dataframe typing and nits
* Renames to reduce ambiguity
* Require the SQLAlchemy URI when creating a database
* Add migration to make dbs.sqlalchemy_uri not-nullable
* Fixes for black, isort, tests
* Alter migration to use current revision from master as downgrade target
* Update tests to support new db constraint
* black
* re-enable pylint for superset/common/query_context.py
* Re-enable pylint for superset/connectors/base/views.py
* re-enable pylint for superset/connectors/connector_registry.py
* Re-enable pylint for tests/fixtures/pyodbcRow.py
* re-enable pylint for superset/cli.py
* Fix for mypy
* Improve variable naming
* A few more naming fixes
* Build support for schema access in Superset and SQLab
* Lint
* Test for old and new flask
* Black formatting
* Cleanup modified files
* Support schema permissions
* Add migration
* Make it work for slices as well
* TODO and remove unused field
* Apply schema access check to dashboards as well
Cleaner schema permissions check
Fetch schema permissions in 1 query
Bugfix
Better datasource check
Use security manager for permissions checks and remove dead code
Properly handle anon user
Add database permissions on the database updates
Fix schema filtering
Lint / flake changes
Increase cypress request timeout
Run black
Resolve multiple alembic heads
* Use set comprehensions
* Fixes for the pylint
* Disable deprecated druid connector by default
* Add a line in UPDATING.md for the configuration change
* Remove security tests related default-disabled feature
* More test updates
* black
* First cut at app factory
* Setting things back to master
* Working with new FLASK_APP
* Still need to refactor Celery
* CLI mostly working
* Working on unit tests
* Moving cli stuff around a bit
* Removing get in config
* Defaulting test config
* Adding flask-testing
* flask-testing casing
* resultsbackend property bug
* Fixing up cli
* Quick fix for KV api
* Working on save slice
* Fixed core_tests
* Fixed utils_tests
* Most tests working - still need to dig into remaining app_context issue in tests
* All tests passing locally - need to update code comments
* Fixing dashboard tests again
* Blacking
* Sorting imports
* linting
* removing envvar mangling
* blacking
* Fixing unit tests
* isorting
* licensing
* fixing mysql tests
* fixing cypress?
* fixing .flaskenv
* fixing test app_ctx
* fixing cypress
* moving manifest processor around
* moving results backend manager around
* Cleaning up __init__ a bit more
* Addressing PR comments
* Addressing PR comments
* Blacking
* Fixes for running celery worker
* Tuning isort
* Blacking
* adds react based menu for welcome view
* bump fab
* better logic in common_bootstrap_payload
* split up files
* fix spacing and module scope styles
* lint
* render correct template for welcome
* [fix] csv upload when table metadata present
* Remove table from hive spec
* Move upload before table metadata creation
* Refine upload logic, dd unit tests and fix translations
* Use ALLOWED_EXTENSIONS from config
* Address review comments
* Fix error message grammar
* Add return type to hive csv upload and replace first with one_or_none
* Typo fix in CONTRIBUTING.md
* Alter references to config.get('FOO') to use preferred config['FOO']
* Set missing configuration constants in superset/config.py
* Misc. CI fixes
* Add type annotation for FEATURE_FLATGS
* Enable lint checking for files in db_engine_spec that have few to no
lint issues
* Enable lint and fix issue in db_engine_spec/mysql.py
* Enable pylint and fix lint for db_engine_spec/pinot.py
* Enable lint and fix issues for db_engine_specs/hive.py
* Enable lint and fix for db_engine_spec/presto.py
* Re-enable lint on base.py, fix/disable specific failures, including one
bad method signature
* Make flake8 happy after a number of pylint fixes
* Update db_engine_spec_test test cases related to Presto to support
different method naming
* automated reformatting
* One more pylint disable for druid.py
* Find the magic invocation that makes all the lint tools happy
* WIP - Add easily interpretable negative timedelta formatting
* Add unit tests for utils.core.timedelta_f
* Reformat tests.utils_tests.test_timedelta_f test code. Fixes#8274.
* Add type annotations to utils.core.timedelta_f (#8274)
* Replace recursion with absolute value in utils.core.timedelta_f (#8274)
* Rename utils.core.timedelta_f to format_timedelta (#8274)
* Fix small typo (#8274)
* Handle int64 columns with missing data in SQL Lab
* Fix docstring
* Add unit test
* Small fix
* Small fixes
* Fix cursor description update
* Better fix
* Fix unit test, black
* Fix nan comparison in unit test
* Fix regression in time grain addons
* Revert privatization of time_grain_functions
* Fix test
* Rename variable
* Fix test
* Fix typing error
* Refactor and add tests
* Add TODO
* Add support for msgpack results_backend serialization
* Serialize DataFrame with PyArrow rather than JSON
* Adjust dependencies, de-lint
* Add tests for (de)serialization methods
* Add MessagePack config info to Installation docs
* Enable msgpack/arrow serialization by default
* [Fix] Prevent msgpack serialization on synchronous queries
* Add type annotations
* Add check for calls to cache_key_wrapper to avoid unavoidable compilation of query
* Add fetch_values_predicate to check
* Only check relevant attributes
* Address nit
* Add typing to db_engine_specs
* Add more type annotations and docstrings
* Add docstrings and typing to sql_parse and db_engine_specs
* Refine select_star
* Fix execute and add more docstrings
* Revert kwargs change from execute
* Remove redundant or
* Align view and table getter schema types
* Fix return type of latest_partition
* Remove some typing from presto
* Improve docstring for __extract_from_token
* [database] Fix, Removes the limit for the page size, Bump FAB to 2.1.8
Old FAB API had no limits by default, this will keep this behaviour
but only for this endpoint
* [sqllab] Add test for database API
* [sqllab] Add test for database API
* [sqllab] Include page zero on request
* [sqllab] Fix, Black and requirements
* [sqllab] Make database API return unlimited results
* [sqllab] just a test
* [sqllab] Bump FAB to 2.1.9
* [sqllab] Remove unused import
* 7620: Start removing dependencies on requests
* Patch urllib.request.urlopen instead of requests.get
* Try to fix flake8
* More work on flake8 import errors
* First attempt at using urllib with cookies
* Fix pylint/flake8
* Fix test_deliver_slice_csv_attachment
* Fix test_deliver_slice_csv_inline
* Import requests and pydruid conditionally, remove dependency on prison
* Fix flake errors
* Fix load_examples
* Please flake
* Skip tests depending on optional deps
* Try to please flake
* Address review comments
* Remove Druid-related UI
* Revert "Remove Druid-related UI"
This reverts commit d7e0f166cc3f3dd2496b4a666e177f0c191aeb0f.
* Skip a few tests more
* Put imports in right order
* Apply black patch
* Please flake
* Please black, silence flake
* Use flake8 silencing the right way
* Add deps for CI
* [cli] New, command line option to create or set a db URI
* [tests] New, get or create db on utils
* [tests] flake8 and black
* [tests] Fix, remove dummy comments
* [cli] dummy commit to re-trigger build
* [cli] dummy commit to re-trigger build
* Create query_obj for every filter
* Deprecate is_prequery and prequeries from query_obj
* Fix tests
* Fix typos and remove redundant ; from sql
* Add typing to namedtuples and move all query str logic to one place
* Fix unit test
* Allow to pass user for dashboard import cli
Dashboard import assign current user from flask context during import.
But in case of cli import there is no flask user and imported charts
don't have an owner which prevents ability to edit them.
* Reset ownership on dashboard import
For overriding existing charts it requires `owners` property to be set.
* Add tests for reset ownership
* Use ORM to decode dashboards json
Creating instances using ORM allows to normally work with relations
* Fix test_import_dashboard_1_slice test
Previously tests used side-effect of slices import which kept id from
json on insert into db.
* [api] [database] New, migrate to new FAB API side by side
* [database] view and api module reorganization
* [style] Fix, flake8
* [test] [database] Fix, tests for new database view structure
* [style] [database] black
* [database] Fix, missing apache license
* Migrate databaasync api to the new api
* flake8
* More efficient api call
* Revert querySearch to old API, test
* dummy commit
* revert config.py commit
* Remove unused import
* Remove old API view
* Remove new API view
* Add database filter
* Add database filter
* Add database filter
* Remove comments on js
* Fix JS test
* Fix pylint
* QuerySearch new databaseasync API endpoint
* Fix, query search new api endpoint
* Reintroduce old API for smooth side by side migration
* Better naming and use common hooks for view and API
* black it
* Fix, database mixin must come first
* Fix, lint
* fix(sql-lab explore): fixed response data and header type to be aligned
* fix(sql-lab explore): fixed test error caused by incorrect test at master
* fix(sql-lab explore): reformatted
* fix(sql-lab explore): removed unused import
* Remove unnecessary fields from dashboard exported json
This commit makes export respect export_fields and doesn't export
unnecessary relations (like users with passwords hashes) which are
ignored during the import.
* Allow to import dashboard without position_json
In case charts were added from chart-edit page and wasn't re-ordered on
the dashboard position_json field is empty and import was failing with
error.
* Update export/import tests
* [WiP] improve load_examples
related to #7472, longer term we will generate the examples by exporting
them into tarball as in #7472. In the meantime, we need this subset of
the features:
* allowing specifying an alternate database connection for examples
* allowing a --only-metadata flag to `load_examples` to load only
dashboard and chart definitions, no actual data is loaded
* Improve logging
* Rename data->examples
* Load only if not exist
* By default do not load, add a force flag
* fix build
* set published to true
* Allow users to publish dashboards
* Rework publish dashboards feature
- The eye next to the title has been replaced with a [draft] badge
- Published status is now toggled in the Header Action Dropdown
- CRUD list shows published status
* Fix linter errors
* Update javascript tests
* Add tests and change DashboardFilter
Add some tests to make sure the published status is rendered and
Make it so that users cannot see dashboards that are published
if they don't have access to any of the slices within
* Fix some linter errors
* Remove commas from core.py
* Fix some failing tests
* More linter errors I introduced
* Fix more linter errors I introduced
* update alembic migration
* Update design of publish dash feature
* Upgrade migration version
* Secure publish endpoint
* Remove bad quotes
* Give publish span its own style
* fix publish rendering
* Add new test for publish feature
* Update migration
* update slug in test
* Update migration
* Address reviwer comments
* Fix linter errors
* Add licenses
* Remove fetchPublished(), use bootstrap data
* Update migration
* Update croniter to existing version
* Fix linter errors
* Upgrade DB Revisions
* Fix flake8 linter error
* Set all dashboards to published on migration
* Migration proper line spacing
* Fix migration to work with postgres
* UPDATE statement works with postgresql and sqlite hopefully
* Update wording to kick off travis
Fixing a few failing examples, examples were referencing metrics that
were getting auto-generated in the past (like `sum__num`),
that we now prevent from getting created.
* Add extra_require for bigquery to setup.py
* Refactor df_to_db and add df upload capability for BigQuery
* Fix unit tests and clarify kwarg logic
* Fix flake8 errors
* Add minimum versions for bigquery dependencies
* wrap to_gbq in try-catch block and raise error if pandas-gbq is missing
* Fix linting error and make error more generic
* fix: SqlaColumn.type overflow on mysql
Hitting a new error when loading examples around a datatype that exceeds
the 32 chars limit on SqlaColumn.type
Type includes the 'COLLATE utf8mb4_general_ci' suffix which is too
verbose and not needed in that context.
* fix tests
* feat: rough check in for Presto rows and arrays
* fix: presto arrays
* fix: return selected and expanded columns
* fix: add helper methods and unit tests
* fix: only allow exploration of selected columns
* fix: address Beto's comments and add more unit tests
* Move schema name handling in table names from frontend to backend
* Rename all_schema_names to get_all_schema_names
* Fix js errors
* Fix additional js linting errors
* Refactor datasource getters and fix linting errors
* Update js unit tests
* Add python unit test for get_table_names method
* Add python unit test for get_table_names method
* Fix js linting error
* Bugfix to SQL Lab to support tables and schemas with characters that require quoting
* Remove debugging prints
* Add uri encoding to secondary tables call
* Quote schema names for presto
* Quote selected_schema on Snowflake, MySQL and Hive
* Remove redundant parens
* Add python unit tests
* Add js unit test
* Fix flake8 linting error
* Merge lastest from master into lyft-release-sp8 (#7405)
* filter out all nan series (#7313)
* improve not rich tooltip (#7345)
* Create issue_label_bot.yaml (#7341)
* fix: do not save colors without a color scheme (#7347)
* [wtforms] Strip leading/trailing whitespace (#7084)
* [schema] Updating the datasources schema (#5451)
* limit tables/views returned if schema is not provided (#7358)
* limit tables/views returned if schema is not provided
* fix typo
* improve code performance
* handle the case when table name or view name does not present a schema
* Add type anno (#7342)
* Updated local dev instructions to include missing step
* First pass at type annotations
* [schema] Updating the base column schema (#5452)
* Update 937d04c16b64_update_datasources.py (#7361)
* Feature flag for client cache (#7348)
* Feature flag for client cache
* Fix integration test
* Revert "Fix integration test"
This reverts commit 58434ab98a.
* Feature flag for client cache
* Fix integration tests
* Add feature flag to config.py
* Add another feature check
* Fix more integration tests
* Fix raw HTML in SliceAdder (#7338)
* remove backendSync.json (#7331)
* [bubbles] issue when using duplicated metrics (#7087)
* SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04 (#7359)
* SUPERSET-8: Update text in docs copyright footer (#7360)
* SUPERSET-7: Docker compose config version breaks on Ubuntu 16.04
* SUPERSET-8: Extra text in docs copyright footer
* [schema] Adding commits and removing unnecessary foreign-key definitions (#7371)
* Store last selected dashboard in sessionStorage (#7181)
* Store last selected dashboard in sessionStorage
* Fix tests
* [schema] Updating the base metric schema (#5453)
* Fix NoneType bug & fill the test recipients with original recipients if empty (#7365)
* feat: see Presto row and array data types (#7391)
* feat: see Presto row and array data types
* fix: address PR comments
* fix: lint and build issues
* fix: add types
* Incorporate feedback from initial PR (prematurely merged to lyft-release-sp8) (#7415)
* add stronger type hints where possible
* fix: lint issues and add select_star func in Hive
* add missing pkg init
* fix: build issues
* fix: pylint issues
* fix: use logging instead of print
* feat: view presto row objects in data grid
* fix: address feedback
* fix: spacing