Commit Graph

1293 Commits

Author SHA1 Message Date
Amit Miran 62a8f2e193
chore(python-testing): move memoized tests to unit tests (#15507)
* 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
2021-07-12 10:00:18 +03:00
Beto Dealmeida 4f5f9287fc
feat: validate_parameters for GSheets (#15578)
* feat: validate_parameters for GSheets

* Move import inside fixture

* Update deps

* Rename parameter
2021-07-08 08:26:39 -07:00
Yongjie Zhao ae160f7f21
chore: add changed_on_delta_humanized field on dashboard schema (#15542)
* chore: add changed_on_delta_humanized field on dashboard schema

* fix ut
2021-07-07 14:59:49 -07:00
Beto Dealmeida 8f92618e46
fix: show all dbs in available endpoint (#15534) 2021-07-02 12:58:36 -07:00
Elizabeth Thompson 80b8df0673
quote column name if db requires (#15465)
Co-authored-by: hughhhh <hughmil3s@gmail.com>
2021-07-02 12:48:24 -05:00
Hugh A. Miles II d4480f5c9a
feat: Database Connection UI (#14881) 2021-07-01 14:40:27 -07:00
ofekisr b5119b8dff
refactor(tests): decouple unittests from integration tests (#15473)
* refactor move all tests to be under integration_tests package

* refactor decouple unittests from integration tests - commands

* add unit_tests package

* fix celery_tests.py

* fix wrong FIXTURES_DIR value
2021-07-01 18:03:07 +03:00
Beto Dealmeida e606477ec1
feat: more SIP-40 errors (#15482) 2021-06-30 16:32:59 -07:00
John Bodley ffa51753e3
refactor: Moving get_user_datasources to security manager (#15467)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-07-01 04:51:11 +12:00
Yongjie Zhao 61e6b7017b
fix: nvd3 bar chart sortby metric (#15318) 2021-06-30 19:36:05 +08:00
Yongjie Zhao 292bce5862
fix: raise unexpected error when orderby is empty (#15353)
* fix: raise unexpected error when orderby is empty

* fix ut
2021-06-30 19:34:54 +08:00
AAfghahi 743d9cc928
feat: Better Errors in SQL Lab (#15432)
* 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
2021-06-29 16:48:27 -07:00
Ville Brofeldt ab7f31fd85
Revert "refactor(feature_flags configurations): remove redundant additional configuration for default vales (#15425)" (#15448) 2021-06-29 16:52:01 +03:00
ofekisr 486b8d911f
refactor(feature_flags configurations): remove redundant additional configuration for default vales (#15425) 2021-06-28 16:30:13 +03:00
Kamil Gabryjelski 09c44d05fd
feat(native-filters): Hide non-numeric columns in numeric range filter (#15385)
* feat(native-filters): Hide non-numeric columns in numeric range filter

* Return true if type_generic undefined

* Code review comments

* Replace any with string

* fix tests

* add missing columns to select

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-06-27 07:35:17 +03:00
Beto Dealmeida 241ee32f56
feat: custom error SQL Lab timeout (#15342)
* feat: custom error SQL Lab timeout

* Update test
2021-06-24 08:02:49 -07:00
Beto Dealmeida 4b00c152cc
feat: implement specific errors for SQL Lab (#15206)
* RESULTS_BACKEND_NOT_CONFIGURED_ERROR

* DML_NOT_ALLOWED_ERROR

* INVALID_CxAS_QUERY_ERROR

* Fix lint

* Add more tests
2021-06-23 07:58:20 -07:00
Beto Dealmeida 216e2b8e8e
fix: datasource payload is incorrect (#15184)
* fix: datasource payload is incorrect

* Add tests, clean code
2021-06-23 06:59:34 -07:00
Elizabeth Thompson 58cc78d2c1
fix: return query if it already exists (#15207)
* check if query exists before saving a new one

* fix test
2021-06-22 13:57:37 -07:00
Ben Reinhart ab153e66cc
feat: Synchronously return cached charts (#15157)
* feat: Synchronously return cached charts

* Fix lint issue

* Fix python lint error

* Change getChartDataRequest to return response

* Fix lint errors

* Add test

* explore_json: skip cached data check for forced refresh

Co-authored-by: Rob DiCiuccio <rob.diciuccio@gmail.com>
2021-06-22 10:00:57 -07:00
Ville Brofeldt 822eb2e27e
feat(sql): add jinja support to metrics and expressions (#15247)
* feat(sql): add jinja support to metrics and expressions

* add test
2021-06-19 08:29:04 +03:00
Daniel Wood a1027152ba
add ascend engine spec (#14682) 2021-06-18 10:35:55 -07:00
Ville Brofeldt 1269cc2f88
fix(examples): calendar chart metric should be metrics (#15173)
* fix(examples): calendar chart metric should be metrics

* fix presto test
2021-06-17 14:55:50 +03:00
Ville Brofeldt 83602923f5
feat(api): add featured datatypes to dashboard dataset ep (#15188) 2021-06-16 12:36:11 +03:00
Beto Dealmeida 75018bf99f
fix: Presto postgres test (#15163) 2021-06-15 07:10:50 -07:00
Beto Dealmeida 90d9097841
fix: validate DB-specific parameters (#15155)
* fix: validate DB-specific parameters

* Fix lint

* Update test

* Fix lint/test

* Fix lint

* Update superset/databases/api.py
2021-06-14 18:44:18 -07:00
Beto Dealmeida cc2b4fe3f4
fix: show custom errors in SQL Lab (#14959)
* fix: show custom errors in SQL Lab

* Fix lint

* Fix test

* Update superset/views/base.py

Co-authored-by: ʈᵃᵢ <tai@apache.org>

* Fix lint

* Debug failing test

* Remove print()

* Debug flaky tests

* Fix test

Co-authored-by: ʈᵃᵢ <tai@apache.org>
2021-06-10 15:20:31 -07:00
Beto Dealmeida 42cb5266fa
fix: import metrics with extra (#15047)
* fix: import metrics with extra

* Fix test
2021-06-08 18:56:55 -07:00
Daniel Vaz Gaspar 4e998e62fc
feat: add more timeout configuration on screenshots (#14868)
* feat: more timeout configuration on screenshots

* add tests
2021-06-08 15:33:42 +01:00
Beto Dealmeida 8e7f0237ab
fix: apply template_params on external_metadata (#14996)
* fix: apply template_params on external_metadata

* Fix test
2021-06-04 18:12:22 -07:00
Yongjie Zhao 723a67156c
fix: time parser truncate to first day of year/month (#14945) 2021-06-02 21:26:37 +08:00
Yongjie Zhao f4de0dcb65
fix: is_temporal should overwrite is_dttm (#14894)
* fix: is_temporal should overwrite is_dttm

* move up
2021-06-02 18:00:15 +08:00
rijojoseph07 a85f5c1344
feat(trino): add support for user impersonation (#14843)
* trino impersonation feature

* Extra options label update

* Update superset/db_engine_specs/trino.py

Co-authored-by: Đặng Minh Dũng <dungdm93@live.com>

Co-authored-by: rijojoseph01 <rijo.joseph@myntra.com>
Co-authored-by: Đặng Minh Dũng <dungdm93@live.com>
2021-05-29 09:54:18 +03:00
Hugh A. Miles II 8f81fc0ad7
fix: Redshift parameters not rendering (#14888)
* Update redshift.py

* Update api_tests.py

* fixed test

* add file back
2021-05-28 12:57:15 -04:00
Beto Dealmeida 2313e3ef4f
fix: show error on invalid import (#14851)
* fix: show error on invalid import

* Add unit test

* Remove unused imports

* Fix tests
2021-05-27 14:46:41 -07:00
Beto Dealmeida 8febd81baf
feat: validate database parameters (#14883) 2021-05-27 14:46:28 -07:00
Hugh A. Miles II ae8378a50e
fix: Big Query Edit Form (#14850)
* fix big quert edit form

* fix test

* fix api test

* fix test
2021-05-26 16:13:26 -04:00
Beto Dealmeida 8b1a117d24
feat: return parameters only for DB with default driver (#14803)
* WIP

* Fix sorting of DBs
2021-05-25 14:46:54 -07:00
Hugh A. Miles II c72894725e
fix: Fix Big Query API for POST w/ no parameters (#14822)
* Update schemas.py

* Update bigquery.py

* Fix tests

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-05-25 17:13:17 -04:00
AAfghahi 904b60e420
chore: added BasicParametersMixin to Redshift (#14752)
* redshift basic mixin and tests

* rebased

* forgot prefix
2021-05-24 17:32:53 -04:00
Hugh A. Miles II 6d33432b58
feat: Create BigQuery Parameters for DatabaseModal (#14721) 2021-05-23 12:45:48 -04:00
Ben Reinhart a06a2f30af
fix: Set g.user to anon user in Celery (#14742)
* Set g.user to anon user in Celery

* Add test

* Fix bug in logic
2021-05-21 14:33:08 -07:00
Ben Reinhart d5c008dd99
chore: Perform feature/config condition checks at request time (#14684)
* chore: conditional Home link rendering

* chore: conditional RowLevelSecurity rendering

* chore: Conditional KV rendering

* chore: Conditional TagView rendering

* chore: Conditional import dashboards link

* chore: Conditional upload csv/excel links

* chore: Conditional log api and view rendering

* chore: Conditionally render email schedules

* chore: Conditionally render alert views

* chore: Conditionally render alerts/reports

* chore: Conditionally render access requests

* chore: Conditionally render druid views

* Remove unnecessary folder

* Consistent naming

* Cleanup

* Remove object from class

* Clean up test file

* Clean up test file

* Fix lint error

* Better naming and follow conventions

* Use assertLess over assertNotEqual

* Assert less than 400

* Fix failing test
2021-05-21 14:29:52 -07:00
cccs-jc 590fe20a45
feat: Add a remove filter_flag to jinja filter_values function (#14507)
Implementation issue 13943

Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
2021-05-21 19:37:09 +03:00
Ville Brofeldt 7c17b1a97f
fix(pivot): default missing series to NULL_STRING (#14748) 2021-05-21 18:54:15 +03:00
AAfghahi 67e373000e
feat: Expanded Parameters for Mysql (#14680)
* added mysql form

* revisions

* Update superset/db_engine_specs/mysql.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* added ssl and mysql testing

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-05-19 08:47:33 -07:00
Beto Dealmeida 5e95d4638c
fix: import dataset with extra; Vertica URI (#14698)
* fix: import dataset with extra; Vertica URI

* Fix lint
2021-05-18 20:51:33 -07:00
Ajay M 90378ed94e
fix(explore): #10098 boolean filter not working (#14567)
* 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
2021-05-18 14:39:19 -07:00
Beto Dealmeida 971f5883f0
feat: add SSL to new DB parameters (#14673)
* feat: add SSL to new DB parameters

* Fix test

* Raise if cls.encryption_parameters is empty
2021-05-17 21:27:43 -07:00
AAfghahi 852842028a
make config method optional (#14668) 2021-05-17 17:09:20 -04:00
Ben Reinhart eb9dafc872
chore: Register dynamic plugins and add feature checks (#14650)
* chore: Register dynamic plugins and add feature checks

* Disable pylint warning
2021-05-17 11:18:56 -07:00
AAfghahi 4f5c537250
feat: Configuration Method and expanded parameters for Database Model (#14451)
* 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>
2021-05-14 18:19:17 -07:00
Beto Dealmeida ba5d66cb0a
fix: DB parameter validation (#14636) 2021-05-14 14:07:34 -07:00
Ben Reinhart 6d9d362ca8
chore: use before_request hook for dynamic routes (#14568)
* 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
2021-05-14 12:49:25 -07:00
Hugh A. Miles II 3a81e6aee8
change name to Basic instead of Base (#14625) 2021-05-13 15:05:37 -04:00
Ville Brofeldt 3f6bd1e4a4
feat: add generic type to column payload (#14547)
* feat: add generic type to column payload

* feat: add generic type to column payload

* xit flaky test
2021-05-13 09:36:09 +03:00
Beto Dealmeida 31f406a526
feat: API endpoint to validate databases using separate parameters (#14420)
* feat: new endpoint for validating database parameters

* Rebase

* Remove broken tests
2021-05-12 18:32:10 -07:00
Daniel Vaz Gaspar 7a95f8f839
fix: flaky test on reports (#14544) 2021-05-10 13:27:12 +01:00
Ville Brofeldt 66a4c94a1e
fix(chart-data): handle url_params in csv export and native filters (#14526) 2021-05-07 21:07:44 +03:00
Ville Brofeldt d1d98d81b0
feat(dremio): implement convert_dttm method (#14519) 2021-05-07 15:31:58 +03:00
David Aaron Suddjian 21cf12a480
chore(dashboard): Integrate dashboard app into the SPA bundle (#14356)
* 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
2021-05-04 08:51:17 -07:00
Duy Nguyen Hoang 9a22fb00d9
fix: CSV Export permission is not consistent (#13713) 2021-05-04 10:19:58 +03:00
Erik Ritter e05a70fc82
fix: dashboard changed on calculation (#14450) 2021-05-03 13:55:34 -07:00
Ville Brofeldt 2f9efb2e23
add migration (#14446) 2021-05-03 15:32:48 +03:00
AAfghahi 7466595563
fix: fixing mysql error message (#14416)
* fixing mysql error message

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update tests/db_engine_specs/mysql_tests.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/db_engine_specs/mysql.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* fixed broken test

* changed error type

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-04-30 15:15:37 -07:00
AAfghahi e507508b48
feat: Logic added to limiting factor column in Query model (#13521)
* Sqllab limit

* Add migration script

* Set default values

* initial push

* revisions

* Update superset/views/core.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* moving migration to separate PR

* with migration

* revisions

* Fix apply_limit_to_sql

* all but tests

* added unit tests

* revisions

* Update superset/sql_lab.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* Update superset/sql_parse.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* fixed black issue

* Update superset/views/core.py

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* updated logic

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-04-30 15:15:18 -07:00
Erik Ritter bc47bc8f66
feat: Add etag caching to dashboard APIs (#14357) 2021-04-29 14:14:26 -07:00
Daniel Vaz Gaspar 6541a03d0b
fix: SQLLab role permissions (#14372)
* fix: SQLLab role permissions

* add missing perm

* fix tests

* fix security test

* fix security test

* fix tests
2021-04-29 15:58:08 +01:00
Ben Reinhart e7f5100833
fix: Fix unintended cache misses with async queries (#14291)
* bug: Fix unintended cache misses with async queries

* Ensure sort order

* Ensure columns are sorted

* Update failing tests
2021-04-28 12:14:55 -07:00
John Bodley d8bb2d3e62
refactor(db_engine_specs): Removing top-level import of app (#14366)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-04-28 15:47:32 +12:00
Ben Reinhart 2a1235c0c2
fix: Cleanup serialization and hashing code (#14317) 2021-04-26 14:04:40 -07:00
Daniel Vaz Gaspar 45e209d487
fix: flaky test for alerts and reports (#14347) 2021-04-26 18:56:48 +01:00
John Bodley b0f8f6b6ad
fix(hive): Use parquet rather than textfile when uploading CSV files to Hive (#14240)
* 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>
2021-04-24 18:17:30 +12:00
John Bodley a8781c5313
fix(hive): Update CSV to Hive upload prefix (#14255)
* fix(hive): Update CSV to Hive upload prefix

* Trigger notification

Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-04-24 13:20:31 +12:00
Beto Dealmeida e7ad03d44f
feat: add endpoint to fetch available DBs (#14208)
* feat: add endpoint to fetch available DBs

* Fix lint
2021-04-23 10:51:47 -07:00
Beto Dealmeida ffcacc3393
fix: new import/export CLI (#13921)
* fix: CLI for import/export

* Add tests

* Remove debug
2021-04-23 10:50:49 -07:00
Daniel Vaz Gaspar 38a7c537ff
feat: add alerts & reports to docker compose (#14267)
* feat: add alerts & reports to docker compose

* change to firefox

* add missing package
2021-04-22 17:42:52 +01:00
Beto Dealmeida 5d3191bb61
feat: catch errors on do_ping (#14250) 2021-04-21 18:43:40 -04:00
Jesse Yang 2dd20df03d
fix(dashboard): draft dashboards should be viewable (#14207)
* fix(dashboard): draft dashboards should have open access

* Remove a duplicate test
2021-04-21 09:54:51 -07:00
Hugh A. Miles II 392d8a8107
fix: Handle bad permission errors for bigquery test connections (#14147)
* starter make file

* yea

* move messaging to config

* Delete Makefile

* remove

* checkout

* check for db generic errors

* checkout bad files

* add proper message

* add docs for new permissions codes

* Update superset/errors.py

Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>

* Update superset/errors.py

Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>

* rename var

* starter regex

* fix

* fix

* fix linting

* update test

* yerp

* fixed test

* added regex

* Apply suggestions from code review

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>

* address comments

* update docs

* prettier

* fux

* add space

* Update errors.py

* Update types.ts

Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-04-20 19:19:36 -04:00
Ville Brofeldt 55bf72aead
chore(prophet): bump prophet to 1.0.1 (#14228) 2021-04-20 15:55:55 +03:00
Ville Brofeldt 0807ab44a5
fix(native-filters): merge_extra_form_data extras processing (#14244)
* fix: merge_extra_form_data extras processing

* move props that are later moved back in viz.py
2021-04-20 14:24:33 +03:00
Beto Dealmeida 13bf023100
feat: improve engine spec discoverability (#14204)
* feat: improve engine spec discoverability

* Address comments

* Fix tests
2021-04-19 17:24:22 -07:00
Đặng Minh Dũng 11e0f4cb2d
feat: TrinoEngineSpec.adjust_database_uri (#14122)
* feat: TrinoEngine implement adjust_database_uri

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>

* test: TrinoEngine implement adjust_database_uri

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
2021-04-19 13:10:12 +03:00
Beto Dealmeida c7112d1c48
feat: error messages for Presto connections (#14172)
* chore: rename connection errors

* feat: error messages for Presto connections

* Add unit tests

* Update docs/src/pages/docs/Miscellaneous/issue_codes.mdx

Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>

Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>
2021-04-16 15:49:47 -04:00
AAfghahi df04c3af21
feat: error messages when connecting to mssql (#14171)
* database errors for mssql

* revisions
2021-04-16 09:43:42 -07:00
Craig Rueda a49e0b2037
feat: Adding encrypted field factory (#14109)
* 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>
2021-04-16 09:01:18 -07:00
Lily Kuang df7e2b6a8e
feat(alert/report): chart as csv format attachment for email and slack (#13828)
* 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>
2021-04-15 14:07:49 -07:00
Beto Dealmeida 21c6efea67
chore: rename connection errors (#14169) 2021-04-15 10:57:02 -07:00
AAfghahi eadff5f41e
feat: invalid DB name error messages (MySQL/Postgres/Redshift) (#14146)
* initial DB custom errors for mysql

* added redshift and postgres
2021-04-15 08:02:47 -07:00
simcha90 8ef572a412
refactor(native-filters): update dataMask and ExtraFormData schema (#13983)
* refactor: updates usage of `ownFilters` to `ownState`

* refactor: update dataMask (final)

* lint: fix lint

* refactor: revert feat

* fix: fix missed chart configuration

* add filter set migration

* apply new changes

* fix migration revision

* update migration

* fix jest mock

* js lint

* fix test types

* update tests and types

* remove append_form_data from tests

* fix findExistingFilterSet tests

* add migration test

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-04-15 17:43:29 +03:00
Beto Dealmeida 21f973f0bd
feat: error messages when connecting to MSSQL (#14093)
* feat: error messages when connecting to MSSQL

* Address comments
2021-04-14 10:57:58 -07:00
AAfghahi 321db4674d
feat: invalid hostname and password error messages (Redshift) (#14111)
* custom errors for redshift

* added unit tests and custom errors
2021-04-13 21:20:47 -07:00
AAfghahi b77477a9dd
feat: invalid hostname and password error messages (MySQL) (#14089)
* custom errors for mySQL

* initial custom errors and tests for MySQL

* revisions
2021-04-13 14:42:31 -07:00
Hugh A. Miles II 4b23d0ecca
fix: logs table - user_id is NULL (#14057)
* add user back to session

* add test for logging None on exceptions

* fix this updated test

* reformat

* reformat

* Update log.py
2021-04-13 10:08:34 -04:00
Amit Miran 8c5b6b1263
feat(dashboard_rbac): provide data access based on dashboard access (#13992)
* feat: provide data access based onb dashboard access

* chore: adjust code after CR comments

* fix: add brackets

* fix: type

* chore: add tests

* fix: pre-commit

* fix: pre-commit and lint

* fix: fix test

* fix: pre-commit

* fix: fix local pylint warnings

* revert: birth_names pylint  change bc it  affects tests

* Update superset/security/manager.py

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Update superset/security/manager.py

* Update tests/utils_tests.py

* fix: after CR

* fix: after CR from ville

* chore: update roles description

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2021-04-13 16:23:31 +03:00
Ville Brofeldt 15ac075b78
fix(sqla): labels_expected contains mutated label (#14095) 2021-04-13 16:19:52 +03:00
Amit Miran 9c5264af0d
feat(can_share): can share chart and dashboard (#14076)
* feat: share chart  - can_share_chart
share dashboard can_share_dashboard

* fix: pre-commit

* fix: userCanShare tests

* fix: after hugh CR

* fix: adjust after spa refactor
2021-04-13 13:54:14 +03:00
Phillip Kelley-Dotson 4bb29b6f04
chore(spa refactor): refactoring dashboard to use api's instead of bootstrapdata (#13306)
* 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>
2021-04-12 16:10:29 -07:00
Beto Dealmeida 786dadc836
feat: invalid password error message (Postgres) (#14038) 2021-04-12 14:03:21 -07:00
Hugh A. Miles II c563ea091e
fix: flacky test in test_update_dataset_item_w_override_columns (#14082)
* fix flack test

* fix flack test
2021-04-12 16:45:50 -04:00
Lily Kuang 7980b767c0
feat: Implement Celery SoftTimeLimit handling (#13740)
* log soft time limit error

* lint

* update test
2021-04-12 13:18:17 -07:00
Sam Faber-Manning 911462a148
feat: only send alert error emails to owners of the alert (#13862)
* only send alert error emails to owners of the alert

* reformat long lines

* fix send to owners and add tests

* fix pylint errors

* fix formatting
2021-04-12 08:51:32 -07:00
Hugh A. Miles II a4fd6b8f33
fix: Use superset generic db to catch external_metadata queries (#13974) 2021-04-10 10:15:03 -04:00
Erik Ritter 3d357c661c
feat: handle chart/data API errors (#14040) 2021-04-09 09:39:02 -07:00
John Bodley a3b41e2bac
fix: Issue 13956 (#13980)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-04-09 15:21:58 +12:00
Beto Dealmeida c60a93db9c
feat: add extract_errors to Postgres (#13997)
* feat: add extract_errors to Postgres

* Add unit tests

* Fix lint

* Fix unit tests
2021-04-08 13:24:54 -07:00
AAfghahi b5e5b3aa62
feat: create backend routes and API for importing saved queries (#13893)
* 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>
2021-04-08 14:20:11 -04:00
Rob DiCiuccio 6a81a7961c
feat: Support feature flag overrides in ephemeral test envs (#14008)
* Add support for feature flag overrides in ephemeral env cmd

* update docs to reference correct config

* Update ephemeral env docs
2021-04-08 11:05:59 -07:00
Daniel Vaz Gaspar 89817d4cee
fix(alerts/reports): working timeout with celery kill and logic fix (#13911)
* fix: working timeout with celery kill and logic fix

* add config flags

* fix typo

* fix python lint

* log query time for alerts

* add tests

* fix lint
2021-04-08 11:23:31 +01:00
Beto Dealmeida a82d72fef6
feat: initial work to make v1 API compatible with SIP-40 and SIP-41 (#13960)
* WIP

* Use errorhandler

* Add response schema

* Fix status on HTTPException

* s/found/encountered/g

* Fix test

* Fix lint

* Fix lint and test
2021-04-06 22:06:32 -07:00
Beto Dealmeida 3b11654c5a
fix: import dataset/dashboard empty keys (#13979) 2021-04-06 20:55:15 -07:00
Phillip Kelley-Dotson 34991f5fab
fix(explore): strip semicolons in virtual table SQL (#13801)
* 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>
2021-04-06 13:40:34 -07:00
Hugh A. Miles II f291ba05c6
fix: SQL -> Explore Overwrite flow (#13946) 2021-04-05 14:52:04 -04:00
Jesse Yang 4789074309
fix(sqla-query): order by aggregations in Presto and Hive (#13739) 2021-04-01 18:10:17 -07:00
Lily Kuang 762101018b
feat(alert/report): add ALERTS_ATTACH_REPORTS feature flags + feature (#13894)
* 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>
2021-04-01 13:06:45 -07:00
Ben Reinhart ca506e9396
fix(#13378): Ensure g.user is set for impersonation (#13878) 2021-03-31 11:22:56 -07:00
Jack Fragassi 304e3b36eb
feat(alerts & reports): Easier to read execution logs (#13752)
* 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
2021-03-30 08:46:16 -07:00
Ben Reinhart 55ba47ec2e
fix(#13734): Properly escape special characters in CSV output (#13735)
* fix: Escape csv content during downloads

* Reuse CsvResponse object

* Use correct mimetype for csv responses

* Ensure that headers are also escaped

* Update escaping logic
2021-03-26 15:22:00 -07:00
Ville Brofeldt 5ae91e2dd8
feat(rls): enable row level security by default (#13772) 2021-03-26 17:40:41 +02:00
Elizabeth Thompson 086238fb10
feat: sort time grain configs (#13720)
* sort time grain configs

* Fix lint

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-03-25 18:00:52 -07:00
Ville Brofeldt 13f7e0d755
feat(native-filters): add temporal support to select filter (#13622) 2021-03-18 16:15:43 +02:00
Lily Kuang 3f2e2c9976
fix(alert|report): allow null on chart and dashboard field (#13680)
* allow null on chart and dashboard field

* update api test
2021-03-18 09:17:50 +00:00
Beto Dealmeida db57f90a34
feat: better error message when adding DBs (#13601)
* WIP

* Adding tests

* Add unit tests

* Show error message

* Fix lint

* Fix after rebase
2021-03-17 20:29:26 -07:00
Jesse Yang bd1d6acb0c
fix(query): order by adhoc metrics should trigger group by (#13434)
* 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
2021-03-16 21:00:03 -07:00
ʈᵃᵢ 3078c84d40
feat(reports): SLACK_API_TOKEN as callable or str (#13634) 2021-03-16 10:06:29 -06:00
Daniel Vaz Gaspar 1e88408418
fix: better handle datasource exceptions (#13578)
* fix: handle datasource injected security exception

* add tests

* fix error text on create update dbs

* fix lint

* revert create update message

* fix test

* add sqlalchemy exceptions
2021-03-15 22:46:51 +00:00
Nikola Gigić 335415f5a2
dynamic dttm fix for test_convert_dttm (#13626) 2021-03-15 23:14:50 +02:00
Daniel Vaz Gaspar d1e93078f4
fix: delete dataset columns and metrics on the REST API (#13389)
* 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
2021-03-15 18:14:26 +00:00
Erik Ritter 06d6d7f8e2
fix: ParsedQuery subselect edge case (#13602) 2021-03-12 14:54:02 -08:00
Nikola Gigić 609c3594ef
feat(explore): Postgres datatype conversion (#13294)
* test

* unnecessary import

* fix lint

* changes

* fix lint

* changes

* changes

* changes

* changes

* answering comments & changes

* answering comments

* answering comments

* changes

* changes

* changes

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests
2021-03-12 10:36:43 +02:00
David Aaron Suddjian 1b95ed7267
feat(dashboard): dashboard/id/datasets endpoint (#13523)
* 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
2021-03-11 17:43:33 -08:00
Srini Kadamati bebac5921b
feat: add connector for CrateDB (#13152)
* feat: add connector for CrateDB

* added crate

* fix PyPI reference

* add tests

* added more clarity on installing crate

* fix test

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-03-11 23:03:22 +02:00
Jesse Yang b9884fb55b
fix: `IS NULL` filter operator for numeric columns (#13496) 2021-03-10 10:15:25 -08:00
Ville Brofeldt 375797f649
feat(native-filters): add timegrain and column filter (#13484)
* feat(native-filters): add timegrain and column filter

* add fetch values predicate

* bump deps

* lint

* fix test

* add python test for legacy merge

* fix default value and isInitialized to not check strict equality

* Address comments

* add FilterValue type

* address review comments
2021-03-09 17:27:46 +02:00
Hugh A. Miles II c91c45574b
feat: add event_logger to test_connection and create_database commands (#13468)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-03-09 08:17:13 -05:00
Daniel Vaz Gaspar 139c7878a5
fix(alerts&reports): add celery soft timeout support (#13436)
* fix(alerts&reports): add celery soft timeout support

* make a specific exception for screenshots timeout

* fix docs, add new test
2021-03-08 14:21:18 +00:00
Hugh A. Miles II b17e7aa5c9
feat: refactor on DBEventLogger to allow for context management (#13441)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2021-03-05 15:12:42 -05:00
David Aaron Suddjian 491fbd16f7
fix(dashboard): Get dashboard by slug (#13352)
* 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
2021-03-05 10:11:21 -08:00
Beto Dealmeida 9fc03f0424
fix: API to allow importing old exports (JSON/YAML) (#13444)
* fix: fix API to allow importing old exports (JSON/YAML)

* Fix test

* Fix lint

* Add description to API schema
2021-03-04 17:18:27 -08:00
Beto Dealmeida 528ea9cbb0
fix: SHOW is not DML (#13464)
* fix: SHOW is not DML

* Fix test
2021-03-04 17:17:25 -08:00
Daniel Vaz Gaspar c3c73763d0
fix: url shortener invalid input (#13461)
* fix: url shortner invalid input

* fix lint
2021-03-04 20:46:45 +00:00
Mayur 8b38d63b7d
changes added (#13431) 2021-03-03 13:52:54 +02:00
John Bodley 694ae6f90e
fix(query-object): extra time-range-endpoints (#13331)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-03-03 13:22:07 +13:00
Ville Brofeldt 70e12ed27d
chore: bump pyarrow and pandas (#12882)
* bump pyarrow and pandas

* remove df copy
2021-03-02 19:44:53 +02:00
Beto Dealmeida 08183dfe57
feat: add unit test for LimitMethod.FETCH_MANY (#13364) 2021-03-01 10:55:37 -08:00
Beto Dealmeida 892eef1af6
feat: add Firebird DB engine spec (#13353)
* feat: add Firebird DB engine spec

* Add dep to setup.py

* Fix lint

* Add tests

* Remove uneeded code

* Fix old bug
2021-02-26 12:07:27 -08:00
Yongjie Zhao 94d0bb9e7f
fix: date picker support date unit with singular and plural (#13330)
* fix: date picker support date unit with singular and plural

* fix grammar
2021-02-25 17:38:23 +08:00
Daniel Vaz Gaspar 0b114fcbc5
feat(reports): send notification on error with grace (#13135)
* 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
2021-02-24 13:31:31 -08:00
Ville Brofeldt 0a00153375
feat(chart-data): add rowcount, timegrain and column result types (#13271)
* feat(chart-data): add rowcount, timegrain and column result types

* break out actions from query_context

* rename module
2021-02-24 07:43:47 +02:00
Daniel Vaz Gaspar 6e3121268e
fix(alerts): Handle None on results (#13289) 2021-02-23 09:50:55 +00:00
Daniel Vaz Gaspar 9e2455aab7
refactor(api): csrf token on the new REST API (#13212)
* 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
2021-02-23 09:50:22 +00:00
Karol Kostrzewa a5a31e0e60
fix schedules tests (#12870)
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-02-22 22:21:19 -08:00
Karol Kostrzewa 974f4476e5
fix reports/commands_tests (#12864)
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2021-02-22 14:53:14 -08:00
Moriah Kreeger fc180ab2a6
fix: add alert report timeout limits (#12926)
* 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
2021-02-22 11:12:10 -08:00
rijojoseph07 efeb5a93e6
feat(presto): add support for user impersonation (#13214)
* 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>
2021-02-22 15:01:33 +02:00
Lily Kuang d8bd8ec896
fix(alert/report): alert modal loading dropdown options (#13222)
* alert modal loading

* add ui test
2021-02-22 01:59:33 +00:00
Xiang Fu 786c12d52d
fix: Fixing pinot query generation for date format conversion from python datetime format to java simple date format (#13163)
* 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>
2021-02-20 08:26:34 +02:00
Beto Dealmeida 3d23adec5e
chore: use shillelagh instead of gsheetsdb (#13185)
* chore: use shillelagh instead of gsheetsdb

* Fix tests

* Clean up code and remove duplication

* Fix test

* Tighten dep
2021-02-18 09:48:18 -08:00
Daniel Vaz Gaspar 4c544500a7
fix(api): apply dashboard filter to get dash charts API (#13173)
* fix(api): apply dashboard filter to get dash charts API

* lint
2021-02-17 13:42:07 -08:00
Daniel Vaz Gaspar 13a5b439fe
feat(alerts): apply SQL limit to all alerts (#13150)
* feat(alerts): apply SQL limit to all alerts

* change limit to 2 and test

* undo mock

* mock, mock and mock

* lint
2021-02-17 18:03:35 +00:00
Daniel Vaz Gaspar 9568985b7b
fix: engines that don't support comments (#13153)
* fix: engines that don't support comments

* fix: engines that don't support comments

* add quick inexpensive test

* add test
2021-02-17 18:01:34 +00:00
Ville Brofeldt d8c32b8097
fix(chart-data-api): support numeric temporal columns (#13138) 2021-02-16 09:51:22 +02:00
David Aaron Suddjian cc9103b0e2
feat(dashboard): API to get a dashboard's charts (#12978)
* 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>
2021-02-15 11:41:59 -08:00
Daniel Vaz Gaspar 2e6ea76631
fix(alerts): void query with numeric comparison (#13090)
* fix(alerts): void query with numeric comparison

* remove config changes

* fix tests

* better logic

* fix logic

* fix logic

* Improve test readability
2021-02-15 17:09:47 +00:00
Đặng Minh Dũng 2dbe92ba2f
feat: first step native support Trino (#13105)
* feat: add TrinoEngineSpec

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>

* feat: add trino into extras_require

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>

* test: add trino_tests.py

Signed-off-by: Đặng Minh Dũng <dungdm93@live.com>
2021-02-15 14:30:13 +02:00
Amit Miran 312cbf736c
feat(dashboard_rbac): add support for related roles (#13035) 2021-02-15 10:57:37 +02:00
simcha90 d6fc720f4c
feat(native-filters): Time native filter (#12992)
* 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>
2021-02-13 12:09:54 +02:00
Daniel Vaz Gaspar fa4c118e2d
fix: API tests, make them possible to run independently again (#13076)
* fix: API tests, possible to run independently

* fix workflow name
2021-02-11 18:19:41 +00:00
Daniel Vaz Gaspar b3a814fa27
feat(db engines): add support for Opendistro Elasticsearch (AWS ES) (#12602)
* feat(db engines): add support for Opendistro Elasticsearch (AWS ES)

* add time grains

* lint

* bump elasticsearch-dbapi version

* add tests

* fix test
2021-02-10 08:17:27 +00:00
Jesse Yang bbcb41149e
fix: time filter db migration optimization (#13015) 2021-02-09 10:49:50 -08:00
Amit Miran 8ccf2e8f1e
feat(dashboard_rbac): dashboards API support for roles create/update + roles validation (#12865) 2021-02-07 16:16:19 +02:00
Ville Brofeldt ac73991913
fix(viz): improve dtype inference logic (#12933) 2021-02-04 10:47:27 -08:00
Amit Miran b472d1841c
feat(dashboard_rbac): dashboard_view access enforcement (#12875)
* 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
2021-02-04 13:23:53 -05:00
Karol Kostrzewa 742d560636
test: speedup celery tests (#12885)
* speedup celery tests

* refactor wait for success
2021-02-03 13:37:02 -08:00
Amit Miran bc0198b405
chore(dashboard_rbac): remove overlapping security tests (#12848)
* chore: remove some security tests that already covered in the rbac and dataset tests

* revert: test is not overlapping
2021-02-03 19:28:42 +02:00
Jesse Yang 9fa52d3e21
fix(chart): allow null for most query object props (#12905) 2021-02-02 19:28:22 -08:00
Beto Dealmeida ab3f4bd94b
feat: add separate endpoint to fetch function names for autocomplete (#12840)
* WIP

* Add unit test for API

* Add spec

* Fix unit test

* Fix unit test

* Fix test

* Fix test

* Add period to error message
2021-02-02 18:01:01 -08:00
Daniel Vaz Gaspar 6c018c0a28
refactor: dbapi exception mapping for dbapi's (#12869)
* refactor: dbapi exception mapping for dbapi's

* fix test

* fix lint

* fix grammar on comment
2021-02-02 15:07:46 +00:00
Ricardo Gândara Pinto 51195af4fa
fix: Presto column_type_mappings time and timestamp (#12861)
* Fix presto column_type_mappings time and timestamp

* Added unit tests
2021-02-01 17:41:57 +02:00
Amit Miran 9a7fba810e
feat(dashboard-rbac): dashboard lists (#12680) 2021-01-31 09:17:46 +02:00
Jesse Yang e3db935c62
refactor: migrate table chart to new API (#10270)
* 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
2021-01-29 13:12:09 +02:00
Duy Nguyen Hoang 32f2c45f93
fix(explore): preserve metric column order in bar chart (#12417)
* 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>
2021-01-28 10:39:00 +02:00
Daniel Vaz Gaspar 365770e7c3
feat: request ids on API related endpoints (#12663)
* feat: request ids on API related endpoints

* rename ids to include_ids
2021-01-27 20:24:49 +00:00
Rob DiCiuccio d7cbd53fce
fix(async queries): Remove "force" param on cached data retrieval (#12103)
* 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
2021-01-27 10:16:57 -08:00
Jesse Yang 55c8f9ba60
feat(explore): allow opening charts with missing dataset (#12705) 2021-01-25 15:09:03 -08:00
Karol Kostrzewa 8ccfdba672
test: oracle engine spec (#12615)
* test fetch_data, fix test_convert_dttm

* refactor test_convert_dttm
2021-01-25 09:49:58 -08:00
Karol Kostrzewa 0c32cf4244
test: hive db engine spec (#12520)
* add tests for upload_to_s3

* add fetch_data tests

* add test_create_table_from_csv_if_exists_fail

* add test_where_latest_partition

* fix app context

* test for where_latest_partition create_table_from_csv
2021-01-25 09:49:43 -08:00
Yongjie Zhao 9e58eb809e
fix(explore): deprecated x periods pattern in new time picker value (#12552) 2021-01-23 23:41:15 -08:00
Beto Dealmeida 4255c22d01
feat: add decorator to guard public APIs (#12635)
* feat: add decorator to guard public APIs

* Add unit tests

* Refactor to use unit tests

* Paramterize tests

* Remove decorator
2021-01-22 13:06:14 -08:00
Karol Kostrzewa f2b802978d
fix: bar chart data order (#12665)
* fix bar chart order

* fix test_explore_json_dist_bar_order

* fix quotes
2021-01-22 12:38:33 +02:00
Karol Kostrzewa e1db016a6c
test: presto engine spec tests (#12594)
* 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
2021-01-21 12:53:54 -08:00
Karol Kostrzewa cdea1324f1
add test_convert_dttm (#12539) 2021-01-21 12:52:38 -08:00
Karol Kostrzewa 0de61df72f
test: sqlite db engine spec (#12616) 2021-01-21 09:34:48 +00:00
Jesse Yang c14ed80f28
refactor: rename DbColumnType to GenericDataType (#12617) 2021-01-20 10:07:42 -08:00
Duy Nguyen Hoang 77da4ada99
fix: error while parsing invalid json form_data (#12586)
* Fix error while parsing invalid json form_data

* Refine error returned
2021-01-19 16:15:16 +00:00
Ville Brofeldt 7e99d768af
feat(bigquery): implement custom minute time grains (#12581)
* feat(bigquery): implement custom minute time grains

* address review comment
2021-01-19 14:32:33 +02:00
Kasia Kucharczyk ad63823d6f
fix: Added message flash when chart with missing dataset is accessed. (#12468) 2021-01-18 22:42:03 -08:00
Karol Kostrzewa fc5e311842
test: /postgres engine spec test coverage (#12490)
* add tests for PostgresEngineSpec.estimate_statement_cost

* add tests for PostgresEngineSpec.query_cost_formatter

* fix docstring

* fix dependency

* fix raise SyntaxError
2021-01-15 16:50:37 +02:00
Karol Kostrzewa 5fbfb82266
add test_extract_error_message (#12548) 2021-01-15 16:46:27 +02:00
Xiang Fu 8f940aecca
Fixing Pinot queries for time granularities: WEEKS/MONTHS/QUARTERS/YEARS (#12536) 2021-01-15 11:05:31 +02:00
Karol Kostrzewa 241f380e2e
test: World bank examples (#12161)
* add world bank data fixture

* fix fixture cleanup, add fixture to dashboard_tests

* apply world bank fixtures, fix tests

* fix fixture typo, dashboard ids

* fix export dashboard metadata

* fix test_export_dashboard_command_key_order

* fix export dash tests, not add row when no orphans

* debug timeout

* fixes after merge

* fix lint

* run pre-commit

* comment test for debug

* fix save.test.js

Co-authored-by: Karol Kostrzewa <karol.kostrzewa@polidea.com>
2021-01-13 14:20:05 -08:00
Jesse Yang f8270b0b80
fix(dashboard): use datasource id from slice metadata (#12483) 2021-01-13 18:49:51 +02:00
Ville Brofeldt 40a334aacf
feat(db-engine-specs): add support for Postgres root cert (#11720)
* feat(db-engine-specs): add support for Postgres root cert

* remove logging of json decode exception message

* fix error message

* fix error message
2021-01-13 13:39:28 +02:00
Beto Dealmeida e47350ef96
fix: import ZIP files that have been modified (#12425)
* fix: import ZIP files that have been modified

* Add unit test
2021-01-12 12:56:26 -08:00
Yongjie Zhao 9b0e6d0cc0
refactor: from superset.utils.core break down date_parser (#12408) 2021-01-11 14:16:42 -08:00
Karol Kostrzewa 2ab490a101
test: birth names (#12226)
* add birth names fixture

* fix birth names related tests

* fix test_import_v0_dataset_cli_export columns order

* fix celery tests drop table

* fix mysql datetime type

* fix mysql typo in charts/api_tests

* refactor

* add licence

* fix use fixture for presto

* fix presto, hive query

* fix flaky metadata

* fix mysql bigint type

* fix run query

* fix hive datatype in metadata

* fix slice owner for cypress

* refactor num_boys num_girls

* fix is_dttm column

* debug logging

* fix query offset

* fix presto ds type in metadata

* fix presto ds type

* clean up debug logging
2021-01-11 05:57:55 -08:00
Jesse Yang 2210015aab
test: rename column names for birth_names dataset (#12082) 2021-01-08 14:13:20 -08:00
Daniel Vaz Gaspar c685c9ea8f
refactor: test connection raises only command exceptions (#12307)
* refactor: test connection raises only command exceptions

* fix tests

* fix tests

* fix tests

* lint fix
2021-01-08 13:10:11 +00:00
Beto Dealmeida 24fccdb2bc
fix: append orphan charts (#12320)
* fix: append orphan charts

* Add unit tests
2021-01-07 14:05:08 -08:00
Yongjie Zhao 9eb911dca3
fix(explore): refine previous calendar range (#12308) 2021-01-06 10:09:13 -08:00
Yongjie Zhao 1f8347228e
fix(explore): timepicker show human readable string in pill (#12300)
* fix(explore): timepicker show human readable string in pill

* fix lint
2021-01-06 22:37:35 +08:00
Amit Miran b221417e19
chore: remove harmless incubator refs (#12289)
* 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
2021-01-06 13:45:19 +02:00
Karol Kostrzewa 1a2680d4a1
test: fix flaky Python unit tests (#12253) 2021-01-05 16:40:01 -08:00
Beto Dealmeida 164db3e5a1
fix: CTAS on multiple statements (#12188)
* WIP

* Add unit tests for sql_parse

* Add unit tests for sql_lab
2021-01-04 09:22:35 -08:00
Daniel Vaz Gaspar 74f3faf1cd
fix(reports): make name unique between alerts and reports (#12196)
* 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
2020-12-24 09:18:46 +00:00
Daniel Vaz Gaspar 09a381da1d
fix(reports): notification without standalone link back to superset (#12174)
* fix(reports): notification without standalone link back to superset

* fix comment
2020-12-23 11:31:08 +00:00
Jesse Yang d2da25a621
refactor: remove queryFields in QueryObject and update chart control configs (#12091)
* Clean up queryFields

* Clean up unused vars

* Bump chart plugins

* Bringing changes in #12147
2020-12-22 17:10:19 -08:00
Beto Dealmeida ca680cf976
fix: append ID to filename when exporting chart (#12166) 2020-12-22 14:19:05 -08:00
Nikola Gigić a52031a55e
chore: Change chart_is_fav to chart_is_favorite (#12075)
* Change chart_is_fav to chart_is_favorite

* Trigger cypress tests

* Retrigger cypress tests

* Retrigger all tests

* Dashboard

* Additions
2020-12-22 10:03:26 -08:00
Beto Dealmeida c281e52f81
feat: add new dashboard with video game sales (#12162) 2020-12-22 08:53:18 -08:00
Daniel Vaz Gaspar 2f0add3aec
fix: database alpha permissions (#12136)
* fix: database alpha permissions

* add test
2020-12-21 19:17:58 +00:00
Daniel Vaz Gaspar 8d5dcc5784
fix(report): fix last_eval_dttm sort and more tests (#12121)
* 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
2020-12-21 19:07:30 +00:00
David Aaron Suddjian 865beae3d8
feat(dashboard): Dashboard-Native Filters (#11814)
* 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>
2020-12-18 17:06:37 -08:00
Ville Brofeldt 1a5f61b133
feat(chart-data-api): ignore unknown fields on QueryObject (#12118) 2020-12-18 14:32:55 +02:00
Beto Dealmeida 6e7f276775
feat: initial custom error messages for SQL Lab (#12080) 2020-12-17 22:58:21 -08:00
Yongjie Zhao b592cc7e73
feat(explore): time picker enhancement (#11418) 2020-12-17 18:27:21 -08:00
Daniel Vaz Gaspar 1a20552c2b
fix(reports): increase crontab size and alert fixes (#12056)
* fix(reports): increase crontab size

* update to current alembic revision

* Merge branch 'master' into feat/security-converge-datasets

# Conflicts:
#	tests/security_tests.py

* Merge branch 'master' into feat/security-converge-datasets

# Conflicts:
#	tests/security_tests.py

* Merge branch 'master' into feat/security-converge-datasets

# Conflicts:
#	tests/security_tests.py

* lint

* update alembic revision

* fix related fields

* fix test
2020-12-17 18:03:05 +00:00
Daniel Vaz Gaspar 5d9721e6ba
feat(queries): security perm simplification (#12072)
* feat(queries): security perm simplification

* fix mig

* update alembic down revision
2020-12-17 14:27:14 +00:00
Daniel Vaz Gaspar 790ac5ef87
feat(databases): security perm simplification (#12036)
* feat(databases): security perm simplification

* fix tests

* fix JS tests
2020-12-17 12:37:05 +00:00
Daniel Vaz Gaspar dd5cdb1b5f
feat(dashboards): security permissions simplification (#12012)
* feat(dashboards): security perm simplification

* fix tests

* fix tests

* remove unnecessary mapping

* fix JS tests

* fix cypress test and explore endpoint

* update alembic down revision

* Merge branch 'master' into feat/security-converge-dashboards

# Conflicts:
#	superset/constants.py
#	tests/security_tests.py
2020-12-17 09:53:13 +00:00
Kasia Kucharczyk 700dee6db6
feat(logs): security permissions simplification (#12061)
* 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
2020-12-17 00:50:31 -08:00
Daniel Vaz Gaspar 2302adb61a
feat(datasets): security perm simplification (#12000)
* feat(datasets): security perm simplification

* feat(datasets): security perm simplification

* fix tests

* fix tests

* fix tests

* fix tests

* fix tests

* include SqlMetricInlineView converge and fix JS tests

* update to current alembic revision
2020-12-16 11:49:03 +00:00
Kasia Kucharczyk 9c8b65d03f
feat(annotations): security permissions simplification (#12014)
* 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
2020-12-16 09:08:06 +00:00
Beto Dealmeida 8bda6b0bd9
feat: show missing parameters in query (#12049)
* feat: show missing parameters in query

* Fix lint

* Address comments

* Simplify error message

* Use f-string in helper function
2020-12-15 18:47:40 -08:00
Grace Guo 8da1900d8a
feat: add hook for dataset health check (#11970)
* 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
2020-12-15 18:12:06 -08:00
Jesse Yang 76f9f185fb
refactor: optimize backend log payload (#11927) 2020-12-15 17:22:23 -08:00
Daniel Vaz Gaspar f79e52f48e
feat(charts): security perm simplification (#11981)
* feat(charts): security perm simplification

* fix superset explore

* fix JS test

* fix cypress test

* fix split heads

* fix favorite permission

* fix permission

* update with new async permission

* fix new permission coming from master

* fix core permission assert

* black

* update alembic down revision
2020-12-15 11:27:06 +00:00
Daniel Vaz Gaspar 0f979dea06
feat(reports): security perm simplification (#11853)
* feat: security converge report

* black

* fix: comment

* add frontend changes and rebase

* fix multiple heads
2020-12-15 08:48:00 +00:00
Daniel Vaz Gaspar 20b1aa7d6c
fix(reports): apply owners security validation (#12035)
* fix(reports): apply owners security validation

* fix pylint
2020-12-15 08:43:31 +00:00
ʈᵃᵢ 6fcda5dac1
feat: add cron picker to AlertReportModal (#12032)
* humanize cron display in list view
2020-12-14 22:29:31 -08:00
Beto Dealmeida 45703a1dea
feat: update IDs when importing dashboards (#11991)
* feat: update IDs when importing dashboards

* Fix typos
2020-12-11 18:19:36 -08:00
Rob DiCiuccio 4d329071a1
feat(SIP-39): Async query support for charts (#11499)
* Generate JWT in Flask app

* Refactor chart data API query logic, add JWT validation and async worker

* Add redis stream implementation, refactoring

* Add chart data cache endpoint, refactor QueryContext caching

* Typing, linting, refactoring

* pytest fixes and openapi schema update

* Enforce caching be configured for async query init

* Async query processing for explore_json endpoint

* Add /api/v1/async_event endpoint

* Async frontend for dashboards [WIP]

* Chart async error message support, refactoring

* Abstract asyncEvent middleware

* Async chart loading for Explore

* Pylint fixes

* asyncEvent middleware -> TypeScript, JS linting

* Chart data API: enforce forced_cache, add tests

* Add tests for explore_json endpoints

* Add test for chart data cache enpoint (no login)

* Consolidate set_and_log_cache and add STORE_CACHE_KEYS_IN_METADATA_DB flag

* Add tests for tasks/async_queries and address PR comments

* Bypass non-JSON result formats for async queries

* Add tests for redux middleware

* Remove debug statement

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* Skip force_cached if no queryObj

* SunburstViz: don't modify self.form_data

* Fix failing annotation test

* Resolve merge/lint issues

* Reduce polling delay

* Fix new getClientErrorObject reference

* Fix flakey unit tests

* /api/v1/async_event: increment redis stream ID, add tests

* PR feedback: refactoring, configuration

* Fixup: remove debugging

* Fix typescript errors due to redux upgrade

* Update UPDATING.md

* Fix failing py tests

* asyncEvent_spec.js -> asyncEvent_spec.ts

* Refactor flakey Python 3.7 mock assertions

* Fix another shared state issue in Py tests

* Use 'sub' claim in JWT for user_id

* Refactor async middleware config

* Fixup: restore FeatureFlag boolean type

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2020-12-10 20:21:56 -08:00
Beto Dealmeida 475f59cb1c
feat: confirm overwrite when importing (#11982)
* feat: confirm overwrite when importing

* Skip flaky test
2020-12-10 14:50:10 -08:00
Kasia Kucharczyk 4da47f1635
tests: added fixture with energy usage instead of example (#11308)
* 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
2020-12-09 12:02:29 -08:00
Daniel Vaz Gaspar 1e3aaab590
fix(reports): validator_config, report state machine, working_timeout (#11890)
* 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
2020-12-09 18:19:07 +00:00
Beto Dealmeida 33325f9fa6
feat: add modal to import charts (#11956)
* WIP

* Splat props
2020-12-07 18:33:59 -08:00
Beto Dealmeida 2b9695c520
feat: add modal to import databases (#11884)
* feat: add modal to import databases

* Fix test

* Improve hook

* Remove log and needless store.

* Change JS functions
2020-12-07 11:22:45 -08:00
Beto Dealmeida 66cd565bff
feat: add Postgres SQL validator (#11538)
* Add Postgres SQL validator

* Strip line number from message

* Add unit tests

* Run tests only with postgres backend

* Add dep

* Add dep to bashlib
2020-12-04 19:17:23 -08:00
Erik Ritter 77d362d306
fix: Remove expensive logs table migration (#11920) 2020-12-04 07:59:28 -08:00