Skip to content

BFD-4190: Refactor Coverage endpoints and add additional test cases - #2779

Merged
aschey-forpeople merged 13 commits into
masterfrom
BFD-4190
Aug 20, 2025
Merged

BFD-4190: Refactor Coverage endpoints and add additional test cases#2779
aschey-forpeople merged 13 commits into
masterfrom
BFD-4190

Conversation

@aschey-forpeople

@aschey-forpeople aschey-forpeople commented Aug 15, 2025

Copy link
Copy Markdown
Contributor

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 ON clause, causing us to move all additional filtering logic to the WHERE clause. 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 the overshare_mbis information 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.

@aschey-forpeople
aschey-forpeople marked this pull request as ready for review August 18, 2025 22:08
Comment thread apps/bfd-server-ng/README.md
brick-green
brick-green previously approved these changes Aug 19, 2025

@brick-green brick-green left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM. Just one question

Comment thread apps/bfd-pipeline/bfd-pipeline-idr/load_synthetic.py
@aschey-forpeople
aschey-forpeople added this pull request to the merge queue Aug 20, 2025
Merged via the queue into master with commit b8163e4 Aug 20, 2025
10 checks passed
@aschey-forpeople
aschey-forpeople deleted the BFD-4190 branch August 20, 2025 18:03
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.

5 participants