* 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
* 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>
* 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>
* 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>
* Assign an owner when creating a dataset from a csv, excel or columnar
* Added some unit tests
* Code cleanup
* Removed blank line
* Attempt to fix a broken test
* Attempt # 2 to fix a broken test
* Attempt # 3 to fix a broken test
* Attempt # 4 to fix a broken test
* Attempt # 5 to fix a broken test
* Attempt # 6 to fix a broken test
* Broken test fixed, code cleanup
* feat(dashboard): embedded dashboard UI configuration (#17175) (#17450)
* setup embedded provider
* update ui configuration
* fix test
* feat: Guest token (for embedded dashboard auth) (#17517)
* generate an embed token
* improve existing tests
* add some auth setup, and rename token
* fix the stuff for compatibility with external request loaders
* docs, standard jwt claims, tweaks
* black
* lint
* tests, and safer token decoding
* linting
* type annotation
* prettier
* add feature flag
* quiet pylint
* apparently typing is a problem again
* Make guest role name configurable
* fake being a non-anonymous user
* just one log entry
* customizable algo
* lint
* lint again
* 403 works now!
* get guest token from header instead of cookie
* Revert "403 works now!"
This reverts commit df2f49a6d4.
* fix tests
* Revert "Revert "403 works now!""
This reverts commit 883dff38f1.
* rename method
* correct import
* feat: entry for embedded dashboard (#17529)
* create entry for embedded dashboard in webpack
* add cookies
* lint
* token message handshake
* guestTokenHeaderName
* use setupClient instead of calling configure
* rename the webpack chunk
* simplified handshake
* embedded entrypoint: render a proper app
* make the embedded page accept anonymous connections
* format
* lint
* fix test
# Conflicts:
# superset-frontend/src/embedded/index.tsx
# superset/views/core.py
* lint
* Update superset-frontend/src/embedded/index.tsx
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
* comment out origins checks
* move embedded for core to dashboard
* pylint
* isort
Co-authored-by: David Aaron Suddjian <aasuddjian@gmail.com>
Co-authored-by: David Aaron Suddjian <1858430+suddjian@users.noreply.github.com>
* feat: Authorizing guest access to embedded dashboards (#17757)
* helper methods and dashboard access
* guest token dashboard authz
* adjust csrf exempt list
* eums don't work that way
* Remove unnecessary import
* move row level security tests to their own file
* a bit of refactoring
* add guest token security tests
* refactor tests
* clean imports
* variable names can be too long apparently
* missing argument to get_user_roles
* don't redefine builtins
* remove unused imports
* fix test import
* default to global user when getting roles
* missing import
* mock it
* test get_user_roles
* infer g.user for ease of tests
* remove redundant check
* tests for guest user security manager fns
* use algo to get rid of warning messages
* tweaking access checks
* fix guest token security tests
* missing imports
* more tests
* more testing and also some small refactoring
* move validation out of parsing
* fix dashboard access check again
* add more test
Co-authored-by: Lily Kuang <lily@preset.io>
* feat: Row Level Security rules for guest tokens (#17836)
* helper methods and dashboard access
* guest token dashboard authz
* adjust csrf exempt list
* eums don't work that way
* Remove unnecessary import
* move row level security tests to their own file
* a bit of refactoring
* add guest token security tests
* refactor tests
* clean imports
* variable names can be too long apparently
* missing argument to get_user_roles
* don't redefine builtins
* remove unused imports
* fix test import
* default to global user when getting roles
* missing import
* mock it
* test get_user_roles
* infer g.user for ease of tests
* remove redundant check
* tests for guest user security manager fns
* use algo to get rid of warning messages
* tweaking access checks
* fix guest token security tests
* missing imports
* more tests
* more testing and also some small refactoring
* move validation out of parsing
* fix dashboard access check again
* rls rules for guest tokens
* test guest token rls rules
* more flexible rls rules
* lint
* fix tests
* fix test
* defaults
* fix some tests
* fix some tests
* lint
Co-authored-by: Lily Kuang <lily@preset.io>
* SupersetClient guest token test
* Apply suggestions from code review
Co-authored-by: Lily Kuang <lily@preset.io>
Co-authored-by: Lily Kuang <lily@preset.io>
* Added code that properly accepts the -s flag on the import-datasources cli command. Also added unit tests for all of the edge cases (with both metrics & columns, with just columns, and with just metrics)
* Files were reformated using the 'pre-commit run --all-files' command
* added '*args: Any' back into v0.py as it did not need to be removed. Removing it might cause headaches for someone trying to work on this particular piece of code in the future
* Fixed the merge conflict as the cli.py was moved to another directory
* Modified my created unit tests to work with the new format of uni tests since the merge
* Modified my created unit tests to work with the new format of uni tests since the merge
* Fixed errors which were encountered while using the unit tests
* feat: Adds a key-value endpoint to store charts form data
* Fixes linting problems
* Removes the query_params from the endpoints
* Refactors the commands
* Removes unused imports
* Changes the parameters to use dataclass
* Adds more access tests
* Gets the first dataset while testing
* Adds unit tests for the check_access function
* Changes the can_access check
* Always check for dataset access
* refactor: replace the way the birth_names data is loaded to DB
* fix failed unit test
* fix failed unit test
* fix failed tests
* fix pass wrong flag of support datetime type
* remove unused fixture
* refactor: replace the way the birth_names data is generated
* refactor: replace the way the birth_names data is generated
* refactor structure
add tests for common
* Update existing tests
* Add backend test
* feat: add force option to report screenshots
* Add tests
* Rebase fixes
* Do not force screenshot on dashboard alerts
* Update db setup fixture scope
* Load data into db only once
* Update fixture scopes for data loading
* cleanup imports
* try import
* Update scope
* fix cleanup
* Import all fixtures
* Separate data log and metadata creation
* Retain table description
* fix dtype
Co-authored-by: Bogdan Kyryliuk <bogdankyryliuk@dropbox.com>
* Redirect on 401
* Bump FAB
* Format
* Update Cypress save test
* Revert Cypress change
* Bump FAB 3.4.1rc2
* Update test
* Update return statement
* Update api test
* Update datasets api test
* Update datasets api 401s to 403s
* Add typeguard
* Use Promise.resolve
* Update callApiAndParseWithhTimeout test
* Disable parseResponse test
* Try catch
* Handle npm 8 issues
* enable confidence intervals and y_hat without forecast
* fix if statement
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
* feat(explore): export csv data pivoted for Pivot Table
* Implement dropdown with download csv options
* Change label to "Original"
* Add tests
* Add form data to query context
* Add form data to query context generator
* Explicitly make form_data optional
* feat: Adds a key-value endpoint to store the state of dashboard filters
* Fixes pylint issues
* Adds openapi schemas
* Adds more tests, move logic to commands and use singular form for the endpoint name
* Fixes model description
* Removes database model
* Adds open api specs
* Simplifies the commands
* Adds more tests
* Validates the value content and submits the correct http status code
* Fixes import order
* Skips flakky test
* Fixes tests
* Updates UPDATING.md
* fix: Dashboard access when RBAC is disabled
* Sends 403 when forbidden
* Fixes issort
* Changes assertion
* Allow access to unpublished dashboards that don't have roles
* Fixes the test_get_dashboard_changed_on test
* Fix _latest_partition_from_df in HiveEngineSpec
* Add test HiveEngineSpec._latest_partition_from_df
* Fix formatting to pass black
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
* fix: Always use temporal type for dttm columns
* move inference and implement in chart postproc
* fix test
* fix test case
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
* fix: feature flags typing
* fix tests
* add note in UPDATING.md
* fix frontend
* also move SCHEDULED_QUERIES to top level
* fix test
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
* "P1W" grain should respect DATEFIRST setting in MS SQL Server
* Added "week_start_sunday" and "week_start_monday" grains support. Adjusted the "week" grain for better backward compatibility with MS SQL 2005/2008.
* Stylistic and linter-requested changes
* fix test
Co-authored-by: Valeriy Aleksashkin <v.aleksashkin@gmail.com>
Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
* add support for adhoc columns to api and sqla model
* fix some types
* fix duplicates in column names
* fix more lint
* fix schema and dedup
* clean up some logic
* first pass at fixing viz.py
* Add frontend support for adhoc columns
* Add title edit
* Fix showing custom title
* Use column name as default value in sql editor
* fix: Adds a loading message when needed in the Select component (#16531)
* fix(tests): make parquet select deterministic with order by (#16570)
* bump emotion to help with cache clobbering (#16559)
* fix: Support Jinja template functions in global async queries (#16412)
* Support Jinja template functions in async queries
* Pylint
* Add tests for async tasks
* Remove redundant has_request_context check
* fix: impersonate user label/tooltip (#16573)
* docs: update for small typos (#16568)
* feat: Add Aurora Data API engine spec (#16535)
* feat: Add Aurora Data API engine spec
* Fix lint
* refactor: sql_json view endpoint: encapsulate ctas parameters (#16548)
* refactor sql_json view endpoint: encapsulate ctas parameters
* fix failed tests
* fix failed tests and ci issues
* refactor sql_json view endpoint: separate concern into ad hod method (#16595)
* feat: Experimental cross-filter plugins (#16594)
* fix:fix get permission function
* feat: add cross filter chart in charts gallery under FF
* chore(deps): bump superset-ui to 0.18.2 (#16601)
* update type guard references
* fix imports
* update series_columns schema
* Add changes that got lost in rebase
* Use current columns name or expression as sql editor init value
* add integration test and do minor fixes
* Bump superset-ui
* fix linting issue
* bump superset-ui to 0.18.22
* resolve merge conflict
* lint
* fix select filter infinite loop
* bump superset-ui to 0.18.23
* Fix auto setting column popover title
* Enable adhoc columns only if UX_BETA enabled
* put back removed test
* Move popover height and width to constants
* Refactor big ternary expression
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Rob DiCiuccio <rob.diciuccio@gmail.com>
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
Co-authored-by: joeADSP <75027008+joeADSP@users.noreply.github.com>
Co-authored-by: ofekisr <35701650+ofekisr@users.noreply.github.com>
Co-authored-by: simcha90 <56388545+simcha90@users.noreply.github.com>
* add fallback and validation for report and cron timezones
* add logging to exception catch
* Run black
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* Add support for datetime.time in json_int_dttm_ser
* Test base_json_conv support for datetime.time
* Group types by conversion function for JSON dump
* fix: set correct schema on config import
* Fix lint
* Fix test
* Fix tests
* Fix another test
* Fix another test
* Fix base test
* Add helper function
* Fix examples
* Fix test
* Fix test
* Fixing more tests
* Test that failing export or import is done properly
For each CLI entry-point we will modify, we make sure that:
- a failing process exits with a non-0 exit code,
- an error is logged.
Signed-off-by: Étienne Boisseau-Sierra <etienne.boisseau-sierra@unipart.io>
* Exit process with error if export/import failed
Bubble exception up when failing import or export
During a CLI import or export of dashboards, if the process fails, the
exception it caught and a simple message is sent to the logger.
This makes that from a shell point of view, the script was successfull —
cf. #16956.
To prevent this, we want to ensure that the process exits with an error
(i.e., a non-0 exit-code) should the export or import fail mid-flight.
Signed-off-by: Étienne Boisseau-Sierra <etienne.boisseau-sierra@unipart.io>
* abstract boilerplate code into class and rename csv to file
* add db migration
* fix some stuff
* more renaming of csv to file
* rename in translations
* update down revision
* update down revision
* bump chart version
* switch to alter column name approach in db migration
* fix db migration for MySQL
* db migration conflict
* fix: preventing sql lab None limit value
* test: create a test for the fix
* pylint (#17172)
* add test (#17173)
Co-authored-by: Hugh A. Miles II <hughmil3s@gmail.com>
* chore move sql_execution_context to sqllab package
* add new helper methods into base Dao
* refactor separate get existing query concern from command
* refactor separate query access validation concern
* refactor separate get query's database concern from command
* refactor separate get query rendering concern from command
* refactor sqllab_execution_context
* refactor separate creating payload for view
* chore decouple command from superset app
* fix pylint issues
* fix failed tests
* fix pylint issues
* fix failed test
* fix failed black
* fix failed black
* fix failed test
* New branch from superset for integration with firebolt sqlalchemy adapter
* Added db_engine_spec file for Firebolt
* Removed firebolt code from superset repo
* Deleted virtual env commit
* Adding time grain changes to firebolt.py
* Updated README.md
Added steps to install and run Superset with Firebolt SQLAlchemy Adapter
* Update README.md
Reduced installation steps. Using PyPi installation for adapter now
* Revert "Update README.md"
This reverts commit 5ed17c7a45.
* Revert "Updated README.md"
This reverts commit 45c5072649.
* added epoch methods, added test cases for firebolt db engine spec and edited setup.py
* Added license to files
* Added documentation for Firebolt-SQLAlchemy
* Removed trailing whitespace
Co-authored-by: raghavsharma <raghavs@sigmoidanalytics.com>
Co-authored-by: raghavSharmaSigmoid <88667094+raghavSharmaSigmoid@users.noreply.github.com>
* first pass private gsheets
* made encrypted extra into string, refactored onParametersChanged
* private sheets working, credential_info errors
* all but test connection working
* first pass private gsheets
* made encrypted extra into string, refactored onParametersChanged
* private sheets working, credential_info errors
* all but test connection working
* Regenerate package-lock.json
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* feat: add global max limit
* fix lint and tests
* leave SAMPLES_ROW_LIMIT unchanged
* fix sample rowcount test
* replace max global limit with existing sql max row limit
* fix test
* make max_limit optional in util
* improve comments
* feat: add support for generic series limit
* refine series_columns logic
* update docs
* bump superset-ui
* add note to UPDATING.md
* remove default value for timeseries_limit
* Fixing assignment.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
* Adding unit test for FilterBoxViz.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
* Reformatting with black.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
* Revert format change in other test.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
* Reformatting with the same black version with pre-commit config.
Signed-off-by: tianhe1986 <w1s2j3229@163.com>
* allow csv upload to accept parquet file
* fix mypy
* fix if statement
* add test for specificying columns in CSV upload
* clean up test
* change order in test
* fix failures
* upload parquet to seperate table in test
* fix error message
* fix mypy again
* rename other extensions to columnar
* add new form for columnar upload
* add support for zip files
* undo csv form changes except usecols
* add more tests for zip
* isort & black
* pylint
* fix trailing space
* address more review comments
* pylint
* black
* resolve remaining issues
* chore: Shows the dataset description in the gallery dropdown
* chore: Adjusts the tooltip positioning, fixes the search and removes unnecessary bootstrap data
* feat(cross-filters): add support for temporal filters
* fix test
* make filter optional
* remove mocks
* fix more tests
* remove unnecessary optionality
* fix even more tests
* bump superset-ui
* add isExtra to schema
* address comments
* fix presto test
Co-authored-by: Lyndsi Kay Williams <55605634+lyndsiWilliams@users.noreply.github.com>
Co-authored-by: AAfghahi <48933336+AAfghahi@users.noreply.github.com>
* feat: auto sync dataset metadata when change dataset
* diablo sync button when edit mode
* handle undefine schema
* fix py UT
* fix FE UT
* improve test coverage
* fix UT
* feat: send data embedded in report email
* Change post-processing to use new endpoint
* Show TEXT option only to text-based vizs
* Fix test
* feat: send data embedded in report email
* feat: send report data to Slack
* Add unit test
* trigger tests
* feat: send data embedded in report email
* Prettify table
* Change post-processing to use new endpoint
* Show text option only for text viz
* Show TEXT option only to text-based vizs
* Fix test
* Add email test
* Add unit test
* rebase master and resolve conflicts
* pylint to makefile
* fix crash when pivot operator
* fix comments
* add precision argument
* query test
* wip
* fix ut
* rename
* set time_offsets to cache key
wip
* refactor get_df_payload
wip
* extra query cache
* cache ut
* normalize df
* fix timeoffset
* fix ut
* make cache key logging sense
* resolve conflicts
* backend follow up iteration 1
wip
* rolling window type
* rebase master
* py lint and minor follow ups
* pylintrc
* feat: cancel db query on stop
* fix pylint
* Add unit tests
* Do not bind multiple times
* Stop only running queries
* Postgres to cancel only the required query
* Remove extra log
* Add docstring
* Better types, docstring and naming
* Use python3 format strings
* Update superset/sql_lab.py
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* Add cancel_query_on_windows_unload option to database
* Return cancel_query as bool
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
* chore: move memoized test into a separated file
create integration test workflow
* chore: create unit test workflow to run purely pytest
* fix: bad reference
* fix: remove pip requirements bc there aren't any yet
* temp: install unit dependencies directly
* fix: --rootdir=
* fix: try to run only unit test
* chore: decouple memoized as separated module
* fix: bring back dependencies bc superset top-level module is coupled to flask and others so no reason no to do it
* fix: reference
* fix: pre-commit
* fix: pylint