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 2023/01/10 07:51:35 UTC
[GitHub] [superset] villebro opened a new pull request, #22658: fix(viz-gallery): respect denylist in viz gallery
villebro opened a new pull request, #22658:
URL: https://github.com/apache/superset/pull/22658
### SUMMARY
The config parameter `VIZ_TYPE_DENYLIST` should make it possible to omit certain viz plugins. However, currently the viz gallery displays all chart types from `MainPresets.js` despite adding specific charts to the denylist.
To test, add the following to your `superset_config.py:
```python
VIZ_TYPE_DENYLIST = ["big_number", "big_number_total", "pie"]
```
### AFTER
With the changes, the big number and pie charts are all removed:

### BEFORE
Currently they are all displayed:

### 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] villebro commented on a diff in pull request #22658: fix(viz-gallery): respect denylist in viz gallery
Posted by GitBox <gi...@apache.org>.
villebro commented on code in PR #22658:
URL: https://github.com/apache/superset/pull/22658#discussion_r1065967182
##########
superset-frontend/src/middleware/asyncEvent.ts:
##########
@@ -235,21 +236,7 @@ export const init = (appConfig?: AppConfig) => {
retriesByJobId = {};
lastReceivedEventId = null;
- if (appConfig) {
- config = appConfig;
- } else {
- // load bootstrap data from DOM
- const appContainer = document.getElementById('app');
- if (appContainer) {
- const bootstrapData = JSON.parse(
- appContainer?.getAttribute('data-bootstrap') || '{}',
- );
- config = bootstrapData?.common?.conf;
- } else {
- config = {};
- logging.warn('asyncEvent: app config data not found');
Review Comment:
Well, the weird thing is, I don't really see any situation where we would ever hit a page that doesn't have bootstrap data on it. This is related to GAQ, and GAQ is definitely always called from some place where there's bootstrap data. So I think it should be safe to remove (incidentally, I'll probably be working on GAQ soon, so I can address this later if it's really needed).
--
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 #22658: fix(viz-gallery): respect denylist in viz gallery
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #22658:
URL: https://github.com/apache/superset/pull/22658#issuecomment-1376864060
# [Codecov](https://codecov.io/gh/apache/superset/pull/22658?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 [#22658](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (77ee017) into [master](https://codecov.io/gh/apache/superset/commit/5b2ca97341306b8b06ae55ff77eb2528a57f20ce?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (5b2ca97) will **decrease** coverage by `11.06%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## master #22658 +/- ##
===========================================
- Coverage 66.88% 55.82% -11.07%
===========================================
Files 1859 1866 +7
Lines 71103 71356 +253
Branches 7782 7782
===========================================
- Hits 47557 39833 -7724
- Misses 21520 29497 +7977
Partials 2026 2026
```
| Flag | Coverage Δ | |
|---|---|---|
| mysql | `?` | |
| postgres | `?` | |
| presto | `52.53% <ø> (+0.07%)` | :arrow_up: |
| python | `57.93% <ø> (-23.11%)` | :arrow_down: |
| unit | `51.51% <ø> (+0.08%)` | :arrow_up: |
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/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ponents/controls/VizTypeControl/VizTypeGallery.tsx](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9WaXpUeXBlQ29udHJvbC9WaXpUeXBlR2FsbGVyeS50c3g=) | `88.17% <ø> (ø)` | |
| [superset/views/base.py](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdmlld3MvYmFzZS5weQ==) | `61.51% <ø> (-15.47%)` | :arrow_down: |
| [...perset-frontend/src/addSlice/AddSliceContainer.tsx](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2FkZFNsaWNlL0FkZFNsaWNlQ29udGFpbmVyLnRzeA==) | `59.61% <100.00%> (ø)` | |
| [...plore/components/controls/VizTypeControl/index.tsx](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9jb250cm9scy9WaXpUeXBlQ29udHJvbC9pbmRleC50c3g=) | `73.07% <100.00%> (ø)` | |
| [superset/utils/dashboard\_import\_export.py](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdXRpbHMvZGFzaGJvYXJkX2ltcG9ydF9leHBvcnQucHk=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [superset/tags/core.py](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvdGFncy9jb3JlLnB5) | `4.54% <0.00%> (-95.46%)` | :arrow_down: |
| [superset/key\_value/commands/update.py](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL3VwZGF0ZS5weQ==) | `0.00% <0.00%> (-90.91%)` | :arrow_down: |
| [superset/key\_value/commands/delete.py](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZS5weQ==) | `0.00% <0.00%> (-87.88%)` | :arrow_down: |
| [superset/key\_value/commands/delete\_expired.py](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQva2V5X3ZhbHVlL2NvbW1hbmRzL2RlbGV0ZV9leHBpcmVkLnB5) | `0.00% <0.00%> (-84.00%)` | :arrow_down: |
| [superset/dashboards/commands/importers/v0.py](https://codecov.io/gh/apache/superset/pull/22658?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9jb21tYW5kcy9pbXBvcnRlcnMvdjAucHk=) | `15.62% <0.00%> (-76.25%)` | :arrow_down: |
| ... and [299 more](https://codecov.io/gh/apache/superset/pull/22658?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] kgabryje commented on a diff in pull request #22658: fix(viz-gallery): respect denylist in viz gallery
Posted by GitBox <gi...@apache.org>.
kgabryje commented on code in PR #22658:
URL: https://github.com/apache/superset/pull/22658#discussion_r1065888779
##########
superset-frontend/src/middleware/asyncEvent.ts:
##########
@@ -235,21 +236,7 @@ export const init = (appConfig?: AppConfig) => {
retriesByJobId = {};
lastReceivedEventId = null;
- if (appConfig) {
- config = appConfig;
- } else {
- // load bootstrap data from DOM
- const appContainer = document.getElementById('app');
- if (appContainer) {
- const bootstrapData = JSON.parse(
- appContainer?.getAttribute('data-bootstrap') || '{}',
- );
- config = bootstrapData?.common?.conf;
- } else {
- config = {};
- logging.warn('asyncEvent: app config data not found');
Review Comment:
Do we want to remove that log?
--
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] villebro merged pull request #22658: fix(viz-gallery): respect denylist in viz gallery
Posted by GitBox <gi...@apache.org>.
villebro merged PR #22658:
URL: https://github.com/apache/superset/pull/22658
--
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