Open
Conversation
Test Results 294 files +1 294 suites +1 24m 32s ⏱️ - 2m 22s Results for commit cd19a4b. ± Comparison against base commit b1be75b. This pull request removes 205 and adds 54 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
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.
Extending EventReference with type, status and identifier
Background
The EventBridge event emitted when an expanded entry is persisted previously only contained
topic,uri, andtimestamp. Handlers consuming these events had no way to filter on publication type or status at the routing level, meaning every persisted entry was delivered to all subscribers regardless of relevance.Changes
The event payload has been extended with five additional fields:
oldType,newType,oldStatus,newStatus, andidentifier.Before:
{ "topic": "PublicationService.ExpandedEntry.Persisted", "uri": "s3://persistedEntries/resources/019c75d7fbe4-c057dc2e-ad74-4062-a585-380252d40e34.gz" }After:
{ "topic": "PublicationService.ExpandedEntry.Persisted", "uri": "s3://persistedEntries/resources/019c75d7fbe4-c057dc2e-ad74-4062-a585-380252d40e34.gz", "identifier": "019c75d7fbe4-c057dc2e-ad74-4062-a585-380252d40e34", "oldType": "AcademicArticle", "newType": "AcademicArticle", "oldStatus": "PUBLISHED", "newStatus": "PUBLISHED", "timestamp": "2026-02-19T12:20:16.363011Z" }Impact
By including
oldType,newType,oldStatus,newStatus, andidentifierin the event, handlers can now filter directly in their EventBridge rule pattern without fetching and inspecting the full expanded document first.The NVI handler is a prime example — since the vast majority of publications in the system are not NVI-relevant, filtering at the routing level eliminates millions of unnecessary Lambda invocations.
EventBridge rule pattern before:
EventBridge rule pattern after:
Filtering on both
oldType/newTypeandoldStatus/newStatusensures the handler captures events where the publication was already NVI-relevant before the update, as well as events where it has become NVI-relevant as a result of the update.Future possibilities
Should NVI need to implement a deduplication queue by publication identifier, the
identifierfield is now available in the event and can be leveraged via EventBridge Pipes.