You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "tomaszmalec (via GitHub)" <gi...@apache.org> on 2024/10/24 10:12:39 UTC

[I] Auto-refresh broken filtering on multiple tabs [superset]

tomaszmalec opened a new issue, #30698:
URL: https://github.com/apache/superset/issues/30698

   ### Bug description
   
   If we use filters between auto-refresh, switching tabs do not include changed filters, what's more, filters show change, but the tab does not, making it look like legit information when it is not (for example changed year does not change year for other tabs, making data look like for another year than it is).
   
   To reproduce:
   - Dashboard with at least 2 tabs and filter year in the side-bar
   - Load tab A
   - Load tab B
   - Turn on auto-refresh for 1 min
   - Wait for auto-refresh
   - Change the year in the filter bar before the new auto-refresh kicks in
   - Wait for auto-refresh
   - Change tab to A
   - ERROR: Filter shows changed value (same as for tab B), but charts show data for filtering scenario that tab was loaded initially with
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   4.0.2
   
   ### Python version
   
   Not applicable
   
   ### Node version
   
   Not applicable
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   The test was done using both 3.1.0 and 4.0.2 images pulled with docker from the official repo.
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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.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: [I] Auto-refresh broken filtering on multiple tabs [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #30698: Auto-refresh broken filtering on multiple tabs
URL: https://github.com/apache/superset/issues/30698


-- 
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: [I] Auto-refresh broken filtering on multiple tabs [superset]

Posted by "tomaszmalec (via GitHub)" <gi...@apache.org>.
tomaszmalec commented on issue #30698:
URL: https://github.com/apache/superset/issues/30698#issuecomment-3179447347

   I would not say it is a weird edge case - it is a basic intersection of two basic features - filters and auto-refresh. Nothing fancy about it.
   
   I understand that seeing is believing, so...
   
   https://github.com/user-attachments/assets/6d575ef0-82bb-49d2-a104-6fcf0b10516f
   


-- 
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: [I] Auto-refresh broken filtering on multiple tabs [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #30698:
URL: https://github.com/apache/superset/issues/30698#issuecomment-3120750041

   Closing as inactive / not planned, but happy to revisit!


-- 
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: [I] Auto-refresh broken filtering on multiple tabs [superset]

Posted by "tomaszmalec (via GitHub)" <gi...@apache.org>.
tomaszmalec commented on issue #30698:
URL: https://github.com/apache/superset/issues/30698#issuecomment-3179555860

   It is not a weird edge case, it is ba
   
   https://github.com/user-attachments/assets/01a7992c-4002-45ce-9908-77d46e9ed3ff
   
   sic functionality of filters and auto-refresh intersecting.
   I do understand that seeing is believing, so here is an example of how it works:


-- 
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: [I] Auto-refresh broken filtering on multiple tabs [superset]

Posted by "tomaszmalec (via GitHub)" <gi...@apache.org>.
tomaszmalec commented on issue #30698:
URL: https://github.com/apache/superset/issues/30698#issuecomment-2435572812

   ![image](https://github.com/user-attachments/assets/9357ca6e-1bbb-459c-9b37-d16300cffce9)
   


-- 
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: [I] Auto-refresh broken filtering on multiple tabs [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #30698:
URL: https://github.com/apache/superset/issues/30698#issuecomment-2434868200

   <!-- Greeting -->
   Hey @tomaszmalec! I'm here to help you with any bugs, questions, or contributions you have for the project. Let's work together to resolve this issue!
   
   <!-- Answer -->
   To address the issue where auto-refresh does not update filters correctly across multiple tabs in Superset version 4.0.2, you should look into the fix provided in pull request [#29291](https://github.com/apache/superset/pull/29291). This fix addresses the problem of filters not updating with force update when caching is enabled. Ensure that your Superset instance includes this fix, as it may resolve the inconsistency with the selected filters during auto-refresh <sup>[[1]](https://github.com/apache/superset/blob/master/CHANGELOG/4.0.2.md)</sup>.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
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: [I] Auto-refresh broken filtering on multiple tabs [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #30698:
URL: https://github.com/apache/superset/issues/30698#issuecomment-2813306221

   Are you still facing this issue? It might be that this is just a weird edge case, or like me, people are finding it a little hard to understand with these repro steps. If you can record a video explaning what you're seeing, and it's in the latest supported release (4.1.2 or newer), that'd help.


-- 
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: [I] Auto-refresh broken filtering on multiple tabs [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #30698:
URL: https://github.com/apache/superset/issues/30698#issuecomment-2434885941

   <!-- Answer -->
   The issue you're experiencing seems to be related to how Superset handles state management for filters and charts across multiple tabs. When switching tabs, filters should apply only to charts that are visible within the active tabs. However, it appears that the auto-refresh mechanism might not be correctly updating the charts with the new filter values when switching tabs.
   
   Superset uses functions like `useIsFilterInScope` and `useSelectFiltersInScope` to determine which filters are in scope based on the active tabs and the dashboard layout. These functions ensure that filters are applied only to charts that are visible within the active tabs <sup>[[1]](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/nativeFilters/state.ts)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/state.ts)</sup>.
   
   Given that caching is disabled, the issue might be related to how the auto-refresh mechanism interacts with these functions. It could be beneficial to review the implementation of these functions and the auto-refresh logic to ensure they are correctly handling the state updates across tabs.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   


-- 
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: [I] Auto-refresh broken filtering on multiple tabs [superset]

Posted by "tomaszmalec (via GitHub)" <gi...@apache.org>.
tomaszmalec commented on issue #30698:
URL: https://github.com/apache/superset/issues/30698#issuecomment-2434882052

   @dosu reported issue is not related to the filter bar, it is related to charts.
   Cache in this scenario is disabled (-1) so that is even more not related to the issue that was triggered as similar


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