You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "chanduapple (via GitHub)" <gi...@apache.org> on 2023/12/11 18:20:04 UTC
[PR] fix (dashboard import): update cross filter scoping chart id references during dashboard import [superset]
chanduapple opened a new pull request, #26239:
URL: https://github.com/apache/superset/pull/26239
during the dashboard import, cross filter scoping is not retained because of not updating chart id references. this commit contains the necessary fix for the same.
the same
this pull request provides the fix for the issue
[#19944 ](https://github.com/apache/superset/issues/19944)
slack discussion: https://apache-superset.slack.com/archives/C015WAZL0KH/p1699248398108929
### SUMMARY
updated the utils.py to update the chart id references for cross filter scoping also. currently chart id reference updates is present for native filters, position and few others, but not for cross filter scoping.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
1. create dashboard with more than 2 charts and apply cross filter scoping. as shown below.
2. export the dashboard.
3. if you are importing in the same environment, then delete dashboard and charts.
4. import the dashboard again.
5. expectation is cross filter scoping should be retained.
6. actual is cross filter scoping has been removed and global cross filter scoping changes to all charts.
dashboard in env1

# BEFORE FIX
dashboard after importing to env2

# AFTER FIX
dashboard after importing to env2

### TESTING INSTRUCTIONS
1. create dashboard with cross filter scoping.
2. export the dashboard.
3. delete the dashboard and charts used in dashboards.
4. import the dashboard
5. check the cross filter scoping
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
Fixes "#19944"
- [x] Has associated issue: #19944
- [ ] 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
Re: [PR] fix(dashboard): update cross filter scoping chart id references during dashboard import [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-2819890993
Not sure if anyone has interest in rebasing this and getting it in a mergeable state, but we're open to that, or others adopting the work on a fresh PR. Meanwhile I'll convert this to a draft since it's been silent for so long, and it may eventually be closed due to inactivity.
--
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(dashboard): update cross filter scoping chart id references during dashboard import [superset]
Posted by "ferschubert (via GitHub)" <gi...@apache.org>.
ferschubert commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-2302730250
Any updates on this folks? We are blocked by this issue to export->import charts with cross-filter scoping.
--
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 (dashboard import): update cross filter scoping chart id references during dashboard import [superset]
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-1850643881
@betodealmeida do you think it would make sense to start phasing both the pseudo-ids that are used on the frontend, and the serial ids used on the backend, and replace them all with their respective uuid representations? This way we wouldn't have to do all this complicated remapping during import/export..
--
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 (dashboard import): update cross filter scoping chart id references during dashboard import [superset]
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-1850668427
@chanduapple the `CONTRIBUTING.md` has some directives for running the test suites: https://github.com/apache/superset/blob/master/CONTRIBUTING.md#testing The relevant tests I think you're interested in are in https://github.com/apache/superset/blob/master/tests/integration_tests/import_export_tests.py.
--
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 (dashboard import): update cross filter scoping chart id references during dashboard import [superset]
Posted by "villebro (via GitHub)" <gi...@apache.org>.
villebro commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-1850652719
> @john-bodley @michael-s-molina @villebro could you please review this PR. This is kind of blocker to use import/export feature for dashboard, since people need to make the changes manually after importing dashboard as cross filter scoping was not retained. i am contributing first time, please let me know if any changes required or to furnish more info.
@chanduapple thanks for the contribution, and I agree with the changes done here. I'll let CI complete before reviewing the code. Also, I'm not sure if our current test suites have tests for similar re-mappings (the native filters may have one), but if it's possible, it would be great if you could add a test to cover this particular 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
Re: [PR] fix(dashboard): update cross filter scoping chart id references during dashboard import [superset]
Posted by "chanduapple (via GitHub)" <gi...@apache.org>.
chanduapple commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-1888511542
@villebro @betodealmeida could you please review and approve, let me know if any thing to be modified. please help me out 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.
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(dashboard): update cross filter scoping chart id references during dashboard import [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-1885435372
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/26239?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: `9 lines` in your changes are missing coverage. Please review.
> Comparison is base [(`29633e7`)](https://app.codecov.io/gh/apache/superset/commit/29633e7d8cad7b52669a9e6f5e064cd34da803a3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 69.14% compared to head [(`78b3f91`)](https://app.codecov.io/gh/apache/superset/pull/26239?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 59.05%.
> Report is 25 commits behind head on master.
| [Files](https://app.codecov.io/gh/apache/superset/pull/26239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [superset/commands/dashboard/importers/v1/utils.py](https://app.codecov.io/gh/apache/superset/pull/26239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvY29tbWFuZHMvZGFzaGJvYXJkL2ltcG9ydGVycy92MS91dGlscy5weQ==) | 47.05% | [9 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/26239?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #26239 +/- ##
===========================================
- Coverage 69.14% 59.05% -10.10%
===========================================
Files 1946 1946
Lines 75989 76006 +17
Branches 8479 8479
===========================================
- Hits 52544 44886 -7658
- Misses 21266 28930 +7664
- Partials 2179 2190 +11
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/26239/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/26239/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.66% <5.88%> (-0.03%)` | :arrow_down: |
| [mysql](https://app.codecov.io/gh/apache/superset/pull/26239/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/26239/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/26239/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.61% <5.88%> (-0.03%)` | :arrow_down: |
| [python](https://app.codecov.io/gh/apache/superset/pull/26239/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `61.78% <47.05%> (-21.08%)` | :arrow_down: |
| [sqlite](https://app.codecov.io/gh/apache/superset/pull/26239/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/26239/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.80% <47.05%> (-0.01%)` | :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=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/26239?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(dashboard): update cross filter scoping chart id references during dashboard import [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed pull request #26239: fix(dashboard): update cross filter scoping chart id references during dashboard import
URL: https://github.com/apache/superset/pull/26239
--
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 (dashboard import): update cross filter scoping chart id references during dashboard import [superset]
Posted by "chanduapple (via GitHub)" <gi...@apache.org>.
chanduapple commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-1850659431
@villebro is there any guideline/info about adding tests, like how to add test and run, I will go through once, I have tested manually.
--
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 (dashboard import): update cross filter scoping chart id references during dashboard import [superset]
Posted by "chanduapple (via GitHub)" <gi...@apache.org>.
chanduapple commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-1850642495
@john-bodley @michael-s-molina @villebro could you please review this PR. This is kind of blocker to use import/export feature for dashboard, since people need to make the changes manually after importing dashboard as cross filter scoping was not retained.
i am contributing first time, please let me know if any changes required or to furnish more info.
--
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(dashboard): update cross filter scoping chart id references during dashboard import [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-2073672763
Looks like this one needs the [pre-commit hooks ](https://superset.apache.org/docs/contributing/hooks-and-linting/) run. Hope we can get it through and close out the old issue!
--
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(dashboard): update cross filter scoping chart id references during dashboard import [superset]
Posted by "chanduapple (via GitHub)" <gi...@apache.org>.
chanduapple commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-1873399725
@villebro i have fixed below earlier CI workflow issues.
1. pull request title has been modified.
2. removed trailing white spaces.
3. List error
4. R0912: Too many branches (18/15) (too-many-branches)
Could you please approve the workflow to be rerun and review the code changes?
@betodealmeida @john-bodley
--
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(dashboard): update cross filter scoping chart id references during dashboard import [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #26239:
URL: https://github.com/apache/superset/pull/26239#issuecomment-3882967271
Closing due to inactivity. Feel free to reopen if/when warranted.
--
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