Skip to content

bugfix: record parsing issues with empty strings and null values #441

Merged
ericbuckley merged 5 commits into
mainfrom
fix/squash-none-missing-data-bugs
Jun 19, 2025
Merged

bugfix: record parsing issues with empty strings and null values #441
ericbuckley merged 5 commits into
mainfrom
fix/squash-none-missing-data-bugs

Conversation

@ericbuckley

@ericbuckley ericbuckley commented Jun 18, 2025

Copy link
Copy Markdown
Collaborator

Description

Fixing cases in which a null value or empty string in a record payload can cause a 500.

Additional Notes

  • null values in address lines (eg "address": {"line": ["123 main", null]})
  • empty strings in phone numbers (eg "telecom": {"system": "phone", "value": ""})
  • null values in race lists (eg "race": ["asian", null])

Also adding a helper script, scripts/seed_data.py to help with loading large amounts of data into the API.

<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->

Checklist

Please review and complete the following checklist before submitting your pull request:

  • I have ensured that the pull request is of a manageable size, allowing it to be reviewed within a single session.
  • I have reviewed my changes to ensure they are clear, concise, and well-documented.
  • I have updated the documentation, if applicable.
  • I have added or updated test cases to cover my changes, if applicable.
  • I have minimized the number of reviewers to include only those essential for the review.

Checklist for Reviewers

Please review and complete the following checklist during the review process:

  • The code follows best practices and conventions.
  • The changes implement the desired functionality or fix the reported issue.
  • The tests cover the new changes and pass successfully.
  • Any potential edge cases or error scenarios have been considered.

@ericbuckley ericbuckley self-assigned this Jun 18, 2025
@ericbuckley ericbuckley added the bug Something isn't working label Jun 18, 2025
@codecov

codecov Bot commented Jun 18, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.55%. Comparing base (c20c4e7) to head (ddffd15).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #441      +/-   ##
==========================================
+ Coverage   98.54%   98.55%   +0.01%     
==========================================
  Files          33       34       +1     
  Lines        1987     2011      +24     
==========================================
+ Hits         1958     1982      +24     
  Misses         29       29              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ericbuckley ericbuckley marked this pull request as ready for review June 18, 2025 04:26
Comment thread src/recordlinker/schemas/pii.py Outdated
@ericbuckley ericbuckley changed the title Fixing record parsing issues with empty strings and null values bugfix: record parsing issues with empty strings and null values Jun 19, 2025
@ericbuckley ericbuckley merged commit dc6f7ff into main Jun 19, 2025
15 checks passed
@ericbuckley ericbuckley deleted the fix/squash-none-missing-data-bugs branch June 19, 2025 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants