You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "jfrag1 (via GitHub)" <gi...@apache.org> on 2023/06/06 22:23:26 UTC

[GitHub] [superset] jfrag1 opened a new pull request, #24303: fix: Copy dashboard filters when copying dashboard

jfrag1 opened a new pull request, #24303:
URL: https://github.com/apache/superset/pull/24303

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   This PR will make it so that dashboard native filters are properly copied when copying a dashboard using the "Save as" option in the UI.  This functionality broke as a result of an [api v1 migration](https://github.com/apache/superset/pull/23112).
   
   `set_dash_metadata` just takes the current dash's params and adds certain keys from the data dict passed in.  Before calling `set_dash_metadata`, the newly copied dashboard should share the same metadata as the original dash so that no keys are lost, in this case `native_filter_configuration` was being lost.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] 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] codecov[bot] commented on pull request #24303: fix: Copy dashboard filters when copying dashboard

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #24303:
URL: https://github.com/apache/superset/pull/24303#issuecomment-1579549924

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/24303?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#24303](https://app.codecov.io/gh/apache/superset/pull/24303?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (6a6f3c4) into [master](https://app.codecov.io/gh/apache/superset/commit/ede6acdb3afdf4003359b0c6e2aa8c4b154773ae?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (ede6acd) will **decrease** coverage by `9.29%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 6a6f3c4 differs from pull request most recent head 6c060b9. Consider uploading reports for the commit 6c060b9 to get more accurate results
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #24303      +/-   ##
   ==========================================
   - Coverage   66.53%   57.24%   -9.29%     
   ==========================================
     Files        1957     1957              
     Lines       75623    75624       +1     
     Branches     8224     8224              
   ==========================================
   - Hits        50312    43292    -7020     
   - Misses      23202    30223    +7021     
     Partials     2109     2109              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | hive | `53.39% <0.00%> (?)` | |
   | mysql | `?` | |
   | postgres | `?` | |
   | presto | `53.31% <0.00%> (?)` | |
   | python | `59.93% <0.00%> (-19.20%)` | :arrow_down: |
   | sqlite | `?` | |
   | unit | `53.44% <0.00%> (?)` | |
   
   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=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://app.codecov.io/gh/apache/superset/pull/24303?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [superset/dashboards/dao.py](https://app.codecov.io/gh/apache/superset/pull/24303?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | `34.07% <0.00%> (-63.12%)` | :arrow_down: |
   
   ... and [359 files with indirect coverage changes](https://app.codecov.io/gh/apache/superset/pull/24303/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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] jfrag1 commented on a diff in pull request #24303: fix: Copy dashboard filters when copying dashboard

Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 commented on code in PR #24303:
URL: https://github.com/apache/superset/pull/24303#discussion_r1220485179


##########
tests/integration_tests/dashboards/dao_tests.py:
##########
@@ -154,6 +154,34 @@ def test_copy_dashboard(self, mock_g):
         db.session.delete(dash)
         db.session.commit()
 
+    @pytest.mark.usefixtures("load_world_bank_dashboard_with_slices")
+    @patch("superset.dashboards.dao.g")
+    def test_copy_dashboard_copies_native_filters(self, mock_g):

Review Comment:
   test fails without this fix



-- 
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] jfrag1 closed pull request #24303: fix: Copy dashboard filters when copying dashboard

Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 closed pull request #24303: fix: Copy dashboard filters when copying dashboard
URL: https://github.com/apache/superset/pull/24303


-- 
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] jfrag1 closed pull request #24303: fix: Copy dashboard filters when copying dashboard

Posted by "jfrag1 (via GitHub)" <gi...@apache.org>.
jfrag1 closed pull request #24303: fix: Copy dashboard filters when copying dashboard
URL: https://github.com/apache/superset/pull/24303


-- 
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] eschutho merged pull request #24303: fix: Copy dashboard filters when copying dashboard

Posted by "eschutho (via GitHub)" <gi...@apache.org>.
eschutho merged PR #24303:
URL: https://github.com/apache/superset/pull/24303


-- 
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] sadpandajoe commented on pull request #24303: fix: Copy dashboard filters when copying dashboard

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on PR #24303:
URL: https://github.com/apache/superset/pull/24303#issuecomment-1585109600

   🏷️ preset:2023.23


-- 
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