Skip to content

VED-760 Improve blank file checking#826

Merged
dlzhry2nhs merged 1 commit intomasterfrom
feature/VED-760-improve-blank-file-validation
Sep 16, 2025
Merged

VED-760 Improve blank file checking#826
dlzhry2nhs merged 1 commit intomasterfrom
feature/VED-760-improve-blank-file-validation

Conversation

@dlzhry2nhs
Copy link
Copy Markdown
Contributor

@dlzhry2nhs dlzhry2nhs commented Sep 16, 2025

Summary

  • Routine Change

Key Changes

  • Adjusts our empty file checking to actually look at the contents rather than the file size from S3 metadata
  • Removes the error ITOC log that we do not need to generate when we receive empty files
  • Rest of the business logic is as-is. Mark the empty file as "Not processed - Empty file" in the audit table, create an ack and move the uploaded file to the archive directory

Technical

  • Assessing the e2e batch process it seemed that the empty file checking logic could easily be moved to the recordprocessor which is already counting the rows. CSV dict reader will skip any empty lines. (Fortunately the ack_backend row count checking also does this, so we are consistent. I was worried when I first started reading the code!)
  • Moto level integration tests added to validate the functionality
  • Minor but added some type hinting and moved a few magic strings to constants

Reviews Required

  • Dev

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all or part of the acceptance criteria of the ticket, and the code is in a mergeable state.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • I have ensured the changelog has been updated by the submitter, if necessary.

@github-actions
Copy link
Copy Markdown
Contributor

This branch is working on a ticket in the NHS England VED JIRA Project. Here's a handy link to the ticket:

VED-760

@sonarqubecloud
Copy link
Copy Markdown

@dlzhry2nhs dlzhry2nhs marked this pull request as ready for review September 16, 2025 12:00
@dlzhry2nhs dlzhry2nhs merged commit 27555af into master Sep 16, 2025
8 checks passed
@dlzhry2nhs dlzhry2nhs deleted the feature/VED-760-improve-blank-file-validation branch September 16, 2025 15:31
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.

3 participants