You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2021/04/14 20:14:04 UTC
[superset] branch hugh/text-db-config created (now cf75d8f)
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a change to branch hugh/text-db-config
in repository https://gitbox.apache.org/repos/asf/superset.git.
at cf75d8f move messaging to config
This branch includes the following new commits:
new 1e58133 yea
new 59fc95a Merge branch 'master' of https://github.com/apache/superset into hugh/text-db-config
new cf75d8f move messaging to config
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[superset] 01/03: yea
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh/text-db-config
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 1e58133282464311da96251c8b9ea850a26562d4
Author: hughhhh <hu...@gmail.com>
AuthorDate: Tue Apr 13 12:48:38 2021 -0400
yea
---
CONTRIBUTING.md | 5 +++++
Makefile | 14 +++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 40818ab..3a979c9 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -442,6 +442,11 @@ superset load-examples
# Note that your page may not have css at this point.
# See instructions below how to build the front-end assets.
FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger
+
+Or you can install via our Makefile
+
+```bash
+make install
```
**Note: the FLASK_APP env var should not need to be set, as it's currently controlled
diff --git a/Makefile b/Makefile
index 2da12c8..e3f4c29 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,8 @@
-# This is the default target, which will be built when
+# This is the default target, which will be built when
# you invoke make
.PHONY: all
-all: install
+all:
-# This rule tells make how to build hello from hello.cpp
install:
# Install external dependencies
pip install -r requirements/local.txt
@@ -22,8 +21,13 @@ install:
# Load some data to play with
superset load-examples
-
+
venv:
# Create a virtual environment and activate it (recommended)
python3 -m venv venv # setup a python3 virtualenv
- source venv/bin/activate
\ No newline at end of file
+ source venv/bin/activate
+
+pre-commit:
+ # setup pre commit dependencies
+ pip3 install -r requirements/integration.txt
+ pre-commit install
[superset] 02/03: Merge branch 'master' of
https://github.com/apache/superset into hugh/text-db-config
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh/text-db-config
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 59fc95a132642dab30ca805916bf084fa9ef7378
Merge: 1e58133 3c88d25
Author: hughhhh <hu...@gmail.com>
AuthorDate: Tue Apr 13 15:05:32 2021 -0400
Merge branch 'master' of https://github.com/apache/superset into hugh/text-db-config
.github/workflows/ephemeral-env.yml | 21 +
.github/workflows/superset-websocket.yml | 33 +
CONTRIBUTING.md | 12 +-
UPDATING.md | 2 +
docs/.nvmrc | 1 +
docs/installation.rst | 3 +-
docs/sqllab.rst | 2 +-
docs/src/pages/docs/Miscellaneous/index.mdx | 98 +-
docs/src/pages/docs/Miscellaneous/issue_codes.mdx | 36 +
docs/src/pages/docs/installation/configuring.mdx | 2 +-
docs/src/pages/docs/installation/index.mdx | 32 +-
helm/superset/templates/NOTES.txt | 3 +-
helm/superset/templates/deployment-beat.yaml | 7 +
helm/superset/templates/deployment-worker.yaml | 7 +
helm/superset/templates/deployment.yaml | 7 +
.../superset/templates/secret-superset-config.yaml | 2 +-
helm/superset/values.yaml | 18 +
setup.cfg | 2 +-
.../cypress/integration/dashboard/load.test.ts | 20 +-
.../integration/dashboard/nativeFilters.test.ts | 19 +-
superset-frontend/package-lock.json | 898 +-
superset-frontend/package.json | 56 +-
superset-frontend/spec/helpers/reducerIndex.ts | 2 +
.../components/TableView/TableView_spec.tsx | 143 -
.../components/HeaderActionsDropdown_spec.jsx | 14 +-
.../dashboard/components/Header_spec.jsx | 10 +-
.../components/nativeFilters/FilterBar_spec.tsx | 50 -
.../dashboard/fixtures/mockNativeFilters.ts | 35 +-
.../datasource/ChangeDatasourceModal_spec.jsx | 2 +-
.../explore/components/CheckboxControl_spec.jsx | 19 +-
.../spec/javascripts/sqllab/TableElement_spec.jsx | 9 +-
.../CRUD/data/savedquery/SavedQueryList_spec.jsx | 83 +-
.../src/SqlLab/components/QueryTable.jsx | 6 +-
.../src/SqlLab/components/TableElement.jsx | 13 +-
superset-frontend/src/SqlLab/main.less | 2 +-
superset-frontend/src/chart/chartReducer.ts | 7 +-
.../index.jsx => common/components/Card.tsx} | 27 +-
superset-frontend/src/common/components/index.tsx | 6 +-
.../src/common/hooks/apiResources/dashboards.ts | 41 +
.../src/common/hooks/apiResources/index.ts | 3 +-
.../AlteredSliceTag/AlteredSliceTag.test.jsx | 2 +-
.../src/components/Checkbox/CheckboxIcons.tsx | 103 +-
.../src/components/ErrorBoundary/index.jsx | 2 +-
.../src/components/ErrorMessage/types.ts | 16 +-
.../IndeterminateCheckbox.stories.tsx} | 41 +-
.../IndeterminateCheckbox.test.tsx | 82 +
.../index.tsx} | 2 +-
.../src/components/ListViewCard/index.tsx | 8 +-
.../components/Slider/Slider.stories.tsx} | 57 +-
.../index.tsx} | 14 +-
.../src/components/TableView/TableView.stories.tsx | 85 +
.../src/components/TableView/TableView.test.tsx | 193 +
.../src/components/TableView/TableView.tsx | 4 +-
superset-frontend/src/dashboard/App.jsx | 30 +-
.../src/dashboard/actions/dashboardState.js | 24 +
.../getInitialState.js => actions/hydrate.js} | 199 +-
.../src/dashboard/actions/nativeFilters.ts | 21 +-
.../components/CssEditor/CssEditor.test.tsx | 91 +
.../{CssEditor.jsx => CssEditor/index.jsx} | 1 -
.../DashboardBuilder/DashboardBuilder.tsx | 2 +-
.../src/dashboard/components/DashboardGrid.jsx | 1 -
.../src/dashboard/components/Header.jsx | 9 +-
.../dashboard/components/HeaderActionsDropdown.jsx | 22 +-
.../PropertiesModal/PropertiesModal.test.tsx | 319 +
.../index.jsx} | 11 +-
.../src/dashboard/components/SaveModal.tsx | 2 +-
.../components/SliceHeader/SliceHeader.test.tsx | 399 +
.../{SliceHeader.tsx => SliceHeader/index.tsx} | 31 +-
.../components/SliceHeaderControls/index.jsx | 30 +-
.../UndoRedoKeyListeners.test.tsx | 64 +
.../index.jsx} | 6 +-
.../components/filterscope/FilterFieldItem.jsx | 1 -
.../components/filterscope/FilterFieldTree.jsx | 3 +-
.../components/filterscope/FilterScope.test.tsx | 373 +
.../components/filterscope/FilterScopeModal.tsx | 1 -
.../components/filterscope/FilterScopeSelector.jsx | 28 +-
.../components/filterscope/FilterScopeTree.jsx | 3 +-
.../filterscope/renderFilterFieldTreeNodes.jsx | 1 -
.../filterscope/renderFilterScopeTreeNodes.jsx | 4 +-
.../dashboard/components/gridComponents/Chart.jsx | 3 +
.../components/gridComponents/Tab.test.tsx | 235 +
.../components/gridComponents/Tabs.test.tsx | 233 +
.../menu/ShareMenuItems/ShareMenuItems.test.tsx | 194 +
.../index.tsx} | 0
.../CascadeFilterControl.test.tsx | 76 +
.../index.tsx} | 8 +-
.../index.tsx} | 8 +-
.../nativeFilters/FilterBar/FilterBar.test.tsx | 86 +
.../FilterConfigurationLink.test.tsx | 49 +
.../index.tsx} | 4 +-
.../FilterBar/FilterSets/EditSection.test.tsx | 113 +
.../FilterBar/FilterSets/EditSection.tsx | 2 +-
.../FilterBar/FilterSets/FilterSetUnit.test.tsx | 100 +
.../FilterBar/FilterSets/FilterSetUnit.tsx | 2 +-
.../FilterBar/FilterSets/FilterSets.test.tsx | 67 +
.../FilterBar/FilterSets/FiltersHeader.test.tsx} | 55 +-
.../FilterBar/FilterSets/FiltersHeader.tsx | 5 +-
.../FilterBar/FilterSets/Footer.test.tsx | 94 +
.../nativeFilters/FilterBar/FilterSets/Footer.tsx | 2 +-
.../FilterSets/{FilterSets.tsx => index.tsx} | 3 +-
.../FilterSets/utils/findExistingFilterSet.test.ts | 144 +
.../FilterSets/utils/generateFiltersSetId.test.ts} | 13 +-
.../utils/getFilterValueForDisplay.test.ts | 42 +
.../FilterSets/{utils.ts => utils/index.ts} | 13 +-
.../nativeFilters/FilterBar/Header/Header.test.tsx | 113 +
.../FilterBar/{Header.tsx => Header/index.tsx} | 14 +-
.../FilterBar/{FilterBar.tsx => index.tsx} | 6 +-
.../FiltersConfigForm/ColumnSelect.test.tsx | 96 +
.../FiltersConfigForm/ControlItems.test.tsx | 128 +
.../FiltersConfigForm/DefaultValue.tsx | 8 +-
.../src/dashboard/containers/Chart.jsx | 1 +
.../src/dashboard/containers/DashboardHeader.jsx | 2 +-
.../src/dashboard/containers/DashboardPage.tsx | 90 +
superset-frontend/src/dashboard/index.jsx | 11 +-
.../src/dashboard/reducers/dashboardFilters.js | 6 +-
.../src/dashboard/reducers/dashboardInfo.js | 9 +-
.../src/dashboard/reducers/dashboardLayout.js | 8 +
.../src/dashboard/reducers/dashboardState.js | 4 +
.../src/dashboard/reducers/datasources.js | 21 +-
superset-frontend/src/dashboard/reducers/index.js | 2 +
.../src/dashboard/reducers/nativeFilters.ts | 5 +
.../src/dashboard/reducers/sliceEntities.js | 6 +
.../dashboard/reducers/undoableDashboardLayout.js | 4 +
.../dashboard/util/activeAllDashboardFilters.ts | 2 +-
.../datasources.js => util/getPermissions.ts} | 35 +-
.../src/datasource/DatasourceEditor.jsx | 5 +-
.../explore/components/ControlPanelsContainer.tsx | 3 +-
.../DataTablesPane/DataTablesPane.test.tsx | 109 +
.../index.tsx} | 6 +-
.../AdhocMetricEditPopover.test.tsx | 184 +
.../index.jsx} | 10 +-
.../explore/components/controls/SliderControl.jsx | 15 +-
.../explore/components/controls/VizTypeControl.jsx | 17 +-
.../exploreUtils/getAnnotationJsonUrl.test.ts} | 47 +-
.../explore/exploreUtils/getChartDataUri.test.ts | 73 +
.../exploreUtils/getChartKey.test.ts} | 12 +-
.../explore/exploreUtils/getExploreLongUrl.test.ts | 92 +
.../src/explore/exploreUtils/getExploreUrl.test.ts | 51 +
.../src/explore/exploreUtils/getHostName.test.ts | 52 +
.../exploreUtils/getLegacyEndpointType.test.ts} | 26 +-
.../exploreUtils/getSimpleSQLExpression.test.ts | 62 +
.../explore/exploreUtils/getURIDirectory.test.ts} | 20 +-
.../{exploreUtils.js => exploreUtils/index.js} | 4 +-
.../exploreUtils/shouldUseLegacyApi.test.ts | 52 +
.../components/Select/SelectFilterPlugin.tsx | 81 +-
.../src/filters/components/Select/controlPanel.ts | 14 +
.../filters/components/Select/transformProps.ts | 11 +-
.../src/filters/components/Select/types.ts | 11 +-
.../Dashboard.ts} | 27 +-
.../BootstrapSliderWrapper.less => types/Role.ts} | 13 +-
.../src/views/CRUD/alert/ExecutionLog.tsx | 2 +-
.../src/views/CRUD/annotation/AnnotationModal.tsx | 7 +-
.../views/CRUD/data/savedquery/SavedQueryList.tsx | 84 +-
superset-frontend/src/views/CRUD/utils.tsx | 12 +-
.../.eslintignore | 28 +-
.../.eslintrc.js | 36 +-
.../.gitignore | 28 +-
superset-websocket/.nvmrc | 1 +
.../.prettierignore | 32 +-
superset-websocket/.prettierrc.json | 5 +
superset-websocket/README.md | 106 +
superset-websocket/config.example.json | 16 +
superset-websocket/config.test.json | 12 +
.../jest.config.js | 13 +-
superset-websocket/package-lock.json | 13474 +++++++++++++++++++
superset-websocket/package.json | 41 +
superset-websocket/spec/index.test.ts | 486 +
superset-websocket/src/index.ts | 465 +
superset-websocket/tsconfig.json | 12 +
superset-websocket/utils/README.md | 35 +
superset-websocket/utils/client-ws-app/.nvmrc | 1 +
superset-websocket/utils/client-ws-app/README.md | 42 +
superset-websocket/utils/client-ws-app/app.js | 57 +
superset-websocket/utils/client-ws-app/bin/www | 108 +
.../utils/client-ws-app/package-lock.json | 1871 +++
.../utils/client-ws-app/package.json | 17 +
.../utils/client-ws-app/public/javascripts/app.js | 63 +
.../client-ws-app/public/stylesheets/style.css | 23 +-
.../utils/client-ws-app/routes/index.js | 28 +-
.../utils/client-ws-app/views/error.jade | 23 +
.../utils/client-ws-app/views/index.jade | 32 +
.../utils/client-ws-app/views/layout.jade | 26 +
superset-websocket/utils/loadtest.js | 61 +
superset/app.py | 3 +-
superset/charts/api.py | 9 +-
superset/charts/schemas.py | 41 +-
superset/config.py | 66 +-
superset/connectors/sqla/models.py | 81 +-
superset/dashboards/api.py | 18 +-
superset/dashboards/commands/importers/v1/utils.py | 2 +-
superset/dashboards/dao.py | 4 +-
superset/databases/api.py | 12 +-
superset/databases/commands/exceptions.py | 15 +-
superset/databases/commands/test_connection.py | 57 +-
superset/datasets/commands/importers/v1/utils.py | 2 +-
superset/datasets/dao.py | 4 +-
superset/db_engine_specs/base.py | 30 +-
superset/db_engine_specs/postgres.py | 49 +
superset/db_engine_specs/presto.py | 54 +-
superset/errors.py | 44 +-
superset/exceptions.py | 40 +-
...88938_country_map_use_lowercase_country_name.py | 85 +
...ea61c5e7_remove_dataset_health_check_message.py | 68 +
superset/queries/saved_queries/api.py | 84 +-
.../queries/saved_queries/commands/exceptions.py | 15 +-
.../saved_queries/commands/importers/dispatcher.py | 67 +
.../commands/importers/v1/__init__.py | 71 +
.../{exceptions.py => importers/v1/utils.py} | 23 +-
superset/queries/saved_queries/schemas.py | 12 +
superset/reports/commands/alert.py | 14 +-
superset/reports/commands/execute.py | 39 +-
superset/reports/dao.py | 19 +
superset/reports/notifications/__init__.py | 4 +-
superset/reports/notifications/base.py | 1 +
superset/reports/notifications/email.py | 2 +
superset/reports/notifications/slack.py | 10 +-
superset/schemas.py | 49 +
superset/security/manager.py | 39 +-
superset/sql_lab.py | 17 +-
superset/tasks/async_queries.py | 17 +-
superset/tasks/scheduler.py | 18 +-
superset/utils/async_query_manager.py | 26 +-
superset/utils/log.py | 15 +-
superset/views/base.py | 87 +-
superset/views/base_api.py | 20 +-
superset/views/core.py | 49 +-
superset/views/dashboard/mixin.py | 3 +-
superset/views/datasource.py | 2 -
superset/viz.py | 12 +-
tests/charts/api_tests.py | 7 +
tests/charts/commands_tests.py | 2 +-
tests/dashboard_tests.py | 20 -
tests/dashboards/api_tests.py | 16 +
tests/dashboards/security/security_rbac_tests.py | 28 +-
tests/databases/api_tests.py | 139 +-
tests/datasets/api_tests.py | 25 +-
tests/datasets/commands_tests.py | 2 +-
tests/datasource_tests.py | 37 +-
tests/db_engine_specs/postgres_tests.py | 104 +-
tests/event_logger_tests.py | 36 +
tests/fixtures/importexport.py | 17 +-
tests/queries/saved_queries/api_tests.py | 57 +-
tests/queries/saved_queries/commands_tests.py | 112 +
tests/reports/commands_tests.py | 75 +-
tests/reports/scheduler_tests.py | 88 +
tests/security_tests.py | 5 +-
tests/sqla_models_tests.py | 56 +
tests/sqllab_tests.py | 30 +-
tests/superset_test_config.py | 2 +
.../superset_test_config_sqllab_backend_persist.py | 2 +-
tests/tasks/async_queries_tests.py | 51 +
tests/thumbnails_tests.py | 24 +-
252 files changed, 24653 insertions(+), 2085 deletions(-)
[superset] 03/03: move messaging to config
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hugh pushed a commit to branch hugh/text-db-config
in repository https://gitbox.apache.org/repos/asf/superset.git
commit cf75d8fa6379d6cbc9ec5d0ace702bd36f2622e8
Author: hughhhh <hu...@gmail.com>
AuthorDate: Wed Apr 14 13:09:54 2021 -0700
move messaging to config
---
superset/config.py | 5 +++++
superset/databases/commands/exceptions.py | 5 ++++-
superset/databases/commands/test_connection.py | 2 ++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/superset/config.py b/superset/config.py
index e760d7c..c4b0f47 100644
--- a/superset/config.py
+++ b/superset/config.py
@@ -1179,6 +1179,11 @@ DATASET_HEALTH_CHECK: Optional[Callable[["SqlaTable"], str]] = None
SQLALCHEMY_DOCS_URL = "https://docs.sqlalchemy.org/en/13/core/engines.html"
SQLALCHEMY_DISPLAY_TEXT = "SQLAlchemy docs"
+# Database Connection Config
+TEXT_DATABASE_CONNECTION = {
+ "database_test_connection_unexpected": "Unexpected error occurred, please check your logs for details"
+}
+
# -------------------------------------------------------------------
# * WARNING: STOP EDITING HERE *
# -------------------------------------------------------------------
diff --git a/superset/databases/commands/exceptions.py b/superset/databases/commands/exceptions.py
index 3205d08..e5e6931 100644
--- a/superset/databases/commands/exceptions.py
+++ b/superset/databases/commands/exceptions.py
@@ -14,6 +14,7 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
+from flask import current_app
from flask_babel import lazy_gettext as _
from marshmallow.validate import ValidationError
@@ -27,6 +28,8 @@ from superset.commands.exceptions import (
)
from superset.exceptions import SupersetErrorsException
+TEXT_DATABASE_CONN = current_app.config["TEXT_DATABASE_CONNECTION"]
+
class DatabaseInvalidError(CommandInvalidError):
message = _("Database parameters are invalid.")
@@ -131,7 +134,7 @@ class DatabaseTestConnectionDriverError(CommandInvalidError):
class DatabaseTestConnectionUnexpectedError(CommandInvalidError):
- message = _("Unexpected error occurred, please check your logs for details")
+ message = _(TEXT_DATABASE_CONN["database_test_connection_unexpected"])
class DatabaseImportError(ImportFailedError):
diff --git a/superset/databases/commands/test_connection.py b/superset/databases/commands/test_connection.py
index 7c2ce6f..f2bf365 100644
--- a/superset/databases/commands/test_connection.py
+++ b/superset/databases/commands/test_connection.py
@@ -45,6 +45,8 @@ class TestConnectionDatabaseCommand(BaseCommand):
def run(self) -> None:
self.validate()
+
+ raise DatabaseTestConnectionUnexpectedError()
uri = self._properties.get("sqlalchemy_uri", "")
if self._model and uri == self._model.safe_sqlalchemy_uri():
uri = self._model.sqlalchemy_uri_decrypted