Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and fix functionality dealing with ReadPartitionIdRequestDetails #5691

Conversation

codeforgreen
Copy link
Collaborator

@codeforgreen codeforgreen commented Feb 8, 2024

closes #5694

Summary of changes:

  • populate ReadPartitionIdRequestDetails for all invocations of IRequestPartitionHelperSvc which involve computing partitionId for read requests (including search, history, mdm related operations and system operations like bulk import/export, reindex). Do not allow this parameter to be passed as null.
  • Optimize calling pattern by adding new methods to IRequestPartitionHelperSvc such that caller no longer needs to pass null arguments.
  • Add test for bulk import with patientId partitioning and move existing bulk export tests.

Copy link

github-actions bot commented Feb 8, 2024

Formatting check succeeded!

Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2f5ffe7) 81.32% compared to head (1c12eef) 83.38%.
Report is 448 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5691      +/-   ##
============================================
+ Coverage     81.32%   83.38%   +2.05%     
- Complexity    23650    26886    +3236     
============================================
  Files          1425     1679     +254     
  Lines         86399   103799   +17400     
  Branches      11677    13149    +1472     
============================================
+ Hits          70265    86554   +16289     
- Misses        10947    11612     +665     
- Partials       5187     5633     +446     

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

Copy link
Contributor

@michaelabuckley michaelabuckley left a comment

Choose a reason for hiding this comment

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

This seems careful and safe.

Made a minor suggestion about test name.

I'm not sure about replacing the parameter object pattern with overloaded methods, but at least they are all non-null. I think this would have been cleaner with overloads or builders on the underlying ReadPartitionIdRequestDetails instead of the service layer. It shows up in all the mock changes for the new methods names.

@michaelabuckley michaelabuckley merged commit e5d410d into master Feb 17, 2024
66 checks passed
@michaelabuckley michaelabuckley deleted the mm-20240207-read-partition-id-details-refactoring-and-fixing branch February 17, 2024 21:16
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.

PatientIdPartitioningInterceptor produces NullPointerException when ReadPartitionIdRequestDetails is null
2 participants