Commit Graph

52 Commits

Author SHA1 Message Date
Maxime Beauchemin
e51b95ffa8 chore: enforce more ruff rules (#31447)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2024-12-18 17:41:34 -08:00
anamitraadhikari
6ede3271ff fix(SQL Lab): hang when result set size is too big (#30522)
Co-authored-by: aadhikari <aadhikari@apple.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2024-10-14 18:03:28 -07:00
Beto Dealmeida
68a982dfe6 feat(sip-95): new endpoint for extra table metadata (#28063) 2024-04-18 10:42:53 -04:00
Kamil Gabryjelski
a498d6d10f refactor: Move fetchTimeRange to core package (#27852) 2024-04-03 18:34:23 +02:00
Beto Dealmeida
9022f5c519 feat(SIP-85): OAuth2 for databases (#27631) 2024-04-02 22:05:33 -04:00
Beto Dealmeida
26d8077e97 chore: improve SQL parsing (#26767) 2024-03-13 18:27:01 -04:00
Daniel Vaz Gaspar
5b34395689 fix: chart import validation (#26993) 2024-02-06 12:14:02 +00:00
Beto Dealmeida
3e63c82ecc feat: generic marshmallow error component (#25303) 2023-10-03 11:35:28 -07:00
Josh Soref
0735680674 chore(backend): Spelling (#25457)
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-09-29 09:36:50 -07:00
John Bodley
5522facdc6 chore: Refactor dashboard security access (#24804) 2023-08-09 09:25:58 -07:00
EugeneTorap
5f103072b0 fix: Python3.11 (str, Enum) issue (#24803) 2023-07-31 09:04:09 -07:00
John Bodley
a4d5d7c6b9 chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
John Bodley
d583ca9ef5 chore: Embrace the walrus operator (#24127) 2023-05-19 00:37:13 -07:00
Artem Shumeiko
f3696ceef3 chore: Localization of several charts and elements (#22150)
Co-authored-by: ashumeiko <ashumeiko@ashumeiko.com>
2023-01-11 09:42:54 -07:00
Elizabeth Thompson
ce145c676c refactor: use exception status for logging (#21971) 2022-11-14 14:14:24 -08:00
Lily Kuang
50902d51f5 fix: allow subquery in ad-hoc SQL (WIP) (#19242)
* allow adhoc subquery

* add config for allow ad hoc subquery

* default to true allow adhoc subquery

* fix test

* Update superset/errors.py

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

* Update superset/connectors/sqla/utils.py

Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>

* rename and add doc string

* fix for big query test

* Update superset/connectors/sqla/utils.py

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

* Apply suggestions from code review

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

* add test

* update validate adhoc subquery

Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
2022-03-18 10:04:55 -07:00
Beto Dealmeida
51090c3f1b feat: shorter timeout on test_connection (#18001)
* feat: shorter timeout on test_connection

* pip-compile-multi --no-upgrade

* Fix for SQLite

* Return 408

* Add test
2022-01-12 13:01:34 -08:00
Ville Brofeldt
c4b04952d0 feat: customize recent activity access (#17589)
* feat: customize recent activity access

* address comments

* fix and add tests

* add alert assertion and UPDATING.md entry

* replace .get_id() with .id

* fix updating comment

* update config name
2021-12-08 11:30:23 +02:00
ofekisr
3f784cc1c7 refactor: sql lab: handling command exceptions (#16852)
* chore: support error_type in SupersetException and method to convert the exception to dictionary

* chore: support error_type in SupersetException and method to convert the exception to dictionary

* refactor handling command exceptions   fix update query status when query was not created
2021-09-29 16:20:42 +03:00
John Bodley
7e4c940314 chore(pylint): Enable useless-suppression check (#16388)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2021-08-24 03:58:41 +12:00
Hugh A. Miles II
d4480f5c9a feat: Database Connection UI (#14881) 2021-07-01 14:40:27 -07:00
Beto Dealmeida
e606477ec1 feat: more SIP-40 errors (#15482) 2021-06-30 16:32:59 -07:00
Beto Dealmeida
5181a74116 chore: simplify errors and issue codes (#15437) 2021-06-29 19:33:28 -07:00
Beto Dealmeida
149c5fd594 feat: add more SIP-40 errors to SQL Lab (#15436) 2021-06-29 18:17:16 -07: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
Beto Dealmeida
21d1fb55c6 feat: more error messages (#15409) 2021-06-28 14:51:31 -07: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
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
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
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
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
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
Beto Dealmeida
786dadc836 feat: invalid password error message (Postgres) (#14038) 2021-04-12 14:03:21 -07: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
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
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
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
David Aaron Suddjian
b5dd0f32cc feat: Dynamically imported viz plugins (#10288)
* first attempts at dynamic plugin loading

* dynamic import working for explore

* memoize appropriately

* add a backend for dynamic plugins

* hack at getting dynamic plugins working with dashboards

* more work on making it work, + feature flag

* lint

* actions to fix explore state when plugins load

* handle dynamic control panel, functionify ExploreViewContainer

* fix: rearrange migrations branch

* fix: name and key as strings with length 50

* bundle url length 2000

* bundle url to text
for some reason not supported on my sql

* fix: too long varchart

* fix: pre-commit typing

* fix: licenses

* fix: add slice container was not initing feature flags

* fix: undo linting issue

* fix: adjust down revision again

* fix: adjust down revision again

* isort

* pylint

* god damn linters

* remove unnecessary(?) loading message

* only log non-standard errors

* testing

* python is terrible

* see above commit message

* fix imports in DynamicPluginProvider

* fix

* shift migration forward

* lint

* fix form data calculations to handle missing control config

* temp commit - waiting for superset-ui changes and crud fixes

* remove unnecessary todo

* use new superset-ui shared module function

* fetch the plugins instead of hardcoding the test one

* migration sort

* remove duplicated import statement

* format

* try moving the import 🙄

* copy

* fix frontend tests

* safe access

* comment out dead code

* isort

* disable pylint on necessary lines

* use @superset-ui/logging instead of console

* remove temp code

* rearrange some code

* try triggering mouseover in cypress before click

* use loading spinner instead of text

* trying to fix cypress

* attempt cypress fix

* customize permissions

* update package lock

* only admins can write to plugins by default

* better copy

* disable flaky tests

* use makeApi

* flaky tests

* cleanup code

* flaaaakkkyyyyyy

* dry

Co-authored-by: amitNielsen <amit.miran@nielsen.com>
2020-12-19 07:06:11 -08: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
Erik Ritter
fa5dab85c4 feat: more specific presto error messages (#11099) 2020-09-29 21:50:58 -07:00
Ville Brofeldt
96b9ba3364 ci: bump pre-commit py36 to py37 (#10541)
* ci: bump pre-commit py36 to py37

* add 3rd party for py37

* lint

* yet more lint
2020-08-07 06:54:22 +03:00
Erik Ritter
2055ecc1ba feat: refactor error components and add database issue code (#10473)
* feat: refactor error components and add database issue code

* Apply suggestions from code review

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
2020-08-06 13:22:24 -07:00
Erik Ritter
5fa4680447 feat: update timeout error UX (#10274) 2020-07-20 15:32:17 -07:00
Maxime Beauchemin
318e5347bc feat: Alerts! allowing users to set SQL-based email alerts with screenshots (#9944)
* 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>
2020-07-06 13:12:27 -07:00
Maxime Beauchemin
280ade826c fix: dashboard export raises schema issues (#10060)
* fix: dashboard export raises schema issues

* Fix isort
2020-06-15 21:43:05 -07:00
John Bodley
7f6dbf838e style: enforcing mypy typing for connectors (#9824)
Co-authored-by: John Bodley <john.bodley@airbnb.com>
2020-05-25 12:32:49 -07:00
Maxime Beauchemin
ee991963c7 fix: don't create examples db on 'superset init' (#9881)
* chore: don't create examples db on 'superset init'

* fix isort
2020-05-21 21:34:53 -07:00