Skip to content

bugfix for null values#282

Merged
ericbuckley merged 4 commits into
mainfrom
fix/281-null-value-server-errors
Apr 11, 2025
Merged

bugfix for null values#282
ericbuckley merged 4 commits into
mainfrom
fix/281-null-value-server-errors

Conversation

@ericbuckley

@ericbuckley ericbuckley commented Apr 8, 2025

Copy link
Copy Markdown
Collaborator

Description

Fix to address server errors when a null value is send for race, identifier.type or address.line.

Related Issues

closes #281

Additional Notes

Also fixing a broken test case from a bad merge. https://github.com/CDCgov/RecordLinker/actions/runs/14340832961

<--------------------- 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 Apr 8, 2025
@codecov

codecov Bot commented Apr 8, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.07%. Comparing base (10deb83) to head (d77ad48).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #282   +/-   ##
=======================================
  Coverage   98.06%   98.07%           
=======================================
  Files          32       32           
  Lines        1813     1814    +1     
=======================================
+ Hits         1778     1779    +1     
  Misses         35       35           

☔ 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 added the bug Something isn't working label Apr 8, 2025
@ericbuckley ericbuckley marked this pull request as ready for review April 8, 2025 19:21

@m-goggins m-goggins left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good for these fields! Are you concerned about null values in other fields?

bamader
bamader previously approved these changes Apr 10, 2025

@bamader bamader left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Seems legit 👍 . Similar to Marcelle, were these the only fields that Michael identified as having a problem?

@ericbuckley

Copy link
Copy Markdown
Collaborator Author

@m-goggins @bamader good questions. Michael only reported the issue on race = null, I discovered the other two when reading the code in pii.py. From what I can tell, all the fields that are validated by pydantic using types (eg name.family) seem to handle null values just fine. I focused my testing on all the fields with custom field_validator functions, specifically the ones executed before validation, as there is little guarantee as to what the value is at that time.

If you think there could be issues with other fields, let me know, and I'll add a quick test case for that.

@m-goggins m-goggins left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good!

@ericbuckley ericbuckley merged commit 5ecdba0 into main Apr 11, 2025
@ericbuckley ericbuckley deleted the fix/281-null-value-server-errors branch April 11, 2025 20:35
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.

null linkage features create server errors

3 participants