Skip to content

Support new historical rules condition and consequences#1162

Merged
timkimadobe merged 66 commits intodev-v5.6.0from
feature/historical-consequence
Jul 24, 2025
Merged

Support new historical rules condition and consequences#1162
timkimadobe merged 66 commits intodev-v5.6.0from
feature/historical-consequence

Conversation

@timkimadobe
Copy link
Copy Markdown
Contributor

@timkimadobe timkimadobe commented Jul 24, 2025

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:

It 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…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
… 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
* 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
timkimadobe and others added 24 commits June 10, 2025 15:54
…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
…eEvent method to dispatch consequence

Update test cases
…ce-event

Update historical consequence to dispatch entire rules consequence
# Conflicts:
#	AEPCore.xcodeproj/project.pbxproj
@timkimadobe timkimadobe merged commit fc3d9e9 into dev-v5.6.0 Jul 24, 2025
17 checks passed
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.

3 participants