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

Version nil event shared state at 0 #299

Merged
merged 4 commits into from
Sep 21, 2020

Conversation

nporter-adbe
Copy link
Contributor

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

@nporter-adbe
Copy link
Contributor Author

closing to take a look at a few other implications

@nporter-adbe nporter-adbe reopened this Sep 15, 2020
@@ -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 {
Copy link
Contributor Author

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.

@nporter-adbe
Copy link
Contributor Author

Even though we have some other shared state discussions going on, I'm going to merge this as:

  1. I think its still valid to version nil shared state at 0 rather than latest
  2. Fixes a bug in Identity to version at current rather than latest.

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.

Issue: rules engine can't retrieve the right version of the lifecycle shared state
3 participants