You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/08/11 10:11:13 UTC

[GitHub] [superset] zhaoyongjie opened a new pull request #16193: refactor: external metadata fetch API

zhaoyongjie opened a new pull request #16193:
URL: https://github.com/apache/superset/pull/16193


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   closes: https://github.com/apache/superset/issues/16172
   
   
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   ### After
   
   https://user-images.githubusercontent.com/2016594/129010851-5bdf76fa-f54a-4185-8862-b41d3e1f9d7f.mov
   
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   1. Create a virtual dataset from SQLLab, ensure that dataset's name contains "/" and "space"
   2. Goto dataset List
   3. Sync columns from source
   
   
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: https://github.com/apache/superset/issues/16172
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] john-bodley commented on a change in pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
john-bodley commented on a change in pull request #16193:
URL: https://github.com/apache/superset/pull/16193#discussion_r694273599



##########
File path: superset/views/datasource/schemas.py
##########
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from typing import Any
+
+from marshmallow import fields, post_load, Schema
+from typing_extensions import TypedDict
+
+
+class ExternalMetadataParams(TypedDict):

Review comment:
       @villebro @zhaoyongjie I wonder if we should be using [marshmallow_dataclass](https://github.com/lovasoa/marshmallow_dataclass) instead as it adhere's to the DRY principle and simplifies the code. I've used it for an internal project and I'm definitely a fan.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #16193:
URL: https://github.com/apache/superset/pull/16193#discussion_r694511413



##########
File path: superset/views/datasource/schemas.py
##########
@@ -0,0 +1,54 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from typing import Any
+
+from marshmallow import fields, post_load, Schema
+from typing_extensions import TypedDict
+
+
+class ExternalMetadataParams(TypedDict):

Review comment:
       Thanks for the mention. It's a more elegant way, let me try to use `marshmallow_dataclass` to refactor this class.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on a change in pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #16193:
URL: https://github.com/apache/superset/pull/16193#discussion_r688490007



##########
File path: superset-frontend/src/datasource/DatasourceEditor.jsx
##########
@@ -485,11 +486,19 @@ class DatasourceEditor extends React.PureComponent {
 
   syncMetadata() {
     const { datasource } = this.state;
-    const endpoint = `/datasource/external_metadata_by_name/${
-      datasource.type || datasource.datasource_type
-    }/${datasource.database.database_name || datasource.database.name}/${
-      datasource.schema
-    }/${datasource.table_name}/`;
+    const params = {
+      datasource_type: datasource.type || datasource.datasource_type,
+      database_name:
+        datasource.database.database_name || datasource.database.name,
+      schema_name: datasource.schema,
+      table_name: datasource.table_name,
+    };
+    const endpoint = `/datasource/external_metadata_by_name/?q=${rison.encode(
+      // rison can't encode the undefined value
+      Object.keys(params).map(key =>
+        params[key] === undefined ? null : params[key],
+      ),

Review comment:
       Ah yes now I see! 🤦 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie merged pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
zhaoyongjie merged pull request #16193:
URL: https://github.com/apache/superset/pull/16193


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16193:
URL: https://github.com/apache/superset/pull/16193#issuecomment-897340707


   # [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#16193](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5df173e) into [master](https://codecov.io/gh/apache/superset/commit/6df16c4b1f4b1fcfe23cf1bca41ea39e9d28240f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6df16c4) will **decrease** coverage by `0.11%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/16193/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #16193      +/-   ##
   ==========================================
   - Coverage   76.75%   76.63%   -0.12%     
   ==========================================
     Files         996      997       +1     
     Lines       53054    53073      +19     
     Branches     6760     6740      -20     
   ==========================================
   - Hits        40721    40673      -48     
   - Misses      12107    12171      +64     
   - Partials      226      229       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `81.26% <100.00%> (-0.10%)` | :arrow_down: |
   | javascript | `70.96% <100.00%> (-0.21%)` | :arrow_down: |
   | mysql | `81.51% <100.00%> (-0.06%)` | :arrow_down: |
   | postgres | `81.54% <100.00%> (-0.10%)` | :arrow_down: |
   | python | `81.94% <100.00%> (-0.06%)` | :arrow_down: |
   | sqlite | `81.22% <100.00%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...erset-frontend/src/datasource/DatasourceEditor.jsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFzb3VyY2UvRGF0YXNvdXJjZUVkaXRvci5qc3g=) | `74.44% <100.00%> (+0.19%)` | :arrow_up: |
   | [superset/connectors/sqla/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3V0aWxzLnB5) | `92.15% <100.00%> (+0.49%)` | :arrow_up: |
   | [superset/initialization/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvaW5pdGlhbGl6YXRpb24vX19pbml0X18ucHk=) | `87.72% <100.00%> (ø)` | |
   | [superset/views/datasource/schemas.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS9zY2hlbWFzLnB5) | `100.00% <100.00%> (ø)` | |
   | [superset/views/datasource/views.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS92aWV3cy5weQ==) | `91.95% <100.00%> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `42.05% <0.00%> (-40.89%)` | :arrow_down: |
   | [superset/utils/profiler.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcHJvZmlsZXIucHk=) | `40.90% <0.00%> (-6.15%)` | :arrow_down: |
   | [superset/examples/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvdXRpbHMucHk=) | `28.57% <0.00%> (-3.43%)` | :arrow_down: |
   | [...set-frontend/src/views/CRUD/welcome/ChartTable.tsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9DaGFydFRhYmxlLnRzeA==) | `73.17% <0.00%> (-1.83%)` | :arrow_down: |
   | [superset/views/base.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvYmFzZS5weQ==) | `75.86% <0.00%> (-1.38%)` | :arrow_down: |
   | ... and [12 more](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6df16c4...5df173e](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie closed pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
zhaoyongjie closed pull request #16193:
URL: https://github.com/apache/superset/pull/16193


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16193:
URL: https://github.com/apache/superset/pull/16193#issuecomment-897340707


   # [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#16193](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5df173e) into [master](https://codecov.io/gh/apache/superset/commit/6df16c4b1f4b1fcfe23cf1bca41ea39e9d28240f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6df16c4) will **decrease** coverage by `0.04%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/16193/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #16193      +/-   ##
   ==========================================
   - Coverage   76.75%   76.71%   -0.05%     
   ==========================================
     Files         996      997       +1     
     Lines       53054    53073      +19     
     Branches     6760     6740      -20     
   ==========================================
   - Hits        40721    40714       -7     
   - Misses      12107    12130      +23     
   - Partials      226      229       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `81.26% <100.00%> (-0.10%)` | :arrow_down: |
   | javascript | `70.96% <100.00%> (-0.21%)` | :arrow_down: |
   | mysql | `81.51% <100.00%> (-0.06%)` | :arrow_down: |
   | postgres | `81.54% <100.00%> (-0.10%)` | :arrow_down: |
   | presto | `81.41% <100.00%> (?)` | |
   | python | `82.09% <100.00%> (+0.09%)` | :arrow_up: |
   | sqlite | `81.22% <100.00%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...erset-frontend/src/datasource/DatasourceEditor.jsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFzb3VyY2UvRGF0YXNvdXJjZUVkaXRvci5qc3g=) | `74.44% <100.00%> (+0.19%)` | :arrow_up: |
   | [superset/connectors/sqla/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3V0aWxzLnB5) | `92.15% <100.00%> (+0.49%)` | :arrow_up: |
   | [superset/initialization/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvaW5pdGlhbGl6YXRpb24vX19pbml0X18ucHk=) | `87.72% <100.00%> (ø)` | |
   | [superset/views/datasource/schemas.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS9zY2hlbWFzLnB5) | `100.00% <100.00%> (ø)` | |
   | [superset/views/datasource/views.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS92aWV3cy5weQ==) | `91.95% <100.00%> (ø)` | |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `42.05% <0.00%> (-40.89%)` | :arrow_down: |
   | [superset/utils/profiler.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcHJvZmlsZXIucHk=) | `40.90% <0.00%> (-6.15%)` | :arrow_down: |
   | [superset/examples/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvdXRpbHMucHk=) | `28.57% <0.00%> (-3.43%)` | :arrow_down: |
   | [...set-frontend/src/views/CRUD/welcome/ChartTable.tsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9DaGFydFRhYmxlLnRzeA==) | `73.17% <0.00%> (-1.83%)` | :arrow_down: |
   | [superset/views/base.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvYmFzZS5weQ==) | `75.86% <0.00%> (-1.38%)` | :arrow_down: |
   | ... and [15 more](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6df16c4...5df173e](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #16193:
URL: https://github.com/apache/superset/pull/16193#issuecomment-897340707


   # [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#16193](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f40ac40) into [master](https://codecov.io/gh/apache/superset/commit/6df16c4b1f4b1fcfe23cf1bca41ea39e9d28240f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6df16c4) will **decrease** coverage by `0.28%`.
   > The diff coverage is `54.87%`.
   
   > :exclamation: Current head f40ac40 differs from pull request most recent head 71556f6. Consider uploading reports for the commit 71556f6 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/16193/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #16193      +/-   ##
   ==========================================
   - Coverage   76.75%   76.46%   -0.29%     
   ==========================================
     Files         996      997       +1     
     Lines       53054    53068      +14     
     Branches     6760     6739      -21     
   ==========================================
   - Hits        40721    40580     -141     
   - Misses      12107    12259     +152     
   - Partials      226      229       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `81.55% <61.45%> (-0.02%)` | :arrow_down: |
   | postgres | `81.53% <61.45%> (-0.10%)` | :arrow_down: |
   | python | `81.62% <61.45%> (-0.38%)` | :arrow_down: |
   | sqlite | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rset-frontend/src/components/ListView/ListView.tsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvTGlzdFZpZXcudHN4) | `96.19% <ø> (ø)` | |
   | [...ontrols/DndColumnSelectControl/DndMetricSelect.tsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZE1ldHJpY1NlbGVjdC50c3g=) | `41.21% <0.00%> (-0.57%)` | :arrow_down: |
   | [superset-frontend/src/views/CRUD/types.ts](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
   | [...set-frontend/src/views/CRUD/welcome/ChartTable.tsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9DaGFydFRhYmxlLnRzeA==) | `73.17% <0.00%> (-1.83%)` | :arrow_down: |
   | [superset/datasets/commands/importers/v1/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL3V0aWxzLnB5) | `58.97% <0.00%> (ø)` | |
   | [superset/examples/bart\_lines.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmFydF9saW5lcy5weQ==) | `27.58% <0.00%> (ø)` | |
   | [superset/examples/deck.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvZGVjay5weQ==) | `12.50% <0.00%> (ø)` | |
   | [superset/examples/energy.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvZW5lcmd5LnB5) | `26.19% <0.00%> (ø)` | |
   | [superset/examples/flights.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvZmxpZ2h0cy5weQ==) | `17.64% <0.00%> (ø)` | |
   | [superset/examples/long\_lat.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvbG9uZ19sYXQucHk=) | `23.80% <0.00%> (ø)` | |
   | ... and [34 more](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6df16c4...71556f6](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] villebro commented on a change in pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
villebro commented on a change in pull request #16193:
URL: https://github.com/apache/superset/pull/16193#discussion_r688443067



##########
File path: superset-frontend/src/datasource/DatasourceEditor.jsx
##########
@@ -485,11 +486,19 @@ class DatasourceEditor extends React.PureComponent {
 
   syncMetadata() {
     const { datasource } = this.state;
-    const endpoint = `/datasource/external_metadata_by_name/${
-      datasource.type || datasource.datasource_type
-    }/${datasource.database.database_name || datasource.database.name}/${
-      datasource.schema
-    }/${datasource.table_name}/`;
+    const params = {
+      datasource_type: datasource.type || datasource.datasource_type,
+      database_name:
+        datasource.database.database_name || datasource.database.name,
+      schema_name: datasource.schema,
+      table_name: datasource.table_name,
+    };
+    const endpoint = `/datasource/external_metadata_by_name/?q=${rison.encode(
+      // rison can't encode the undefined value
+      Object.keys(params).map(key =>
+        params[key] === undefined ? null : params[key],
+      ),

Review comment:
       Don't we need to encode the key/value pairs (`Object.entries`), not just the values (`Object.keys`)? (honest question, I haven't done a lot of this rison API stuff)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16193:
URL: https://github.com/apache/superset/pull/16193#issuecomment-897340707


   # [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#16193](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5df173e) into [master](https://codecov.io/gh/apache/superset/commit/6df16c4b1f4b1fcfe23cf1bca41ea39e9d28240f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6df16c4) will **decrease** coverage by `0.16%`.
   > The diff coverage is `97.82%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/16193/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #16193      +/-   ##
   ==========================================
   - Coverage   76.75%   76.58%   -0.17%     
   ==========================================
     Files         996      997       +1     
     Lines       53054    53124      +70     
     Branches     6760     6760              
   ==========================================
   - Hits        40721    40686      -35     
   - Misses      12107    12212     +105     
     Partials      226      226              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `81.51% <100.00%> (-0.06%)` | :arrow_down: |
   | postgres | `81.54% <100.00%> (-0.10%)` | :arrow_down: |
   | python | `81.66% <100.00%> (-0.34%)` | :arrow_down: |
   | sqlite | `81.22% <100.00%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...erset-frontend/src/datasource/DatasourceEditor.jsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFzb3VyY2UvRGF0YXNvdXJjZUVkaXRvci5qc3g=) | `74.25% <87.50%> (ø)` | |
   | [superset/connectors/sqla/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3V0aWxzLnB5) | `92.15% <100.00%> (+0.49%)` | :arrow_up: |
   | [superset/initialization/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvaW5pdGlhbGl6YXRpb24vX19pbml0X18ucHk=) | `87.72% <100.00%> (ø)` | |
   | [superset/views/datasource/schemas.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS9zY2hlbWFzLnB5) | `100.00% <100.00%> (ø)` | |
   | [superset/views/datasource/views.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS92aWV3cy5weQ==) | `91.95% <100.00%> (ø)` | |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-82.15%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `69.80% <0.00%> (-16.87%)` | :arrow_down: |
   | [superset/utils/profiler.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcHJvZmlsZXIucHk=) | `40.90% <0.00%> (-6.15%)` | :arrow_down: |
   | [superset/examples/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvdXRpbHMucHk=) | `28.57% <0.00%> (-3.43%)` | :arrow_down: |
   | [superset/views/database/mixins.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2UvbWl4aW5zLnB5) | `81.03% <0.00%> (-1.73%)` | :arrow_down: |
   | ... and [11 more](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6df16c4...5df173e](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] zhaoyongjie commented on a change in pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
zhaoyongjie commented on a change in pull request #16193:
URL: https://github.com/apache/superset/pull/16193#discussion_r688489308



##########
File path: superset-frontend/src/datasource/DatasourceEditor.jsx
##########
@@ -485,11 +486,19 @@ class DatasourceEditor extends React.PureComponent {
 
   syncMetadata() {
     const { datasource } = this.state;
-    const endpoint = `/datasource/external_metadata_by_name/${
-      datasource.type || datasource.datasource_type
-    }/${datasource.database.database_name || datasource.database.name}/${
-      datasource.schema
-    }/${datasource.table_name}/`;
+    const params = {
+      datasource_type: datasource.type || datasource.datasource_type,
+      database_name:
+        datasource.database.database_name || datasource.database.name,
+      schema_name: datasource.schema,
+      table_name: datasource.table_name,
+    };
+    const endpoint = `/datasource/external_metadata_by_name/?q=${rison.encode(
+      // rison can't encode the undefined value
+      Object.keys(params).map(key =>
+        params[key] === undefined ? null : params[key],
+      ),

Review comment:
       this is to code entire `params` field, just change `undefined` to `null`, because prison can't encode undefined value




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16193:
URL: https://github.com/apache/superset/pull/16193#issuecomment-897340707


   # [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#16193](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (f40ac40) into [master](https://codecov.io/gh/apache/superset/commit/6df16c4b1f4b1fcfe23cf1bca41ea39e9d28240f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6df16c4) will **decrease** coverage by `0.28%`.
   > The diff coverage is `54.87%`.
   
   > :exclamation: Current head f40ac40 differs from pull request most recent head 5df173e. Consider uploading reports for the commit 5df173e to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/16193/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #16193      +/-   ##
   ==========================================
   - Coverage   76.75%   76.46%   -0.29%     
   ==========================================
     Files         996      997       +1     
     Lines       53054    53068      +14     
     Branches     6760     6739      -21     
   ==========================================
   - Hits        40721    40580     -141     
   - Misses      12107    12259     +152     
   - Partials      226      229       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | mysql | `81.55% <61.45%> (-0.02%)` | :arrow_down: |
   | postgres | `81.53% <61.45%> (-0.10%)` | :arrow_down: |
   | python | `81.62% <61.45%> (-0.38%)` | :arrow_down: |
   | sqlite | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rset-frontend/src/components/ListView/ListView.tsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvTGlzdFZpZXcudHN4) | `96.19% <ø> (ø)` | |
   | [...ontrols/DndColumnSelectControl/DndMetricSelect.tsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9EbmRDb2x1bW5TZWxlY3RDb250cm9sL0RuZE1ldHJpY1NlbGVjdC50c3g=) | `41.21% <0.00%> (-0.57%)` | :arrow_down: |
   | [superset-frontend/src/views/CRUD/types.ts](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
   | [...set-frontend/src/views/CRUD/welcome/ChartTable.tsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvd2VsY29tZS9DaGFydFRhYmxlLnRzeA==) | `73.17% <0.00%> (-1.83%)` | :arrow_down: |
   | [superset/datasets/commands/importers/v1/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGF0YXNldHMvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL3V0aWxzLnB5) | `58.97% <0.00%> (ø)` | |
   | [superset/examples/bart\_lines.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvYmFydF9saW5lcy5weQ==) | `27.58% <0.00%> (ø)` | |
   | [superset/examples/deck.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvZGVjay5weQ==) | `12.50% <0.00%> (ø)` | |
   | [superset/examples/energy.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvZW5lcmd5LnB5) | `26.19% <0.00%> (ø)` | |
   | [superset/examples/flights.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvZmxpZ2h0cy5weQ==) | `17.64% <0.00%> (ø)` | |
   | [superset/examples/long\_lat.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvbG9uZ19sYXQucHk=) | `23.80% <0.00%> (ø)` | |
   | ... and [34 more](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6df16c4...5df173e](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] edited a comment on pull request #16193: refactor: external metadata fetch API

Posted by GitBox <gi...@apache.org>.
codecov[bot] edited a comment on pull request #16193:
URL: https://github.com/apache/superset/pull/16193#issuecomment-897340707


   # [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#16193](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5df173e) into [master](https://codecov.io/gh/apache/superset/commit/6df16c4b1f4b1fcfe23cf1bca41ea39e9d28240f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6df16c4) will **decrease** coverage by `0.26%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/16193/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #16193      +/-   ##
   ==========================================
   - Coverage   76.75%   76.49%   -0.27%     
   ==========================================
     Files         996      997       +1     
     Lines       53054    53073      +19     
     Branches     6760     6740      -20     
   ==========================================
   - Hits        40721    40596     -125     
   - Misses      12107    12248     +141     
   - Partials      226      229       +3     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `?` | |
   | javascript | `70.96% <100.00%> (-0.21%)` | :arrow_down: |
   | mysql | `81.51% <100.00%> (-0.06%)` | :arrow_down: |
   | postgres | `81.54% <100.00%> (-0.10%)` | :arrow_down: |
   | python | `81.66% <100.00%> (-0.34%)` | :arrow_down: |
   | sqlite | `81.22% <100.00%> (-0.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...erset-frontend/src/datasource/DatasourceEditor.jsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2RhdGFzb3VyY2UvRGF0YXNvdXJjZUVkaXRvci5qc3g=) | `74.44% <100.00%> (+0.19%)` | :arrow_up: |
   | [superset/connectors/sqla/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvY29ubmVjdG9ycy9zcWxhL3V0aWxzLnB5) | `92.15% <100.00%> (+0.49%)` | :arrow_up: |
   | [superset/initialization/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvaW5pdGlhbGl6YXRpb24vX19pbml0X18ucHk=) | `87.72% <100.00%> (ø)` | |
   | [superset/views/datasource/schemas.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS9zY2hlbWFzLnB5) | `100.00% <100.00%> (ø)` | |
   | [superset/views/datasource/views.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvZGF0YXNvdXJjZS92aWV3cy5weQ==) | `91.95% <100.00%> (ø)` | |
   | [superset/db\_engines/hive.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lcy9oaXZlLnB5) | `0.00% <0.00%> (-82.15%)` | :arrow_down: |
   | [...mponents/controls/MetricControl/MetricsControl.jsx](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9NZXRyaWNDb250cm9sL01ldHJpY3NDb250cm9sLmpzeA==) | `42.05% <0.00%> (-40.89%)` | :arrow_down: |
   | [superset/db\_engine\_specs/hive.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2hpdmUucHk=) | `69.80% <0.00%> (-16.87%)` | :arrow_down: |
   | [superset/utils/profiler.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvcHJvZmlsZXIucHk=) | `40.90% <0.00%> (-6.15%)` | :arrow_down: |
   | [superset/examples/utils.py](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZXhhbXBsZXMvdXRpbHMucHk=) | `28.57% <0.00%> (-3.43%)` | :arrow_down: |
   | ... and [19 more](https://codecov.io/gh/apache/superset/pull/16193/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [6df16c4...5df173e](https://codecov.io/gh/apache/superset/pull/16193?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org