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 2022/11/23 17:43:02 UTC
[GitHub] [superset] Stanhoucke opened a new pull request, #22208: [WIP] fix(assets api): import replaces dashboard
Stanhoucke opened a new pull request, #22208:
URL: https://github.com/apache/superset/pull/22208
<!---
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 -->
For existing dashboards, modifications imported via `/api/v1/assets/import/` are only appended if the modified dashboard contains a new chart. Modifications to dashboards that remove a chart are not implemented when imported through the assets API.
This change updates the assets API import method to remove all existing references to chart ids for the imported dashboard(s) before inserting the new chart ids. The change should benefit the management of Superset assets under source control.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TESTING INSTRUCTIONS
<!--- Required! What steps can be taken to manually verify the changes? -->
Remove a chart from a dashboard:
- Export a dashboard and unzip assets bundle.
- Remove a chart and all references to it from the exported yaml files
- Import modified assets bundle as a zip by posting to `/api/v1/assets/import/` (see https://superset.apache.org/docs/api/#api)
- Navigate to the modified dashboard in the Superset UI and observe the deleted chart is no longer visible
Add a chart to a dashboard:
- In the same dashboard, remove a chart using the UI and save the dashboard
- Import the previously exported assets bundle as a zip by posting to `/api/v1/assets/import/`
- Navigate to the modified dashboard in the Superset UI and observe the deleted chart is now reinstated
### 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/22127
- [ ] 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] Stanhoucke commented on pull request #22208: fix(assets api): import replaces dashboard
Posted by GitBox <gi...@apache.org>.
Stanhoucke commented on PR #22208:
URL: https://github.com/apache/superset/pull/22208#issuecomment-1330328034
Sure, I'll add a test 👍
--
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] nicolas-gaillard commented on pull request #22208: fix(assets api): import replaces dashboard
Posted by "nicolas-gaillard (via GitHub)" <gi...@apache.org>.
nicolas-gaillard commented on PR #22208:
URL: https://github.com/apache/superset/pull/22208#issuecomment-1479660841
hello @eschutho, will this fix be available in 2.1.0? Thank you very much
--
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 #22208: fix(assets api): import replaces dashboard
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #22208:
URL: https://github.com/apache/superset/pull/22208#issuecomment-1339820380
# [Codecov](https://codecov.io/gh/apache/superset/pull/22208?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 [#22208](https://codecov.io/gh/apache/superset/pull/22208?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6558d4c) into [master](https://codecov.io/gh/apache/superset/commit/a77b2d6ebfbe8caf98b2c0d00a19f3f744f18b2b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a77b2d6) will **decrease** coverage by `0.01%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## master #22208 +/- ##
==========================================
- Coverage 65.49% 65.48% -0.02%
==========================================
Files 1835 1836 +1
Lines 69927 69970 +43
Branches 7590 7590
==========================================
+ Hits 45802 45819 +17
- Misses 22159 22185 +26
Partials 1966 1966
```
| Flag | Coverage Δ | |
|---|---|---|
| mysql | `78.04% <100.00%> (-0.04%)` | :arrow_down: |
| postgres | `78.10% <100.00%> (-0.05%)` | :arrow_down: |
| python | `78.22% <100.00%> (-0.05%)` | :arrow_down: |
| sqlite | `76.57% <100.00%> (-0.04%)` | :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/22208?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [superset/commands/importers/v1/assets.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL2Fzc2V0cy5weQ==) | `85.54% <100.00%> (-0.18%)` | :arrow_down: |
| [superset/utils/pandas\_postprocessing/sort.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvdXRpbHMvcGFuZGFzX3Bvc3Rwcm9jZXNzaW5nL3NvcnQucHk=) | `80.00% <0.00%> (-20.00%)` | :arrow_down: |
| [superset/reports/commands/log\_prune.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvcmVwb3J0cy9jb21tYW5kcy9sb2dfcHJ1bmUucHk=) | `85.71% <0.00%> (-3.58%)` | :arrow_down: |
| [superset/commands/importers/v1/utils.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvY29tbWFuZHMvaW1wb3J0ZXJzL3YxL3V0aWxzLnB5) | `92.20% <0.00%> (-1.30%)` | :arrow_down: |
| [superset/utils/pandas\_postprocessing/utils.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvdXRpbHMvcGFuZGFzX3Bvc3Rwcm9jZXNzaW5nL3V0aWxzLnB5) | `78.12% <0.00%> (-1.19%)` | :arrow_down: |
| [superset/common/query\_object.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvY29tbW9uL3F1ZXJ5X29iamVjdC5weQ==) | `93.84% <0.00%> (-0.52%)` | :arrow_down: |
| [superset/reports/commands/execute.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvcmVwb3J0cy9jb21tYW5kcy9leGVjdXRlLnB5) | `91.55% <0.00%> (-0.34%)` | :arrow_down: |
| [superset/views/database/views.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvdmlld3MvZGF0YWJhc2Uvdmlld3MucHk=) | `31.27% <0.00%> (-0.09%)` | :arrow_down: |
| [superset/models/helpers.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvbW9kZWxzL2hlbHBlcnMucHk=) | `38.19% <0.00%> (-0.09%)` | :arrow_down: |
| [superset/charts/schemas.py](https://codecov.io/gh/apache/superset/pull/22208/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-c3VwZXJzZXQvY2hhcnRzL3NjaGVtYXMucHk=) | `99.35% <0.00%> (ø)` | |
| ... and [5 more](https://codecov.io/gh/apache/superset/pull/22208/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) | |
: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=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] nytai commented on pull request #22208: fix(assets api): import replaces dashboard
Posted by GitBox <gi...@apache.org>.
nytai commented on PR #22208:
URL: https://github.com/apache/superset/pull/22208#issuecomment-1329951467
Can we add a unit test for this behavior? there should already be some for import/export you can expand on
--
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] nytai merged pull request #22208: fix(assets api): import replaces dashboard
Posted by GitBox <gi...@apache.org>.
nytai merged PR #22208:
URL: https://github.com/apache/superset/pull/22208
--
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