-
Notifications
You must be signed in to change notification settings - Fork 40
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
Version nil event shared state at 0 #299
Conversation
closing to take a look at a few other implications |
@@ -243,7 +243,16 @@ final class EventHub { | |||
// TODO: Determine which version of Core to use in the top level version field | |||
let data: [String: Any] = [EventHubConstants.EventDataKeys.VERSION: ConfigurationConstants.EXTENSION_VERSION, | |||
EventHubConstants.EventDataKeys.EXTENSIONS: extensionsInfo] | |||
createSharedState(extensionName: EventHubConstants.NAME, data: data, event: nil) | |||
|
|||
guard let sharedState = registeredExtensions.first(where: { $1.sharedStateName == EventHubConstants.NAME })?.value.sharedState else { |
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 bit of a special case where the is no event to version off of but we still need to set it to the latest shared state for event hub.
Even though we have some other shared state discussions going on, I'm going to merge this as:
|
Previously a nil event would version shared state at the latest, instead, now we version shared state at 0 when the event is nil. This is done to resolve the issue faced in #296