Support new historical rules condition and consequences#1162
Merged
timkimadobe merged 66 commits intodev-v5.6.0from Jul 24, 2025
Merged
Support new historical rules condition and consequences#1162timkimadobe merged 66 commits intodev-v5.6.0from
timkimadobe merged 66 commits intodev-v5.6.0from
Conversation
…ort (#1121) * Implement event history insert and insertIfNotExists consequence support * Add method stubs * Update API dump * Clean up TestableExtensionRuntime * Add early exit check for schema consequence, update log messages and levels * Dispatch consequence event for insert and insertIfNotExists success * Add Event to EventHistoryRequest conversion support and remove eventExists API and update usages * Add nil case handler calls for recordHistoricalEvent and getHistoricalEvents * Add weak self to closures and update LOG_PREFIX to static instance * Update log levels from error to warning * Extract strings from dictionary access logic into constants * Add method call and result configuration support for recordHistoricalEvent method in TestableExtensionRuntime * Fix early exit case for no keys specified to record in consequence * Remove support for the `keys` property * Add back content empty check early exit, improve logging detail * Extract repeated log info into variable
… EventHub to use dependency injection for EventHistory Update MockEventHistoryDatabase to use new EventHistoryDatabaseService protocol Update EventHistory and EventHistoryDatabase to conform to their respective protocols Update MockEventHistory to conform to EventHistoryService protocol and fix implementation Fix EventHubEventHistoryTests to use the instantiated eventhub instance not the shared one # Conflicts: # AEPCore.xcodeproj/project.pbxproj # AEPCore/Mocks/PublicTestUtils/MockEventHistoryDatabase.swift # AEPCore/Tests/EventHubTests/EventHubEventHistoryTests.swift # AEPCore/Tests/TestHelpers/MockEventHistory.swift
…e with insert operation (#1134) * Fix insertIfNotExists escaping closure operation race with insert operation * Remove max time deadline for getHistoricalEvents in historical event consequence processing Add check for database error value in CONSEQUENCE_EVENT_HISTORY_OPERATION_INSERT_IF_NOT_EXISTS logic and improve logging around this value * Remove unused constant * Split log lines
Update EventHistory init to accommodate this read only access to the backing storage
…y related method tests
… EventHub to use dependency injection for EventHistory Update MockEventHistoryDatabase to use new EventHistoryDatabaseService protocol Update EventHistory and EventHistoryDatabase to conform to their respective protocols Update MockEventHistory to conform to EventHistoryService protocol and fix implementation Fix EventHubEventHistoryTests to use the instantiated eventhub instance not the shared one
…toryService.swift
* Create protocols for EventHistory and EventHistoryDatabase and update EventHub to use dependency injection for EventHistory Update MockEventHistoryDatabase to use new EventHistoryDatabaseService protocol Update EventHistory and EventHistoryDatabase to conform to their respective protocols Update MockEventHistory to conform to EventHistoryService protocol and fix implementation Fix EventHubEventHistoryTests to use the instantiated eventhub instance not the shared one # Conflicts: # AEPCore.xcodeproj/project.pbxproj # AEPCore/Mocks/PublicTestUtils/MockEventHistoryDatabase.swift # AEPCore/Tests/EventHubTests/EventHubEventHistoryTests.swift # AEPCore/Tests/TestHelpers/MockEventHistory.swift * Fix merge * Update EventHub's eventHistory reference from var to let * Update protocol names and add storage property to EventHistoryProvider Update EventHistory init to accommodate this read only access to the backing storage * Delete incorrectly renamed file * Pod update
Add tests for new insert rules consequence (part 1) v2
…orical event operation # Conflicts: # AEPCore.xcodeproj/project.pbxproj
Remove unneeded getHistoricalEvents delay helper in mock
…ount-tests Test coverage for JSONCondition `getHistoricalEventCount` (search type `any` or `ordered`)
Dispatch consequence in an rules consequence event if schema type is not eventHistory
… backwards compatibility
…arity with Android
Add array flattening support
…eEvent method to dispatch consequence Update test cases
…ce-event Update historical consequence to dispatch entire rules consequence
Fix event history logging level
# Conflicts: # AEPCore.xcodeproj/project.pbxproj
cdhoffmann
approved these changes
Jul 24, 2025
This was referenced Jul 24, 2025
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This PR merges the feature branch that contains all the changes related to Core's support for the new historical condition and consequences into latest dev branch with the PRs:
insertIfNotExistslogical error and race with insert operation #1134mostRecentsearch type for rules historical condition #1138getMostRecentHistoricalEvent(search typemostRecent) #1140getHistoricalEventCount(search typeanyorordered) #1142It also merged the latest main into the feature branch:
and fixed project files lost in that merge resolution:
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: