Commit Graph

68 Commits

Author SHA1 Message Date
Vitor Avila 66bf70172f
fix(API): Updating assets via the API should preserve ownership configuration (#27364) 2024-03-06 16:40:41 +00:00
John Bodley 847ed3f5b0
refactor: Ensure Flask framework leverages the Flask-SQLAlchemy session (Phase II) (#26909) 2024-02-14 06:20:15 +13:00
John Bodley 77bd7cf1c6
chore: Reenable SQLite tests which leverage foreign key constraints et al. (#24605) 2024-01-09 06:33:47 +13:00
John Bodley 07bcfa9b5f
chore(command): Organize Commands according to SIP-92 (#25850) 2023-11-22 16:55:54 -03:00
Stepan 14c324950a
feat(datasource): Checkbox for always filtering main dttm in datasource (#25204)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
2023-09-14 15:57:08 -07:00
Daniel Vaz Gaspar a9efd4b2e3
fix: dataset safe URL for explore_url (#24686) 2023-08-23 09:31:44 -03:00
Jack Fragassi 4a59a265fb
chore: Update DAOs to use singular deletion method instead of bulk (#24894) 2023-08-17 17:00:33 -07:00
Ville Brofeldt f94dc49fd0
fix(snowflake): opt-in denormalization of column names (#24982) 2023-08-15 16:32:54 -07:00
John Bodley a156816064
chore(command): Condense delete/bulk-delete operations (#24607)
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
2023-07-12 15:45:29 -07:00
John Bodley 7409289762
chore(dao): Condense delete/bulk-delete operations (#24466)
Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
2023-07-06 09:21:08 -07:00
John Bodley 75543af550
chore(dao): Add explicit ON DELETE CASCADE when deleting datasets (#24488) 2023-06-28 16:03:25 -07:00
Hugh A. Miles II 93e1db4bd9
fix: save columns reference from sqllab save datasets flow (#24248) 2023-06-20 13:54:19 -04:00
Jack Fragassi 5af298e1f6
chore: Migrate warm up cache endpoint to api v1 (#23853) 2023-06-20 12:08:29 +01:00
John Bodley 3e76736874
chore(dao): Organize DAOs according to SIP-92 (#24331)
Co-authored-by: JUST.in DO IT <justin.park@airbnb.com>
2023-06-18 18:32:32 -07:00
Daniel Vaz Gaspar 23bb1c48a1
chore: remove deprecated apis and ENABLE_BROAD_ACTIVITY_ACCESS (#24400) 2023-06-15 22:11:24 +01:00
Michael S. Molina a7f7f6645d
feat: Convert ENABLE_BROAD_ACTIVITY_ACCESS and MENU_HIDE_USER_INFO into feature flags (#24345) 2023-06-12 10:40:22 -07:00
John Bodley 0e3f1f638c
chore: Remove deprecated ENABLE_ACCESS_REQUEST workflow (#24266) 2023-06-09 18:54:31 -07:00
John Bodley a4d5d7c6b9
chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
Ville Brofeldt 8375baac99
fix(dataset-api): allow undefined schema in post (#24242) 2023-05-30 17:48:54 +03:00
John Bodley d583ca9ef5
chore: Embrace the walrus operator (#24127) 2023-05-19 00:37:13 -07:00
Geido 66fb4867dc
chore: Remove unnecessary information from response (#24056) 2023-05-17 20:07:47 +03:00
Jack Fragassi 44557f5a23
chore(api v1): Deprecate datasource/save and datasource/get endpoints (#23678) 2023-04-18 17:51:24 -07:00
Michael S. Molina 04bd528bed
chore: Removes the UX_BETA feature flag (#23651) 2023-04-13 10:32:34 -03:00
Hugh A. Miles II b820eb8235
chore: Update pre-commit packages (#23173) 2023-03-13 17:05:13 -06:00
Ville Brofeldt 89576f8a87
fix(rbac): show objects accessible by database access perm (#23118) 2023-02-24 10:45:16 +02:00
Jack Fragassi 3fae7dbc34
chore: Migrate get_or_create_table endpoint to api v1 (#22931) 2023-02-15 10:38:51 +00:00
Josh Soref 02e5dcbbf2
chore(misc): Spelling (#19678)
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2023-01-25 16:35:08 -07:00
John Bodley 92cdb8c282
chore: Add explicit bidirectional performant relationships for SQLA model (#22413) 2023-01-21 10:17:56 +13:00
Daniel Vaz Gaspar edcbf597f5
chore: re add upload tests (#22753) 2023-01-17 17:33:23 +00:00
John Bodley 7e54b88a51
chore: Change get_table_names/get_view_names return type (#22085) 2022-11-18 12:41:21 -08:00
Elizabeth Thompson 86d52fcbc4
chore: remove shadow write of new sip 68 dataset models (#21986) 2022-11-14 09:55:53 -08:00
Hugh A. Miles II 7600da8041
feat: create function for get_sqla_engine with context (#21790) 2022-10-25 14:12:48 -04:00
Shubham Sinha decb2fb591
feat(datasets): Change in API to create virtual datasets (#21840) 2022-10-19 15:05:21 +01:00
Reese a5ff0949a6
feat(api): Add option to enable sync on import (#20312) 2022-10-07 15:28:38 -03:00
Beto Dealmeida 34a79add04
feat: filter parameters from DB API (#21248) 2022-09-02 11:50:04 -07:00
Daniel Vaz Gaspar 3f2e894af3
fix: dataset name change and permission change (#21161)
* fix: dataset name change and permission change
2022-08-31 18:11:03 +01:00
Reese 16032ed3e2
feat: Virtual dataset duplication (#20309)
* Inital duplicate functionality

* Fix formatting

* Create dedicated duplicate API

* Make use of new API

* Make use of new api permissions

* Add integration tests for duplicating datasets

* Add licenses

* Fix linting errors

* Change confirm button to 'Duplicate'

* Fix HTTP status code and response

* Add missing import

* Use user id instead of user object

* Remove stray debug print

* Fix sqlite tests

* Specify type of extra

* Add frontend tests

* Add match statement to test
2022-08-26 16:07:56 -06:00
Bogdan 17b58037f8
perf: Implement model specific lookups by id to improve performance (#20974)
* Implement model specific lookups by id to improve performance

* Address comments e.g. better variable names and test cleanup

* commit after cleanup

* even better name and test cleanup via rollback

Co-authored-by: Bogdan Kyryliuk <bogdankyryliuk@dropbox.com>
2022-08-09 09:59:31 -07:00
Hugh A. Miles II bc435e08d0
fix: overwrite update override columns on PUT /dataset (#20862)
* update override columns

* save

* fix overwrite with session.flush

* write test

* write test

* layup

* address concerns

* address concerns
2022-07-29 21:51:35 -04:00
Yongjie Zhao f011abae2b
feat: the samples endpoint supports filters and pagination (#20683) 2022-07-22 20:14:42 +08:00
Beto Dealmeida e60083b45b
chore: upgrade SQLAlchemy to 1.4 (#19890)
* chore: upgrade SQLAlchemy

* Convert integration test to unit test

* Fix SQLite

* Update method names/docstrings

* Skip test

* Fix SQLite
2022-07-18 15:21:38 -07:00
Elizabeth Thompson 5a137820d0
fix: catch some potential errors on dual write (#20351)
* catch some potential errors on dual write

* fix test for sqlite
2022-06-13 17:30:13 -07:00
Reese 11b33de61b
feat(api): Added "kind" to dataset/<pk> endpoint (#20113) 2022-06-10 13:03:48 -07:00
Yongjie Zhao 1530c34792
fix: failed samples should throw exception (#20228) 2022-06-01 18:24:01 +08:00
Yongjie Zhao 40abb44ba1
feat: add samples endpoint (#20170) 2022-05-25 18:18:58 +08:00
cccs-tom b0c6935f06
fix: Allow dataset owners to see their datasets (#20135) 2022-05-25 09:58:15 +01:00
Hugh A. Miles II f8ea7788a9
feat: Add Certified filter to Datasets (#20136) 2022-05-23 17:58:15 -04:00
cccs-RyanS ddc01ea781
feat(business-types): initial implementation of SIP-78 (#18794)
* add BUSINESS_TYPE_ADDONS to config with example callback

* Removing uneeded whitespace

* [Work in progress] Modifying cidr function to allow for  single ip and adding port outline

* Added test REST endpoint, added some more ports

I've thrown in a test.py script as well that will try to connect to the
business_type endpoint.

* Moving code from config.py into the business api

Very simple api is exposed that will allow someone to call a checkport
endpoint and get back a response.

* Removing commented out bits.

* Adding fucntion dict back to the config

* Moving business_type endpoint to charts

* Adding schema for get endpoint

* Removing imports, updating docstring, fixing typo

Just some small changes as described in the title.  I've updated the
test.py as well so it functions with the endpoint changes.

* Adding translation dict

* Fixing ops

* Adding check for list

* Modifying changes to add quotes where needed

Also changed BusinessTypeResponse to resp.

* Adding in some code to call the filter config

If a column starts with "cidr_" it will call the code in config.py to
try to translate the filter.  Nothing is changed in the JSON being
executed, just some information is dumped to console.

* Porting Ryan's changes

* Adding migration script (as per Ryan's PR)

* Fixing typo

* Prettier fixes

* [CLDN-1043] Adding rough version of filter changes for business types

* fix down migration

* Fixing bugs after merge

* adding functionality to appy filters in back end

* Fixing linting issues

* fix down revision

* Changing conversion callback to handle multiple values at once

* Adding string representation of values

* Code cleanup plus fixing debouce to only be called once for each entry

* Removing non needed logginh

* Changing operator list to use sting values

* Using text value operators

* Removing clear operator call

* Moving business type endpoints

* fix down revision

* Adding port functions

* update migration

* fix bad rebase and add ff

* implement validator

* dont add invalid values to response

* [CLDN-1205] Added a new exception type for a business type translation error. Added the error message in the display_value field within the business type response. Modified the IP and Port business types to populate the error message field in the response if an error occurs

* [CLDN-1205] Added meaningful error message for port translation errors

* Removing status field from businesstype Response and adding in error message

* [CLDN-1205] Added check to make sure the port business type is within the valid range of ports, if it is not, it will populate the error message

* [CLDN-1205] Fixed the if statement that checks to see if the string_value is in the valid range of port numbers. It did not corrently verify this before now.

* [CLDN-1205] Fixed an error where it was trying to use string_value in <= statements. I just casted string_value to an integer if it is numeric, which allows <= operators to be used on it

* [CLDN-1207] Added unit tests for the cidr_func and port_translation_func functions which are located in /superset/config.py

* [CLDN-1207] removed the assertRaises line as it does not work with the cidr_func and port_translation_func functions

* [CLDN-1207] Added the skeleton of the test_cidr_translate_filter_func unit test, still need to update what the expected response from the function will be.

* [CLDN-1207] Added the remainder of the back-end unit tests for the business types

* [CLDN-1207] Fixed the syntax error which caused the test_cidr_translate_filter_func_NOT_IN_double unit test to fail

* [CLDN-1207] Removed the logging that was added for debugging purposes

* [CLDN-1207] Formatted the commands_tests.py file to make it nicer to look at/read through

* [CLDN-1207] Fixed the code so that it conformed to the pylint requirements (i.e., pylint no longer complains about the code in commands_tests.py)

* [CLDN-1207] Modified some of the docstrings so they made better use of the 100 character per line, line limit

* [CLDN-1207] Added the beginnings of the unit tests for the
business types API

* [CLDN-1207] Added a comment to the top of the commands_tests.py file explaining how to run the unit tests. This prevents the next person who tries to run them from having to waste time trying the different forms of testing that Superset supports (e.g., pytest, tox, etc.)

* [CLDN-1207] Added a grammar fix to the comments describing how to run the unit tests

* [CLDN-1207] Modified the description of the business_type API endpoints as they did not represent what the API was actually doing

* [CLDN-1207] Added further instructions on how to run the unit tests that are within the business_type/api_tests.py file

* add request validation

* disable request if business type missing

* [CLDN-1207] Unit tests for the business type API are now working, however, they need to be modified to make use of @mock as we don't want to have to run the server to be able to run the unit tests

* Removing businesss types deffinitons from config

* Adding select to only show valid business types

* Fixed Enzyme tests

* Added scalfolding for selecting filter dropdown

* Adding intigration tests

* fix revision

* fix typos and unnecessary requests

* break out useBusinessTypes

* Added front-end RTL unit tests for the business type API endpoint

* Fixed error from unit tests

* Added a unit test to ensure the operator list is updated after a business type API response is received

* Removing elect compoenet for business types

* Adding feature flag and allowing saving when no business type present

* fixing useEffect hooks

* Adding feature flag to model

* Changing behavior such that an empty string returns a default response

* add form validation

* Modified comments in unit test as command to run test has changed

* Modified comments in unit test as filename to run test has changed

* Modified the api_tests.py file to conform to the linting requirements

* Changed the name of one of the tests to reflect what the test is actually testing

* Added cypress back to the package.json

* Added informative comments

* Updated comments in files as well as removed imports which were not being used

* Changes made by npm run prettier

* Fixed spelling mistakes

* Updated models.py to remove placeholder comments used in development

* Added feature flag mocking in unit test

* Fixing open api failure

* Fixing business types to pass unit tests

* Reverting unsafe connections back to false

* Removing print statement

* Adding business tpye to export test

* setting default feature flag to false for business type

* Reverting pre commit

* Reverting pre commit and running pre commit

* Reverting pre commit and running pre commit

* Fixing formatting

* Adding license

* Fixing Linting

* Protecting api enpoints

* updating model

* Fixing code path when business type exists

* Linting

* Linting

* Fixing linting

* Fixing spelling

* Fixing schemas

* Fixing app import

* fixing item render

* Added RTL test to make sure business type operator list is updated after API response

* Fixing linting

* fix migration

* Changing unit tests

* Fixing import and DB migration after rebase

* Renaming to advanced types

* Fixing Linting

* More renaming

* Removing uneeded change

* Fixing linting and test errors

* Removing unused imports

* linting

* Adding more detailed name for migration

* Moving files to plugins

* more renaming

* Fixing schema name

* Disabling feature flag that should not be enabled by default

* Adding extra cehck

* NameChange

* formatting

* Fixing equals check

* Moveing all advanced type classes and types to one file, and converting tests to functional

* Adding advanced type to test and fix linitng

Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com>
Co-authored-by: Dan Parent <daniel.parent@cse-cst.gc.ca>
Co-authored-by: GITHUB_USERNAME <EMAIL>
Co-authored-by: cccs-Dustin <96579982+cccs-Dustin@users.noreply.github.com>
2022-05-16 17:58:21 +03:00
Ville Brofeldt a619cb4ea9
chore: upgrade black (#19410) 2022-03-29 20:03:09 +03:00
David Aaron Suddjian 97abc28a1f
chore!: remove `ENABLE_REACT_CRUD_VIEWS` feature flag (permanently enable) (#19231)
* remove ENABLE_REACT_CRUD_VIEWS feature flag

* docs

* deal with problematic tests

* empty test suite

* skip test

* test conditions changed

* removing the tests instead of skipping
2022-03-18 14:00:23 -07:00