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

Bust RunTimeline cache #23482

Merged
merged 4 commits into from
Aug 7, 2024
Merged

Bust RunTimeline cache #23482

merged 4 commits into from
Aug 7, 2024

Conversation

salazarm
Copy link
Contributor

@salazarm salazarm commented Aug 7, 2024

Summary & Motivation

  1. Add a version parameter to HourlyDataCache
  2. If the version in the indexeddb cache doesn't match the version in code then don't use the indexeddb cache data at all
  3. Add version parameter to useRunTImeline

How I Tested These Changes

Loaded the run timeline using app-proxy and saw that the cache was cleared. Subsequent loads used the cache

@salazarm salazarm requested review from bengotow and hellendag August 7, 2024 18:36
id: localCacheIdPrefix ? `${localCacheIdPrefix}-useRunsForTimeline-filtered` : false,
keyPrefix: JSON.stringify(filter),
keyMaxCount: 3,
version: 1,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Track this value in a single module-level const (with a loud comment?) so that we don't miss changing it in both places?

Copy link

github-actions bot commented Aug 7, 2024

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-1an8ozm6a-elementl.vercel.app
https://salazarm-bust-run-timeline-cache.core-storybook.dagster-docs.io

Built with commit 23d8d18.
This pull request is being automatically deployed with vercel-action

@salazarm salazarm merged commit f134bc6 into master Aug 7, 2024
1 of 2 checks passed
@salazarm salazarm deleted the salazarm/bust-run-timeline-cache branch August 7, 2024 19:27
jmsanders pushed a commit that referenced this pull request Aug 7, 2024
## Summary & Motivation

1. Add a version parameter to `HourlyDataCache`
2. If the version in the indexeddb cache doesn't match the version in
code then don't use the indexeddb cache data at all
3. Add version parameter to useRunTImeline

## How I Tested These Changes

Loaded the run timeline using app-proxy and saw that the cache was
cleared. Subsequent loads used the cache

(cherry picked from commit f134bc6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants