You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "mistercrunch (via GitHub)" <gi...@apache.org> on 2024/01/17 18:49:55 UTC

[PR] fix(import): only import FORMULA annotations [superset]

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

   ### SUMMARY
   export/import currently attempts to bring in annotations layers, but does not handle the dependencies properly, resulting in some referential integrity-type issues. This happens when the annotation depends on either an "annotation layer", or on another chart that doesn't exist in the current environment.
   
   The solution here is lazy, and refrains from importing any annotation that may depend on other objects that are not handled by the current import/export logic.
   
   Longer term solution would including handling of dependencies, and allowing the users to package dependencies on export and/or ask/warn about what to do here. 
   
   ### TESTING
   On top of a simple unit test on the new function I introduce, I conducted the following manual test
   * exported a dashboard that contains a chart with multiple annotations of different types
   * deleting the chart objects in the environment
   * importing using the CLI
   * verifying that only FORMULA annotation survived the export/import
   


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


Re: [PR] fix(import): only import FORMULA annotations [superset]

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


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


Re: [PR] fix(import): only import FORMULA annotations [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/26652?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Comparison is base [(`9387c4c`)](https://app.codecov.io/gh/apache/superset/commit/9387c4c16ffd407f71eff133be7647fc8bafb12e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 66.85% compared to head [(`b2f23bc`)](https://app.codecov.io/gh/apache/superset/pull/26652?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 59.12%.
   > Report is 20 commits behind head on master.
   
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #26652      +/-   ##
   ==========================================
   - Coverage   66.85%   59.12%   -7.73%     
   ==========================================
     Files        1931     1930       -1     
     Lines       75355    75330      -25     
     Branches     8431     8431              
   ==========================================
   - Hits        50378    44542    -5836     
   - Misses      22829    28640    +5811     
     Partials     2148     2148              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/26652/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/26652/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.56% <33.33%> (?)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/26652/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/26652/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/26652/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.51% <33.33%> (?)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/26652/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `62.01% <100.00%> (-16.12%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/26652/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/26652/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `56.00% <100.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.
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/26652?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?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


Re: [PR] fix(import): only import FORMULA annotations [superset]

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


##########
superset/cli/importexport.py:
##########
@@ -133,12 +133,14 @@ def export_datasources(datasource_file: Optional[str] = None) -> None:
     @click.option(
         "--path",
         "-p",
+        required=True,

Review Comment:
   Changes to this file are not directly related to this PR, but seemed like an easy improvement while I ran manual testing.



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