Chore: [AEA-5673] - Vector clock removal#121
Merged
originalphil merged 3 commits intomainfrom Apr 2, 2026
Merged
Conversation
Contributor
|
This PR is linked to a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket: AEA-5673 |
There was a problem hiding this comment.
Pull request overview
This PR removes the legacy vectorClock attribute from update/logging flows and replaces it with an inDatastore boolean intended to represent whether a record already exists in the datastore, aligning interactions and tests with the new flag.
Changes:
- Replaced
vectorClockwithinDatastoreacross interaction logging and record/document “to store” payloads. - Updated DynamoDB datastore record-return shape to include
inDatastore: Trueinstead of a placeholder vector clock. - Updated unit tests to assert against the new
inDatastorefield.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
tests/interactions/updates_test.py |
Updates smart-update tests to pass inDatastore instead of vectorClock. |
tests/common/dynamodb_datastore_test.py |
Adjusts expected returned-record shape to include inDatastore. |
src/eps_spine_shared/interactions/updates.py |
Updates EPS0126a/EPS0127a log payloads to emit inDatastore. |
src/eps_spine_shared/interactions/create_prescription.py |
Updates EPS0139 log payload to emit inDatastore. |
src/eps_spine_shared/interactions/common.py |
Replaces vectorClock usage with inDatastore for store-prep and chooses blind vs smart update using inDatastore. |
src/eps_spine_shared/common/dynamodb_datastore.py |
Returns records with inDatastore: True instead of a synthetic vector clock. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This comment was marked as off-topic.
This comment was marked as off-topic.
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.
Summary
Details
Replace vectorClock attribute with inDatastore attribute to indicate existence of an item in the datastore.