BFD-4190: Refactor Coverage endpoints and add additional test cases - #2779
Merged
Conversation
aschey-forpeople
marked this pull request as ready for review
August 18, 2025 22:08
aschey-forpeople
requested review from
alex-dzeda,
malessi and
mjburling
as code owners
August 18, 2025 22:08
brick-green
previously approved these changes
Aug 19, 2025
brick-green
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Just one question
aschey-forpeople
enabled auto-merge
August 19, 2025 20:23
np-complete0
approved these changes
Aug 20, 2025
brick-green
approved these changes
Aug 20, 2025
malessi
approved these changes
Aug 20, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA Ticket:
BFD-4190
What Does This PR Do?
Due to limitations with JPA, the queries for loading coverage data cannot specify additional conditions on the
ONclause, causing us to move all additional filtering logic to theWHEREclause. Unfortunately, this was causing issues loading information for benes with only expired or future coverage. Additionally, some tables were missing the date filter, causing extra rows to be returned. The solution for this is to create views with the future/past data already filtered out. Then, we can map our entities to these views instead of the tables, allowing us to simplify these queries. I also took this pattern to create a view for beneficiaries with theovershare_mbisinformation filtered out, so we don't have to remember to join on this table every time.I've also updated the synthetic data loader to support sub-folders for loading CSVs, allowing us to group relevant bits of data together. This will make it easier to maintain different sets of test data.
What Should Reviewers Watch For?
If you're reviewing this PR, please check for these things in particular:
What Security Implications Does This PR Have?
Please indicate if this PR does any of the following:
Adds any new software dependencies
Modifies any security controls
Adds new transmission or storage of data
Any other changes that could possibly affect security?
I have considered the above security implications as it relates to this PR. (If one or more of the above apply, it cannot be merged without the ISSO or team security engineer's (
@sb-benohe) approval.)I have created tests to sufficiently ensure the reliability of my code, if applicable. If this is a modification to an existing piece of code, I have audited the associated tests to ensure everything works as expected.
Validation
Have you fully verified and tested these changes? Is the acceptance criteria met? Please provide reproducible testing instructions, code snippets, or screenshots as applicable.
Additional tests created.