Anthony-Nolan / Atlas

A free & open-source Donor Search Algorithm Service
GNU General Public License v3.0
9 stars 5 forks source link

Update to a missing donor prevents processing of other records in import file #905

Closed seanmobrien closed 1 year ago

seanmobrien commented 1 year ago

Describe the bug When a donor file that includes an update to a non-existing donor is processed, the donor file import logs a single failure and does not process any other donors in the file. It should fail to import the non-existing donor, but process other donor updates in the file.

To Reproduce Steps to reproduce the behavior:

  1. Upload a donor file that contains an U (update) record for a non-existant donor and at least one other valid record

  2. Run this query in AI, observe the donor import file was processed and logged 'Could not find expected donor in Atlas database' error traces | union exceptions | order by timestamp desc | where operation_Name == "ImportDonorFile" Snag_4d2a9ca

  3. Run the following SQL query against ATLAS database. Observe record for uploaded file is in FileState FailedPermanent with a single failure logged. No donors were imported. SELECT TOP (1000)* FROM [Donors].[DonorImportHistory] order by ImportBegin desc Snag_4d4da37

Expected behaviour Donor import should process all valid records in the file and continue to log / count failed donor updates.

Screenshots

Inputs/Outputs 2023-03-13-16-00-01-465-alldif-donors-8139.json on WMDA's dev environment can replicate this issue.

Atlas Build & Runtime Info (please complete the following information):

zabeen commented 1 year ago

Notes about different update combinations and which ones should give errors: https://github.com/Anthony-Nolan/Atlas/blob/master/README_DonorImport.md#donor-import-file-behaviour-if-out-of-order

daria-sorokina-da commented 1 year ago

For QA:

Scenarios:

DmitriyShcherbina commented 1 year ago

@daria-sorokina-da testing is OK Passed test:

mmelchers commented 1 year ago

Seems to work as expected.