Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add state managers under the key by dash name #3900

Merged
merged 1 commit into from
Jan 25, 2024
Merged

Conversation

AdityaHegde
Copy link
Collaborator

@AdityaHegde AdityaHegde commented Jan 25, 2024

We are seeing issues with stale data from a previously selected dashbaord. This happens when we switch between 2 dashboards that are already opened (this caches data and updates are immediate). Since StateManagersProvider is outside the key the stateManagers.setMetricsViewName is run before the update in metricsViewName propagates to the key and the underlying dashboard components are swapped. There is a brief moment when components will have newer data in state managers but local data is stale. This can be seen in Filters.svelte where we have activeDimensionName.

One quick fix is to add the state managers under the key. Another way is to add safeguard everywhere queries are made using data inside a component, but this is not scalable. We should come up with a good fix in the long run.

@AdityaHegde AdityaHegde added the blocker A release blocker issue that should be resolved before a new release label Jan 25, 2024
@AdityaHegde AdityaHegde self-assigned this Jan 25, 2024
@ericpgreen2 ericpgreen2 merged commit 6e3a415 into main Jan 25, 2024
6 checks passed
@ericpgreen2 ericpgreen2 deleted the keyed-statemanagers branch January 25, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker A release blocker issue that should be resolved before a new release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants