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 2021/09/24 11:16:08 UTC

[GitHub] [superset] villebro opened a new pull request #16831: fix(native-filters): filter indicator stale state

villebro opened a new pull request #16831:
URL: https://github.com/apache/superset/pull/16831


   ### SUMMARY
   The recent perf improvement PR #16545 introduced a regression where some chart indicators didn't update correctly after applying filters. This was caused by all indicators sharing the same state that was used to check if the relevant data had changed. This changes the logic so that all indicators have their own set of "previous" objects to ensure that the result is recalculated when a relevant change has occurred.
   
   When checking if this was also a problem with the legacy indicators I noticed that the logic there mostly resembles the proposed solution here, so this shouldn't be a problem there.
   
   Fixes: #16806
   
   ### AFTER
   When applying new filters, all filter indicators are now updated correctly:
   ![image](https://user-images.githubusercontent.com/33317356/134664630-3b976327-839a-462a-8c0f-9b7531387d4b.png)
   
   ### BEFORE
   Previously only the first few charts' indicators were updated; the later ones always hit the cache due to the shared state having already been updated and hence satisfying the equality checks:
   ![image](https://user-images.githubusercontent.com/33317356/134664733-1af9ec65-a23f-463f-9b4e-f03ef3cc3612.png)
   
   ### 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] github-actions[bot] commented on pull request #16831: fix(native-filters): filter indicator stale state

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #16831:
URL: https://github.com/apache/superset/pull/16831#issuecomment-927546033


   Ephemeral environment shutdown and build artifacts deleted.


-- 
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] jinghua-qa commented on pull request #16831: fix(native-filters): filter indicator stale state

Posted by GitBox <gi...@apache.org>.
jinghua-qa commented on pull request #16831:
URL: https://github.com/apache/superset/pull/16831#issuecomment-926829101


   With this fix, the indicator got updated when filter applied and when filter clear, but I still saw the 2nd issue I mentioned in #16806:
   
   when filter applied, sometimes the query did not got updated, should i file this seperately?
   <img width="1784" alt="Screen Shot 2021-09-24 at 10 59 58 AM" src="https://user-images.githubusercontent.com/81597121/134720695-43c476cd-3ffa-4c5e-afba-b23f08e14523.png">
   


-- 
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] geido commented on pull request #16831: fix(native-filters): filter indicator stale state

Posted by GitBox <gi...@apache.org>.
geido commented on pull request #16831:
URL: https://github.com/apache/superset/pull/16831#issuecomment-926566207


   /testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_DASHBOARD_NATIVE_FILTERS_SET=true FEATURE_DASHBOARD_FILTERS_EXPERIMENTAL=true


-- 
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 #16831: fix(native-filters): filter indicator stale state

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #16831:
URL: https://github.com/apache/superset/pull/16831#issuecomment-926563765


   # [Codecov](https://codecov.io/gh/apache/superset/pull/16831?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 [#16831](https://codecov.io/gh/apache/superset/pull/16831?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (6f2f0e2) into [master](https://codecov.io/gh/apache/superset/commit/c933250dadde4aef2cb932653f326c62510fabe7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c933250) will **decrease** coverage by `0.00%`.
   > The diff coverage is `46.15%`.
   
   > :exclamation: Current head 6f2f0e2 differs from pull request most recent head 5085e42. Consider uploading reports for the commit 5085e42 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/16831/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/16831?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #16831      +/-   ##
   ==========================================
   - Coverage   76.99%   76.99%   -0.01%     
   ==========================================
     Files        1018     1018              
     Lines       54668    54673       +5     
     Branches     7456     7456              
   ==========================================
   - Hits        42094    42093       -1     
   - Misses      12329    12335       +6     
     Partials      245      245              
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.08% <100.00%> (-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=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/16831?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/db\_engine\_specs/\_\_init\_\_.py](https://codecov.io/gh/apache/superset/pull/16831/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-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL19faW5pdF9fLnB5) | `46.15% <0.00%> (-3.85%)` | :arrow_down: |
   | [...src/dashboard/components/FiltersBadge/selectors.ts](https://codecov.io/gh/apache/superset/pull/16831/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-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0ZpbHRlcnNCYWRnZS9zZWxlY3RvcnMudHM=) | `79.45% <100.00%> (-0.14%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/16831?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/16831?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [c933250...5085e42](https://codecov.io/gh/apache/superset/pull/16831?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?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] sadpandajoe commented on pull request #16831: fix(native-filters): filter indicator stale state

Posted by GitBox <gi...@apache.org>.
sadpandajoe commented on pull request #16831:
URL: https://github.com/apache/superset/pull/16831#issuecomment-928138513


   🏷️ 2021.38


-- 
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 #16831: fix(native-filters): filter indicator stale state

Posted by GitBox <gi...@apache.org>.
villebro merged pull request #16831:
URL: https://github.com/apache/superset/pull/16831


   


-- 
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] github-actions[bot] commented on pull request #16831: fix(native-filters): filter indicator stale state

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #16831:
URL: https://github.com/apache/superset/pull/16831#issuecomment-926567157


   @geido Ephemeral environment spinning up at http://54.214.186.247:8080. Credentials are `admin`/`admin`. Please allow several minutes for bootstrapping and startup.


-- 
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 pull request #16831: fix(native-filters): filter indicator stale state

Posted by GitBox <gi...@apache.org>.
villebro commented on pull request #16831:
URL: https://github.com/apache/superset/pull/16831#issuecomment-927012278


   > With this fix, the indicator got updated when filter applied and when filter clear, but I still saw the 2nd issue I mentioned in #16806:
   > 
   > when filter applied, sometimes the query did not got updated, should i file this seperately?
   > <img alt="Screen Shot 2021-09-24 at 10 59 58 AM" width="1784" src="https://user-images.githubusercontent.com/81597121/134720695-43c476cd-3ffa-4c5e-afba-b23f08e14523.png">
   
   @jinghua-qa let's file a separate issue, as they are unrelated bugs


-- 
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 #16831: fix(native-filters): filter indicator stale state

Posted by GitBox <gi...@apache.org>.
sadpandajoe commented on pull request #16831:
URL: https://github.com/apache/superset/pull/16831#issuecomment-928138513


   🏷️ 2021.38


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