Skip to content

feat: FTRS-4392 updated processor to set skipped metric on no db changes#1113

Merged
lukasz-jercha-nhs merged 8 commits intomainfrom
task/FTRS-4392-set-skipped-metric-on-no-changes
Apr 10, 2026
Merged

feat: FTRS-4392 updated processor to set skipped metric on no db changes#1113
lukasz-jercha-nhs merged 8 commits intomainfrom
task/FTRS-4392-set-skipped-metric-on-no-changes

Conversation

@lukasz-jercha-nhs
Copy link
Copy Markdown
Contributor

@lukasz-jercha-nhs lukasz-jercha-nhs commented Apr 2, 2026

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.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

Copilot AI review requested due to automatic review settings April 2, 2026 11:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.skipped when there are no DynamoDB transaction items to write.
  • Update service-automation Gherkin scenarios to expect skipped=1 for 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
prjh2-nhs previously approved these changes Apr 7, 2026
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.

4 participants