-
Notifications
You must be signed in to change notification settings - Fork 21
chore: adds applyChanges to LDFeatureStore and impls. Adds TransactionalPersistentStore. #833
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
base: main
Are you sure you want to change the base?
Conversation
…nalPersistentStore.
@launchdarkly/js-sdk-common size report |
@launchdarkly/js-client-sdk size report |
@launchdarkly/js-client-sdk-common size report |
76369ec
to
eb45ed6
Compare
* @param selector opaque string that uniquely identifies the state that contains the changes | ||
* @param callback Will be called after the changes are applied. | ||
*/ | ||
applyChanges( |
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 is a breaking change, which would require the SDKs be major versioned.
It is possible to do this as an optional method, but require that method to support FDv2.
This interface is both exported and expected to be implemented by external packages. So, for example, node server would need major versioned and then the persistence packages would need major versioned with that new version constraint.
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.
Also, the persistent store implementations don't really need to implement this if it is handled at the wrapper.
So I would expect either two interfaces, or one interface with an optional method addition.
The two interfaces would allow for internal type safety, as types used with V2 would need to implement it.
* @param initMetadata Optional metadata to initialize the data source with. | ||
* @param selector opaque string that uniquely identifies the state that contains the changes | ||
*/ | ||
applyChanges( |
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.
See note for store.
This interface is in the sub-systems folder, which means it could be implemented externally.
Requirements
This PR moves changes for FDv2 from the temporary holding branch to main. All picked code has been previously reviewed and was picked from the temporary holding branch using file pick commands.
Resolved conflicts with @abarker-launchdarkly's recent initMetadata changes. Please verify those conflict resolutions @abarker-launchdarkly .