* feat: send data embedded in report email
* Change post-processing to use new endpoint
* Show TEXT option only to text-based vizs
* Fix test
* feat: send data embedded in report email
* feat: send report data to Slack
* Add unit test
* trigger tests
* feat: send data embedded in report email
* Prettify table
* Change post-processing to use new endpoint
* Show text option only for text viz
* Show TEXT option only to text-based vizs
* Fix test
* Add email test
* Add unit test
* rebase master and resolve conflicts
* pylint to makefile
* fix crash when pivot operator
* fix comments
* add precision argument
* query test
* wip
* fix ut
* rename
* set time_offsets to cache key
wip
* refactor get_df_payload
wip
* extra query cache
* cache ut
* normalize df
* fix timeoffset
* fix ut
* make cache key logging sense
* resolve conflicts
* backend follow up iteration 1
wip
* rolling window type
* rebase master
* py lint and minor follow ups
* pylintrc
* feat: cancel db query on stop
* fix pylint
* Add unit tests
* Do not bind multiple times
* Stop only running queries
* Postgres to cancel only the required query
* Remove extra log
* Add docstring
* Better types, docstring and naming
* Use python3 format strings
* Update superset/sql_lab.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* Add cancel_query_on_windows_unload option to database
* Return cancel_query as bool
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* chore: move memoized test into a separated file
create integration test workflow
* chore: create unit test workflow to run purely pytest
* fix: bad reference
* fix: remove pip requirements bc there aren't any yet
* temp: install unit dependencies directly
* fix: --rootdir=
* fix: try to run only unit test
* chore: decouple memoized as separated module
* fix: bring back dependencies bc superset top-level module is coupled to flask and others so no reason no to do it
* fix: reference
* fix: pre-commit
* fix: pylint
* snowflake errors
* added big query
* added to setup error messages, first test
* all big query testing added
* added snowflake test
* added syntax error
* added syntax errors to most used databases
* Restrict operators when column is boolean
* refactor 'isOperatorRelevant' a little bit
* Include 'BOOLEAN' to handle presto
* Update tests
* number column should show bool operators
* fix test - some dbs translate true/false to 1/0
* Fix tests and add linting
* When column type is boolean, show bool operators
* Address PR comments - simplify conditions
* Fix a linting error
* Addressing PR comment - remove unused variables
* db migration for dbs
* first draft at logic
* added unit tests
* revisions
* use strings for db values
* lint and revisions to tests
* changed test back
* added revisions for testing
* Update superset/databases/commands/update.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* Update superset/databases/schemas.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* Update superset/models/core.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* Update superset/databases/commands/update.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* got rid of extra imports added new test
* Update superset/databases/schemas.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* chore: use before_request hook for dynamic routes
* Shorten hook names
* Introduce with_feature_flags and update thumbnail tests
* Disable test that fails in CI but not locally
* Add test for reports
* chore(dashboard): Integrate dashboard app into the SPA bundle
* fix url params
* change variable name
* change title correctly
* custom css
* lint
* remove unused file
* remove content assertions from dashboard tests
* fix case with missing bootstrap data
* fix: respect crud views flag
* crud views -> spa
* remove unused dashboard templates
* fix: remove unused variable
* fix: missed a spot with the crudViews -> spa
* router link to dashboard from dashboard list page
* link using the router when in card mode
* lint
* fix tests, add memory router
* remove dashboard app files
* split up the bundle a little more
* use webpack preload
* fix(hive): Use parquet rather than textfile when uploading CSV files
* [csv/excel]: Use stream rather than temporary file
Co-authored-by: John Bodley <john.bodley@airbnb.com>
* First cut at adding enc type factory
* Finalized enc type factory
* Adding unit test
* PyLinting
* Adding license
* Apply suggestions from code review
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
* Moving things from enc -> encrypt
* CI commit
* One more fix
* Tweaking config name
* Fixing broken test
* Fixing broken test again
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
* add ui for setting report format
* refactor default notification format
* init csv data alert report
* add report format to report_schedule model
* add ALERTS_ATTACH_REPORTS feature flag
* fix lint
* update check image tag
* fix migrations
Co-authored-by: samtfm <sam@preset.io>
* add hook for future async api calls
* test to see conflict
* add async middleware and update reducers
* working async dashboard load
* implement getcharts api
* add user permissions to explore and dashboard bootstrap data
* integrate api calls with getinitial state
* update namings
* accept an id or a slug in the dashboard charts api
* add permissions function
* fix merge
* update state
* get dashboard charts by id or slug
* fix undefined states
* variable names
* stop using some more bootstrap data
* fix metadata reference
* remove unused bootstrap from the template
* add errorboundry to dashboard
* refactoring, fixing
* update permissions
* add just roles
* id is supposed to be a string
* unused vars
* get datasources from api
* make onError optional
* use resource hooks, better error boundary
* add loading state for dashboardroute
* remove console
* add conditional
* more conditionals
* testing out a possible fix for cypress
* convert edit/standalone test to cypress
* remove bootstrappy assertions
* lint
* fix dashboard edit history issue
* rename stuff
* address recent native filters schema change
* remove unused getInitialState
* remove .only from test
* hooksy redux usage
* Revert "more conditionals"
This reverts commit 25c8ed61b4.
* cleanup
* undo unnecessary change
* actually need conditions here
* certainty
* Revert "certainty"
This reverts commit 77dea1915b.
* more permutations (untested yolo)
* Update superset-frontend/src/chart/chartReducer.ts
Co-authored-by: Evan Rusackas <evan@preset.io>
* import style
* comment
* cleaner dashboardInfo
* remove debug code
* use memo for getPermissions
* fix lint
* adjust name/location of DashboardPage
* move logic for REMOVE_SLICE_LEVEL_LABEL_COLORS to DAO
* stop using full_data()
* remove unused (and now useless) json=true query param
Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
* initial commit
* revisions
* started tests
* added unit tests
* revisions
* tests passing
* fixed api test
* Update superset/queries/saved_queries/commands/importers/v1/utils.py
Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>
* Revert "Update superset/queries/saved_queries/commands/importers/v1/utils.py"
This reverts commit 18580aad1e.
Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>
* add method to strip semicolon
* address comments
* test the test
* Update tests/sqla_models_tests.py
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
* Update tests/sqla_models_tests.py
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* fix test
* add suggestion
* fix trailing space
* remove logger
* fix unit test
Co-authored-by: Jesse Yang <jesse.yang@airbnb.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* Add a feature flag ALERTS_ATTACH_REPORTS
* update test
* update feature flag
* add comment for feature flag
* add unit tests for alerts with attachments disabled
* fix lint
Co-authored-by: samtfm <sam@preset.io>
* Prep for migration
* Migration for execution id column
* Generate execution ids for alerts and reports
* Change execution id range
* Add execution id to API endpoint
* Add execution id to execution log view
* Change execution id range
* Change execution id to a uuid
* Fix execution id type
* Switch state and exec. id columns
* Change db column to UUIDType
* Python lint
* Fix failing frontend tests
* execution_id -> uuid
* Fix migration head
* lint
* Use celery task id as the execution id
* lint
* lint for real
* Fix tests
* fix: Escape csv content during downloads
* Reuse CsvResponse object
* Use correct mimetype for csv responses
* Ensure that headers are also escaped
* Update escaping logic
* fix(query): properly select adhoc metrics in orderby
* Throw error when sql is empty
* Allow `metrics` to be None
* Always use alias in orderby for metrics
* Bump table chart version and migrate histogram to typescript
* Fix Histogram without groupby
* Fix Presto birth names test
* Raw records mode should not aggregate
* feat: delete dataset columns and metrics on the REST API
* fix openapi spec
* change delete comparison to id
* delete columns and metrics on their namespace
* add missing licenses
* add failed test
* address comment
* feat(dashboard) dashboard/id/datasets endpoint
* schema for dashboard datasets
* list instead of map
* finish dashboard dataset schema
* description
* better test
* add the dataset schema to the schema list
* lint
* refactor out id_or_slug filter logic
* fix(dashboard): accept slug in place of id in url
* remove unnecessary show fields
* fixes and tests
* linting
* linter compliance
* change requests
* names
* fix: add config to disable dataset ownership on the old api
* fix CI docker build
* fix logic
* add deprecation comment on the config
* feat: send alerts reports errors to recipients
* update
* feat(reports): send notification on error with grace
* merge and revert config
* fix lint and MySQL test
* fix mysql tests
* refactor(api): csrf token on the new REST API
* improve OpenAPI spec description
* fix test
* remove public role like has default for all tests
* fix test
* prevent working timeout and grace period from being set to negative numbers
* add extra validation
* lint
* fix black
* fix isort
* add js tests
* fix lint + more python schema validation
* add report schema test for timeout limits
* add extra test for null grace period
* changes to support presto impersionation with ldap
* renamed method to match 30 char limit
* import spell check
* added presto impersonation test
* refactored impersionation code to generalize for extension
* moving config_args mutation to the update_connect_args_for_impersonation
* moving config_args mutation to the update_connect_args_for_impersonation
* nits
* refactored update_impersonation_config method name to match lint rule
* reduced comment line length
* black reformats
Co-authored-by: rijojoseph01 <rijo.joseph@myntra.com>
* Fixing pinot query generation for date format conversion from python datetime format to java simple date format
* Address comments
* fix test
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
* feat(dashboard): get endpoint for a dashboard's charts
* temporary debugging fetch on the frontend
* attempted fixes
* singular -> plural derp
* plural -> singular derp derp
* docstring changes
* change return, no id
* move log above query
* add get_charts to include_route_methods /)_-)
* add get charts api
* result not response
* refactor test helper function to a mixin
* add test for new endpoint
* fix test when running in isolation
* correct comment
* rename test
* more tests, handle dashboard not found
* simplify test to use new helper function
* remove debugging code from frontend
* update docstring
* attempt a doc fix
* add id to api docs
* fix docs
* use pytest fixture
* why oh why does test order matter here, idk
* writing a schema for the endpoint
* more efficient fetching of charts
* testing tweaks
Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
* Add Time Filter component
* Improve Time Filter component
* Fix import errors
* Display Time Filter
* Remove console logs
* Change Control Panel
* Remove unnecessary files
* Use time range override
* test: fix tests
* feat: re run pipeline
* fix: fix some case for Time filter
* fix: merge with master
* use original time range
* fix height
* add cross filter behavior
* apply filters on initialization
* add applied filter to overrides
* add unit tests for merge_extra_form_data
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
* test: dashboard_view_test failing
* test: tests works first time
* fix: pre-commit and some refactoring
* fix: after CR
* fix: replace not_published with draft
* fix: after CR
* fix: pre-commit fixes
* fix: pre-commit and lint fixes
* fix: remove unused
* fix: remove unused import
* fix: wrap the decorator to not block others
* chore: reuse dashboard from decorator into function
* refactor: migrate table chart to new API
* chore: bump superset-ui to 0.17.0
* Fix Cypress tests
* Apply soft-conversion to numeric metrics
Fix time column formatting test
* Add translation to chart does not exist error
* Bump to 0.17.1
* fix: Preserve Column Order in Bar chart
* Update tests/viz_tests.py to use f-strings style
Co-authored-by: Duy Nguyen <duy.nguyenhoang@global-fashion-group.com>
* Async queries: remove force cache param on data retrieval
* Assert equal query_object cache keys
* Decouple etag_cache from permission checks
* Fix query_context test
* Use marshmallow EnumField for validation
* test get_table_names
* test _get_full_name
* add test_split_data_type
* test _show_columns
* add test_is_column_name_quoted
* test select_star
* test get_view_names
* test estimate_statement_cost
* test get_all_datasource_names
* test get_create_view
* test _extract_error_message
* fix typo
* chore: migrate all harmless incubator refs like comments and documentation files
* chore: migrate all superset.incubator.apache.org to superset.apache.org to
* chore: migrate dist.apache.org refs
* chore: removing incubating and Disclaimer
* fix: linting issues
* fix(reports): make name unique between alerts and reports
* add missing migration
* make it work for mySQL and PG only (yet)
* fixing sqlite crazy unique drop
* fixing sqlite missing one col
* fix(report): fix last_eval_dttm sort and more tests
* remove unnecessary permissions and split code path
* remove SIP_34_ALERTS_UI
* disabling an alert that is working will turn it to not triggered
* wip: filter create modal
* add a feature flag
* automatic changes to package lock
* wip
* filter sidebar and basic state management
* move create button to the sidebar
* first step for edit filterconfig
* partially fix tests...
* edits to types and comments
* respect feature flag on the filter sidebar
* add filterconfig form
* get input state working
* feat: tree filter scopes UI
* fix: turn on flag
* sticky filter bar
* stop preferring default export
* feat: finish filter scoping
* fix: under toggle
* fix: title
* fix: add licence
* refactor: update TS
* fix: fix on reopen modal + validation
* new filter bar menu
* adding, but commenting out, bulk scoping action
* adding some placeholder buttons and styles therefor
* feat: add filter chart
* add relative path to package.json
* update modal
* a little input styling... just getting warmed up
* Revert "feat: add filter chart"
This reverts commit b1302d35b6.
* Revert "add relative path to package.json"
This reverts commit 26a7b40e18.
* https package lock idk
* feat: add filter chart
* add relative path to package.json
* flexboxes all the way down
* dynamically generate groupby and datasource in select control
* big wip
* fix target column name
* no importing nonexistent things
* styles and name editing
* Add hook for retrieval of all filter states
* start with a new filter when clicking add filter
* handle removed filters gracefully
* fix incorrect default filter configuration
* add fields to useAllFilterState
* add redux for filterconfigs
* add support for native_filters
* remove consoles
* improve filter removal
* unbreak infinite loop
* basic sidebar toggling working!
* collapsing and menu working more smoothly
* linting
* make dataset and column inputs work
* save filter values properly
* add dashboard event for filter updates
* guarded
* apply filters properly
* fix schema
* making New Filter button a link
* gridunits ftw
* centering modal
* tis not a button anymore! nixing type.
* plus and collapse buttons instead of "more" menu
* updating full size filter icons
* adding icons to filter collapsing/expanding
* turning off animation, but leaving class-based animation css
* fix linting error
* fix native filters for legacy charts
* updates test
* no individual apply buttons
* fix bugs with filter config modal
* remove redundant code
* switch to the filter with validation errors on submit
* separate form validation
* switch config button from add to edit
* update tests
* oops forgot to add the fancy new useChangeEffect hook
* comments and code reorganization
* rename native_filters to extr_form_data and move hook
* disable native filters in viz selector
* add cascading
* implement new extra form data api
* cleanup
* updates tests
* bump npm packages
* fix bad merge on package.json + lock
* lint
* replace in and not in with uppercase
* lint
* lint
* lint
* lint
* bulk test fix
* Sort select input alphabetically
* Change type for sorting elements
* fix rest of unit tests
* make filter operators all uppercase
* Hide Filter bar when there are no filters
* Show edit button for dashboard owners only
* Add visible argument to filters toggle function to avoid future regression
* Improve Toggle filters bar function
* lint
* fix js lint + set createNewOnOpen
* Handle setting extra form data in Filter Bar instead of Filter Control
* Add Handle apply filter function to Apply button
* Allow applying changes instantly
* Fix types
* remove console logs
* Add Error Boundary component to Filter bar and Filter Config Modal
* fix jest tests
* update native filters tests to pass
* reset cypress baseUrl
* remove unnecessary field
* cleanup: remove unused state fields
* move unrelated types to an appropriate location
* remove misplaced resource fetch error logic
* fix cascadeParentIds error
* fix cypress password
* initial attempt at fixing scope issue
* fix bad merge
* fix lint
* trying out makeApi for saving filters
* remove unused import
* fix test
* silence bad test
* add native-filter feat flag config
* oops fix here
* remove space
* Update superset-frontend/src/common/components/index.tsx
Co-authored-by: Evan Rusackas <evan@preset.io>
* Update superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts
Co-authored-by: Evan Rusackas <evan@preset.io>
* use styledMount in tests
* comment
Co-authored-by: Evan Rusackas <evan@preset.io>
* Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar.tsx
Co-authored-by: Evan Rusackas <evan@preset.io>
* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigForm.tsx
Co-authored-by: Evan Rusackas <evan@preset.io>
* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal.tsx
Co-authored-by: Evan Rusackas <evan@preset.io>
* Update superset-frontend/src/dashboard/components/nativeFilters/FilterConfigurationLink.tsx
Co-authored-by: Evan Rusackas <evan@preset.io>
* address PR feedback
* fix package lock
* null guards
* Fix charts resizing
* fix cypress tests
* add in nativefilters to form data
* fix lint and test
Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
Co-authored-by: Simcha Shats <simcha.shats@nielsen.com>
Co-authored-by: amitNielsen <amit.miran@nielsen.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Evan Rusackas <evan@preset.io>
Co-authored-by: Agata Stawarz-Pastewska <agata.stawarz-pastewska@polidea.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* Added migration for logs security converge
* Changed class permission name and method permission in LogModelView and LogRestApi
* Updated recent revision and filename
* Changed name of Log perm in manager. Updated TestRolePermission to have correct menu and permission.
* Updated latest migration revision
* Updated latest migration revision
* Changed security permissions for annotations and annotation layers
* Updated permissions in annotation layers list
* Created test for retrieving premissions info. Updated uris from f-strings to strings
* Updated annotations in security_tests and added annotations to NEW_SECURITY_CONVERGE_VIEWS
* Added migration for annotations security converge
* Updated current revision after rebase master
* Updated migration name to annotations security converge
* Updated annotations permissions names in AnnotationLayersList and updated test since 'can_write' has wider permissions
* Updated annotations migration to current
* feat: add hook for dataset health check
* add event log
* optimize datasource json data like certified data
* add unit test
* fix review comments
* extra code review comments
* Added energy usage fixture. Updated dashboard utils and unicode fixture with new method parameters.
* Add energy fixture to tests/access_tests.py
* Add energy fixture to tests/core_tests.py
* Add energy fixture to tests/dashboard_tests.py
* Add energy fixture to tests/datasets/api_tests.py
* Add energy fixture to tests/db_engine_specs/base_engine_spec_tests.py
* Add energy fixture to tests/import_export_tests.py
* Add energy fixture to tests/model_tests.py
* Add energy fixture to tests/query_context_tests.py
* Add energy fixture to tests/security_tests.py
* Add energy fixture to tests/charts/api_tests.py
* Changed formatting of slices' parameters in energy usage fixture
* Removed loading energy udage data from test conf file
* Add energy fixture to tests/databases/api_tests.py
* Fixes after review: removed isort:skip, load_charts->load_energy_charts, removed unused import.
* Added energy fixture to tests/charts/commands_tests.py and retrieving proper Slice by name
* Fixed charts/api_tests.py to use energy_usage from fixtures
* Fixed datasets/commands_tests.py to retrieve dataset by name and use energy_usage fixture
* Changed energy usage data to generated data and fixed chart tests which was checking energy usage data
* fix(reports): expect more exceptions and fix validator config
* use a state pattern on command reports
* use a state pattern on command reports continue
* fix multiple heads
* fix unittests
* add more tests
* fix api tests after enum rename
* fix alembic multiple heads
* fix tests
* fix fixture cleanup
* fix mysql tests
* fix initial and not found state
* fix schema, and private public methods, addressing comments
* add new col to the API
* Support SET & SHOW commands as read only SQL commands
* Move is_readonly definition into the engine spec
* Rename & use super()
Co-authored-by: bogdan kyryliuk <bogdankyryliuk@dropbox.com>
* Added possibility to not change dashboards connection when chart is changed
* Added two chart unit tests which checks if dashboards properly change on update
* feat(saved queries): security perm simplification
* migration script and frontend
* add downgrade procedure
* downgrade procedure, inferred from the upgrade data
* fix JS test
* improve code
* add tests for role migration
* more tests and a short description for each one
* Improve readability
* simplify dataclass creation
* fix dataclass
* fix: delete chart or dashboards with assoc reports
* database constraint to reports and tests
* add tests for dashboards and database
* fix exceptions default text
* feat(reports): scheduler and delivery system
* working version
* improvements and fix grace_period
* add tests and fix bugs
* fix report API test
* test MySQL test fail
* delete-orphans
* fix MySQL tests
* address comments
* lint
* 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