You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2020/11/04 06:43:16 UTC

[incubator-superset] branch 0.38 updated (9fd2a11 -> 34bbc77)

This is an automated email from the ASF dual-hosted git repository.

villebro pushed a change to branch 0.38
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


    from 9fd2a11  Update changelog with rc2 cherries
     new c8d0778  build: update webpack for npm linking plugins (#11253)
     new 34bbc77  fix(sqla): allow 'unknown' type queries in explore view (#11365)

The 2 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.


Summary of changes:
 superset-frontend/tsconfig.json     |  3 ++-
 superset-frontend/webpack.config.js | 15 +++++++++++----
 superset/connectors/sqla/models.py  |  3 ++-
 superset/sql_parse.py               |  3 +++
 4 files changed, 18 insertions(+), 6 deletions(-)


[incubator-superset] 02/02: fix(sqla): allow 'unknown' type queries in explore view (#11365)

Posted by vi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

villebro pushed a commit to branch 0.38
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit 34bbc77cec451674ddaa546750c3c96917e969e5
Author: serenajiang <se...@airbnb.com>
AuthorDate: Wed Oct 21 10:24:52 2020 -0700

    fix(sqla): allow 'unknown' type queries in explore view (#11365)
---
 superset/connectors/sqla/models.py | 3 ++-
 superset/sql_parse.py              | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py
index 934da17..bf0384b 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -760,7 +760,8 @@ class SqlaTable(  # pylint: disable=too-many-public-methods,too-many-instance-at
                 raise QueryObjectValidationError(
                     _("Virtual dataset query cannot consist of multiple statements")
                 )
-            if not ParsedQuery(from_sql).is_readonly():
+            parsed_query = ParsedQuery(from_sql)
+            if not (parsed_query.is_unknown() or parsed_query.is_readonly()):
                 raise QueryObjectValidationError(
                     _("Virtual dataset query must be read-only")
                 )
diff --git a/superset/sql_parse.py b/superset/sql_parse.py
index e532a5e..0bc20c1 100644
--- a/superset/sql_parse.py
+++ b/superset/sql_parse.py
@@ -113,6 +113,9 @@ class ParsedQuery:
     def is_explain(self) -> bool:
         return self.stripped().upper().startswith("EXPLAIN")
 
+    def is_unknown(self) -> bool:
+        return self._parsed[0].get_type() == "UNKNOWN"
+
     def is_readonly(self) -> bool:
         """Pessimistic readonly, 100% sure statement won't mutate anything"""
         return self.is_select() or self.is_explain()


[incubator-superset] 01/02: build: update webpack for npm linking plugins (#11253)

Posted by vi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

villebro pushed a commit to branch 0.38
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit c8d0778b897cf92432c26665ba3566bc838b4693
Author: Jesse Yang <je...@airbnb.com>
AuthorDate: Tue Oct 13 16:54:06 2020 -0700

    build: update webpack for npm linking plugins (#11253)
---
 superset-frontend/tsconfig.json     |  3 ++-
 superset-frontend/webpack.config.js | 15 +++++++++++----
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/superset-frontend/tsconfig.json b/superset-frontend/tsconfig.json
index 3f4dce9..6a8959e 100644
--- a/superset-frontend/tsconfig.json
+++ b/superset-frontend/tsconfig.json
@@ -30,5 +30,6 @@
     "./node_modules/*superset-ui*/**/types/**/*",
     // and the type defs of their dependencies
     "./node_modules/*superset-ui*/**/node_modules/**/*.d.ts"
-  ]
+  ],
+  "exclude": ["./node_modules/*superset-ui*/**/node_modules/@superset-ui/**/*"]
 }
diff --git a/superset-frontend/webpack.config.js b/superset-frontend/webpack.config.js
index 51e7eb2..26f769c 100644
--- a/superset-frontend/webpack.config.js
+++ b/superset-frontend/webpack.config.js
@@ -265,12 +265,19 @@ const config = {
     },
   },
   resolve: {
+    modules: [APP_DIR, 'node_modules'],
     alias: {
-      src: path.resolve(APP_DIR, './src'),
       'react-dom': '@hot-loader/react-dom',
-      stylesheets: path.resolve(APP_DIR, './stylesheets'),
-      images: path.resolve(APP_DIR, './images'),
-      spec: path.resolve(APP_DIR, './spec'),
+      // force using absolute import path of the @superset-ui/core and @superset-ui/chart-controls
+      // so that we can `npm link` viz plugins without linking these two base packages
+      '@superset-ui/core': path.resolve(
+        APP_DIR,
+        './node_modules/@superset-ui/core',
+      ),
+      '@superset-ui/chart-controls': path.resolve(
+        APP_DIR,
+        './node_modules/@superset-ui/chart-controls',
+      ),
     },
     extensions: ['.ts', '.tsx', '.js', '.jsx'],
     symlinks: false,