Commit Graph

227 Commits

Author SHA1 Message Date
Yeachan Park
8becd3e080 fix(sqllab/charts): casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp (#18873)
* fix casting from timestamp[us] to timestamp[ns] would result in out of bounds timestamp from sqllab and charts

* Add unittests

* Lint changes and parameter variable rename

* Fix linting

(cherry picked from commit 8b72354654)
2022-05-26 10:28:13 -03:00
Ville Brofeldt
9ca53b8905 fix(sqla): replace custom dttm type with literal_column (#19917)
(cherry picked from commit 99f1f9ec61)
2022-05-26 10:28:13 -03:00
Hugh A. Miles II
2bd89d1705 fix: Alpha should not be able to edit datasets that they don't own (#19854)
* fix api for checking owners

* fix styles for disabling

* fix styles for disabling

* fix lint

* fix lint

* add owners key

* plzz

* remove

* update test

* add tooltip

* add type

* fix test

* fix user reference

* lit

* fix test

* work

(cherry picked from commit 8b15b68979)
2022-05-26 10:28:13 -03:00
Jesse Yang
90b08fa095 chore: skip SIP-68 shadow writing for LTS 2022-04-15 14:52:25 +03:00
Ville Brofeldt
419316e84a fix tests 2022-04-11 09:49:29 +03:00
Yongjie Zhao
90f49e261e fix: flaky test for dashboard changed on (#19483)
(cherry picked from commit a2e921bd03)
2022-04-04 11:00:48 +03:00
Yongjie Zhao
3ff9cdeb65 fix: can't sync temporal flag on virtual table (#19366)
(cherry picked from commit d954c3df86)
2022-04-04 11:00:48 +03:00
David Aaron Suddjian
795ed3c719 feat: Embedded dashboard configuration (#19364)
* embedded dashboard model

* embedded dashboard endpoints

* DRY up using the with_dashboard decorator elsewhere

* wip

* check feature flags and permissions

* wip

* sdk

* urls

* dao option for id column

* got it working

* Update superset/embedded/view.py

* use the curator check

* put back old endpoint, for now

* allow access by either embedded.uuid or dashboard.id

* keep the old endpoint around, for the time being

* openapi

* lint

* lint

* lint

* test stuff

* lint, test

* typo

* Update superset-frontend/src/embedded/index.tsx

* Update superset-frontend/src/embedded/index.tsx

* fix tests

* bump sdk

(cherry picked from commit 8e29ec5a66)
2022-04-04 11:00:45 +03:00
Daniel Vaz Gaspar
7aba89c486 fix: add missing init on python pkg key_value (#19428)
* fix: add missing init on python pkg key_value

* fix lint issues

* fix lint issues

(cherry picked from commit fa35109bf2)
2022-04-04 11:00:44 +03:00
Ville Brofeldt
fb929ab649 run black on remaining files 2022-04-03 19:15:25 +03:00
Ville Brofeldt
a70f4dc52f chore: upgrade black (#19410) 2022-04-03 19:13:17 +03:00
Beto Dealmeida
cccec50454 feat: disable edits on external assets (#19344)
* feat: disable edits on external assets

* Update tests

(cherry picked from commit d304849b46)
2022-04-03 19:04:00 +03:00
Ville Brofeldt
a6a2def6d3 feat: introduce hashids permalink keys (#19324)
* feat: introduce hashids permalink keys

* implement dashboard permalinks

* remove shorturl notice from UPDATING.md

* lint

* fix test

* introduce KeyValueResource

* make filterState optional

* fix test

* fix resource names

(cherry picked from commit f4b71abb22)
2022-04-03 19:03:56 +03:00
Beto Dealmeida
d9377559f6 feat: import external management columns (#19315)
* feat: import flags

* Add tests

(cherry picked from commit c7f9060a2f)
2022-04-03 19:03:55 +03:00
Yongjie Zhao
9bc76337cf feat(advanced analysis): support MultiIndex column in post processing stage (#19116) 2022-04-03 19:00:01 +03:00
Ville Brofeldt
f3172010d5 feat(key-value): add superset metastore cache (#19232)
(cherry picked from commit 72b9a7fa5b)
2022-04-03 14:10:49 +03:00
PApostol
70facad1b2 Various docstring fixes (#18221)
(cherry picked from commit c07a707eab)
2022-04-03 14:10:48 +03:00
Stephen Liu
7d239b8958 feat: improve color consistency (save all labels) (#19038)
(cherry picked from commit dc575080d7)
2022-04-03 14:10:47 +03:00
Ville Brofeldt
408573d4d6 feat: add support for comments in adhoc clauses (#19248)
* feat: add support for comments in adhoc clauses

* sanitize remaining freeform clauses

* sanitize adhoc having in frontend

* address review comment

(cherry picked from commit f341025d80)
2022-04-03 14:10:47 +03:00
Lily Kuang
c793b7bfe9 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>
(cherry picked from commit 50902d51f5)
2022-04-03 14:10:46 +03:00
Yongjie Zhao
f1ea0ad56c fix: adhoc column in legacy chart (#19234)
(cherry picked from commit b5e9fad11a)
2022-04-03 14:04:52 +03:00
Beto Dealmeida
3de8370ead feat: import/export assets commands (#19217)
* feat: import/export assets commands

* Add overwrite test

* Fix tests

(cherry picked from commit 51061f0d67)
2022-04-03 14:04:52 +03:00
Craig Rueda
f91f9f5aae feat(ui): Adding manifest prefix config (#19141)
* Adding manifest prefix config

* Fixing broken tests

* Fixing import

* Adding prefix for remaining assets

* Changing static prefix strategy

* Fixing DST test

* Fixing up formatting

* Fixing up async_query_manager.py types
2022-04-03 14:03:35 +03:00
cccs-Dustin
a1b9b2946d feat(sqllab): Add a configuration option to disable data preview (#19104)
(cherry picked from commit 02ef9ca4cd)
2022-04-03 14:02:24 +03:00
Ville Brofeldt
8c102174b8 feat: add permalink to dashboard and explore (#19078)
* rename key_value to temporary_cache

* add migration

* create new key_value package

* add commands

* lots of new stuff

* fix schema reference

* remove redundant filter state from bootstrap data

* add missing license headers

* fix pylint

* fix dashboard permalink access

* use valid json mocks for filter state tests

* fix temporary cache tests

* add anchors to dashboard state

* lint

* fix util test

* fix url shortlink button tests

* remove legacy shortner

* remove unused imports

* fix js tests

* fix test

* add native filter state to anchor link

* add UPDATING.md section

* address comments

* address comments

* lint

* fix test

* add utils tests + other test stubs

* add key_value integration tests

* add filter box state to permalink state

* fully support persisting url parameters

* lint, add redirects and a few integration tests

* fix test + clean up trailing comma

* fix anchor bug

* change value to LargeBinary to support persisting binary values

* fix urlParams type and simplify urlencode

* lint

* add optional entry expiration

* fix incorrect chart id + add test

(cherry picked from commit b7a0559aaf)
2022-04-03 14:02:23 +03:00
Beto Dealmeida
90f4d77422 feat: add export_related flag (#19215)
* feat: add export_related flag

* Fix lint

(cherry picked from commit d01fdad1d8)
2022-04-03 14:02:23 +03:00
David Aaron Suddjian
0598e95b1b chore(embedded): refresh the guest token (#19132)
* refresh the guest token

* put back the date logic

* version

* fix time hijinks

* test

* Update superset-embedded-sdk/src/guestTokenRefresh.ts

(cherry picked from commit 54b60ded8e)
2022-04-03 14:02:21 +03:00
Elizabeth Thompson
253f80ab6d chore: log multiple errors (#14064)
* log all errors from db create

* return unique set of errors

* sort set for exceptions list

* run black

(cherry picked from commit c143b37128)
2022-04-03 14:02:16 +03:00
Karthikeyan Singaravelan
585b032a1a chore: Fix deprecated unittest aliases. (#19042)
(cherry picked from commit 864bafc655)
2022-04-03 14:02:12 +03:00
Hugh A. Miles II
fb5d77e404 feat: Allow users to bust cache in report dashboard + alerts charts + alert dashboards (#18795)
* wip

* add force cahce bypass option to alerts

* remove default for alerts to bypass cache

* save for now

* save for now

* fix

* commenting out for now

* fix linting

* remove link

* add back force id test

* add frontend test

* address

(cherry picked from commit 8c52fe3476)
2022-04-03 14:02:12 +03:00
Ville Brofeldt
5a8cd3477b chore(cache): default to SimpleCache in debug mode (#18976)
* chore(cache): default to SimpleCache in debug mode

* lint

* clean up type

* use util

* fix integration test cache configs

* remove util from cache manager

* remove trailing comma

* fix more tests

* fix truthiness check

* fix tests and improve deprecation notice

* fix default cache threshold

* move debug check to cache_manager

* remove separate getter

* update docs

* remove default cache config

(cherry picked from commit a04f1d4c87)
2022-04-03 13:52:38 +03:00
Ville Brofeldt
6d2b583fee fix(chart): deprecate persisting url_params (#18960)
* fix(chart): deprecate peristing url_params

* remove duplicated backend logic

* use omitBy

* simplify omit

(cherry picked from commit bd63a1bd98)
2022-04-03 13:52:38 +03:00
Craig Rueda
3c90220cf6 fix(packages): Fixing users packages (#18973)
* Fixing users packages

* Linting me() fn

* Fixing tests / moving packages

* Fixing imports

(cherry picked from commit 5fc7adb55b)
2022-04-03 13:52:38 +03:00
serenajiang
46015e2c66 feat(TimeTableViz): sort by first metric (#18896)
(cherry picked from commit 760dab9abd)
2022-04-03 13:52:36 +03:00
John Bodley
5b465c2ff1 fix: bump Helm chart release version (#18751) (#18758)
Co-authored-by: wiktor2200 <wiktor2200@users.noreply.github.com>
(cherry picked from commit 099421770c)
2022-04-03 13:52:35 +03:00
Beto Dealmeida
00c99c91ec feat: new dataset/table/column models (#17543)
* feat: new models for SIP-68

* feat: new dataset models DB migration

* Add shadow write (WIP)

* Physical dataset shadow write (WIP)

* Virtual dataset shadow write (WIP)

* Update migration to populate models

* Cascade delete columns

* after_delete

* Update hook

* Add metric test

* Do not rename tables

* Small fixes

* Fix migration

* Fix tests

* Fix more tests

* Even more tests

* Addressing comments (WIP)

* Fix migration

* Rebase and update head

* Fix unit tests

* Add external management cols

* Small fixes
2022-02-24 11:02:01 -08:00
David Aaron Suddjian
da3bc48803 feat: On window focus, redirect to login if the user has been logged out (#18773)
* /me api

* test it

* watch for window activation and check auth

* simplify

* more comment

* making ci happy

* mypy should ignore tests
2022-02-24 10:09:41 -08:00
Corbin Robb
0ae1ca7e02 chore(tests-backend): migrate snowflake and sqlite to unit tests (#18854)
* migrate snowflake and sqlite

* change structure to better match the other unit tests

Co-authored-by: Corbin Robb <corbin@Corbins-MacBook-Pro.local>
2022-02-23 11:11:10 -06:00
Yongjie Zhao
38cd696981 refactor: move date_parser to unittest (#18810) 2022-02-18 20:15:31 +08:00
Hugh A. Miles II
5d2e726f76 fix: update standalone url for slack reports (#18756)
* update url for slack reports

* fix test

* update text to be dynamic
2022-02-17 15:48:57 -05:00
Yongjie Zhao
30a9d14639 refactor: postprocessing move to unit test (#18779) 2022-02-17 20:05:41 +08:00
Phillip Kelley-Dotson
2421d176a2 chore: move data nav menu to plus menu (#18629)
* more data nav menu

* fix lint and fix nav css

* update test and remove icons

* Update superset-frontend/src/views/components/Menu.test.tsx

Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>

* Apply suggestions from code review

* use backend app.link to show new nav changes

* fix lint

* update test

* usetheme and remove chaining

* add more suggestions

* fix lint

* add allowed extensions to bootstrap and hard code links

* remove backend links

* fix test

* add extensions to frontend conf

* fix test and add be changes

* test is python test passes

* update python test and reremove app links

* fix ts and add t's

Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>
2022-02-16 17:37:14 -08:00
Grace Guo
59b811ac5b fix: report list search by created_by (#18725) 2022-02-15 19:37:17 -08:00
Lily Kuang
b2613f648c feat(embedded): make guest token JWT audience callable or str (#18748)
* feat(embedded): make guest token JWT audience callable

* reset GUEST_TOKEN_JWT_AUDIENCE after test

* helper method for get audience
2022-02-15 17:47:32 -08:00
Michael S. Molina
48a80950de feat: Improve state key generation for dashboards and charts (#18576)
* feat: Improve state key generation for dashboards and charts
2022-02-14 17:09:06 -03:00
Lily Kuang
e6ea197e9f feat(embedded): aud claim and type for guest token (#18651)
* add aud claim and type for guest token

* update test

* lint

* make jwt audience configurable

* lint

* Apply suggestions from code review

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

* verify aud

* add tests for aud and type claim

Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
2022-02-14 10:43:35 -08:00
Sujith Kumar S
b8aef10098 fix(mssql): support cte in virtual tables (#18567)
* Fix for handling regular CTE queries with MSSQL,#8074

* Moved the get_cte_query function from mssql.py to base.py for using irrespetcive of dbengine

* Fix for handling regular CTE queries with MSSQL,#8074

* Moved the get_cte_query function from mssql.py to base.py for using irrespetcive of dbengine

* Unit test added for the db engine CTE SQL parsing.

Unit test added for the db engine CTE SQL parsing.  Removed additional spaces from the CTE parsing SQL generation.

* implement in sqla model

* lint + cleanup

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
2022-02-10 10:28:05 +02:00
Victor Arbues
5ee070c402 feat: datasource access to allow more granular access to tables on SQL Lab (#18064) 2022-02-09 22:05:25 +08:00
Ville Brofeldt
125be78ee6 feat(chart-data-api): download multiple csvs as zip (#18618)
* feat(chart-data-api): download multiple csvs as zip

* break out util

* check for empty request
2022-02-08 14:25:06 -05:00
Ville Brofeldt
55cd7fb412 fix(sqla): avoid unnecessary groupby for when no metrics (#18579) 2022-02-04 10:47:47 +02:00