This repository was archived by the owner on Oct 4, 2023. It is now read-only.
Fix cache types#2699
Open
raymondjacobson wants to merge 1 commit into
Open
Conversation
1824c87 to
fb636b8
Compare
dylanjeffers
approved these changes
Jan 27, 2023
dylanjeffers
left a comment
Contributor
There was a problem hiding this comment.
wow amazing changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
These types are hard, but this fixes them partially.
Getting cache entries in bulk were lying that they were Record<string, User|Track|Collection>, but it's really a partial since for whatever reason the value may not actually end up in the cache.
This deserves a bit better of a cleanup, but hopefully this can prevent some errors like missing user_ids on undefined in downstream components, etc.
I think we may consider filtering undefined's out when coming back from the cache too, but that also probably leads to some undefined behaviors and I felt that doing them in the downstream selectors / components was safer.
Dragons
Is there anything the reviewer should be on the lookout for? Are there any dangerous changes?
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide repro instructions & any configuration.
Ran all type checks & ran app locally web & mobile
How will this change be monitored?
For features that are critical or could fail silently please describe the monitoring/alerting being added.
Feature Flags
Are all new features properly feature flagged? Describe added feature flags.