feat: FTRS-4392 updated processor to set skipped metric on no db changes#1113
Merged
lukasz-jercha-nhs merged 8 commits intomainfrom Apr 10, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the data-migration service’s processing metrics so that “no-op” updates (where the DynamoDB transaction would be empty) are counted as skipped, and aligns unit + service-automation tests with the new metric behavior.
Changes:
- Increment
metrics.skippedwhen there are no DynamoDB transaction items to write. - Update service-automation Gherkin scenarios to expect
skipped=1for no-op updates. - Update/add unit tests to validate the new skip-tracking behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/service_automation/tests/features/data_migration_features/incremental_updates/update_organisation_fields.feature | Adjusts expected SQS metrics for a no-op update to count as skipped. |
| tests/service_automation/tests/features/data_migration_features/incremental_updates/update_endpoints.feature | Adjusts expected SQS metrics for an endpoint no-change update to count as skipped. |
| tests/service_automation/tests/features/data_migration_features/incremental_updates/update_edge_cases.feature | Adjusts expected SQS metrics for multiple no-op update edge cases to count as skipped. |
| services/data-migration/tests/unit/service_migration/test_processor.py | Updates an existing metrics assertion and adds a unit test for empty-transaction skip tracking. |
| services/data-migration/src/service_migration/processor.py | Implements skip-metric increment when transaction_items is empty. |
prjh2-nhs
previously approved these changes
Apr 7, 2026
prjh2-nhs
approved these changes
Apr 8, 2026
AndrzejPietrzak1Nhs
approved these changes
Apr 8, 2026
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
Updated metrics to increase skipped metric on no items found in the transaction bundle
Context
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.