-
Notifications
You must be signed in to change notification settings - Fork 444
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
refactor(sanity): move bundle metadata store to resource cache #7077
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@juice49 forgive me if I'm mixing concepts: would it be here that we should do the fetch for the existing versions of documents like @pedrobonamin brought up as a question in an earlier PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bundles store fetches the bundle documents from the addon dataset only.
We will need to fetch the version
documents from other location, because we could in theory have a version
document without a bundle
Left a comment! |
6236a7d
to
aab7b2e
Compare
aab7b2e
to
48f20f3
Compare
No changes to documentation |
48f20f3
to
e9be93f
Compare
e9be93f
to
f9aafec
Compare
Co-authored-by: Pedro Bonamin <[email protected]>
f9aafec
to
cbf7da1
Compare
Description
This branch moves the bundle metadata store to the resource cache and removes the
BundlesContext
context, which is no longer required.The bundle metadata store is initialised lazily when first subscribed to. Upon subscription, it will fetch a list of bundles and create a listener to keep the locally held state fresh.
The store is not disposed of when all subscriptions are closed. After it has been initialised, it will keep listening for the duration of the app's lifecycle. Subsequent subscriptions will be given the latest state upon subscription.
Note: the
packages/sanity/src/core/releases/tool/__tests__/BundlesOverview.test.tsx
test is failing, but this seems to have been occurring prior to the change.What to review
Testing
Notes for release