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 2020/02/14 21:54:16 UTC

[GitHub] [incubator-superset] graceguo-supercat opened a new pull request #9145: [dashboard] update filter_scopes metadata when import old dashboard

graceguo-supercat opened a new pull request #9145: [dashboard] update filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145
 
 
   ### CATEGORY
   
   Choose one
   
   - [x] Bug Fix
   - [x] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   Update dashboard import action: convert old `filter_immune_slices` and `filter_immune_slice_fields` to use `filter_scopes`
   
   ### TEST PLAN
   CI and unit test
   
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: #9109 
   
   
   ### REVIEWERS
   @john-bodley @serenajiang @mistercrunch 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] graceguo-supercat commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
graceguo-supercat commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145#discussion_r381029279
 
 

 ##########
 File path: superset/models/helpers.py
 ##########
 @@ -278,6 +278,12 @@ def alter_params(self, **kwargs):
         d.update(kwargs)
         self.params = json.dumps(d)
 
+    def remove_params(self, param, **kwargs):
+        d = self.params_dict
+        d.pop(param, None)
+        d.update(kwargs)
 
 Review comment:
   fixed. Thanks!

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] graceguo-supercat commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
graceguo-supercat commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145#discussion_r380993856
 
 

 ##########
 File path: superset/models/dashboard.py
 ##########
 @@ -334,6 +323,29 @@ def alter_positions(dashboard, old_to_new_slc_id_dict):
                     old_slc_id_str
                 ]
 
+        # since PR #9109, filter_immune_slices and filter_immune_slice_fields
 
 Review comment:
   `export dashboard` and `import dashboard` is a widely used feature in Superset. it helps ppl to move dashboard from different data system (and both of them use Superset). If someone wants to copy a dashboard from an older system which didn't upgrade recently, but the other system used updated version, this PR can make their export - import routine keep working.
   
   if the backward compatible only introduce a couple of lines, I would like to keep it. But if it will introduce a lot of overhead, i will not maintain it.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] serenajiang commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
serenajiang commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145#discussion_r380874497
 
 

 ##########
 File path: superset/models/dashboard.py
 ##########
 @@ -334,6 +323,29 @@ def alter_positions(dashboard, old_to_new_slc_id_dict):
                     old_slc_id_str
                 ]
 
+        # since PR #9109, filter_immune_slices and filter_immune_slice_fields
 
 Review comment:
   Is there any way we can avoid having this special logic? I'm worried about code in Superset getting (even more) bloated. When will `create_from_import` have the extra fields? Will it always? Is it ok to just not support this case and warn that your change is not backwards compatible?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] graceguo-supercat commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
graceguo-supercat commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145#discussion_r380988352
 
 

 ##########
 File path: superset/models/helpers.py
 ##########
 @@ -278,6 +278,12 @@ def alter_params(self, **kwargs):
         d.update(kwargs)
         self.params = json.dumps(d)
 
+    def remove_params(self, param_to_remove: str, **kwargs: Dict) -> None:
 
 Review comment:
   add typing. is it looks better?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] codecov-io commented on issue #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145#issuecomment-586501932
 
 
   # [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9145?src=pr&el=h1) Report
   > Merging [#9145](https://codecov.io/gh/apache/incubator-superset/pull/9145?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/f4ad15e6441a9e042ce9416a5004d058c867dc5f?src=pr&el=desc) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9145/graphs/tree.svg?width=650&token=KsB0fHcx6l&height=150&src=pr)](https://codecov.io/gh/apache/incubator-superset/pull/9145?src=pr&el=tree)
   
   ```diff
   @@           Coverage Diff           @@
   ##           master    #9145   +/-   ##
   =======================================
     Coverage   59.06%   59.06%           
   =======================================
     Files         372      372           
     Lines       11922    11922           
     Branches     2919     2919           
   =======================================
     Hits         7042     7042           
     Misses       4698     4698           
     Partials      182      182
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9145?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9145?src=pr&el=footer). Last update [f4ad15e...2ccc8dc](https://codecov.io/gh/apache/incubator-superset/pull/9145?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] serenajiang commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
serenajiang commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145#discussion_r380868559
 
 

 ##########
 File path: superset/models/helpers.py
 ##########
 @@ -278,6 +278,12 @@ def alter_params(self, **kwargs):
         d.update(kwargs)
         self.params = json.dumps(d)
 
+    def remove_params(self, param, **kwargs):
 
 Review comment:
   Do we pass in `**kwargs` to this function anywhere? If not, can remove the `kwargs` parts.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] graceguo-supercat merged pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
graceguo-supercat merged pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] serenajiang commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
serenajiang commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145#discussion_r380879236
 
 

 ##########
 File path: superset/models/helpers.py
 ##########
 @@ -278,6 +278,12 @@ def alter_params(self, **kwargs):
         d.update(kwargs)
         self.params = json.dumps(d)
 
+    def remove_params(self, param, **kwargs):
 
 Review comment:
   also, typing plz ❤️ 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] graceguo-supercat commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
graceguo-supercat commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145#discussion_r380988662
 
 

 ##########
 File path: superset/models/helpers.py
 ##########
 @@ -278,6 +278,12 @@ def alter_params(self, **kwargs):
         d.update(kwargs)
         self.params = json.dumps(d)
 
+    def remove_params(self, param, **kwargs):
+        d = self.params_dict
+        d.pop(param, None)
+        d.update(kwargs)
 
 Review comment:
   used `kwargs` here.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-superset] serenajiang commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard

Posted by GitBox <gi...@apache.org>.
serenajiang commented on a change in pull request #9145: [dashboard] use filter_scopes metadata when import old dashboard
URL: https://github.com/apache/incubator-superset/pull/9145#discussion_r381010266
 
 

 ##########
 File path: superset/models/helpers.py
 ##########
 @@ -278,6 +278,12 @@ def alter_params(self, **kwargs):
         d.update(kwargs)
         self.params = json.dumps(d)
 
+    def remove_params(self, param, **kwargs):
+        d = self.params_dict
+        d.pop(param, None)
+        d.update(kwargs)
 
 Review comment:
   sorry, what I meant was - is this function ever called with keyword arguments? It looks like you only called it with the positional argument `param_to_remove`, so I don't thiink we need the kwargs logic.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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