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

Fix NPE in Storage with Mass Ingestion and Compartment Interceptor #6598

Conversation

jdar8
Copy link
Collaborator

@jdar8 jdar8 commented Jan 7, 2025

What was done:
Fixed a couple bugs relating how different settings interact with the Patient Compartment Enforcing Interceptor:

  • ResourceCompartmentUtil#getPatientCompartmentIdentity() (used by the interceptor) would throw a NPE when the provided resource is null. Fixed by adding a null check.
  • When both mass ingestion and the Patient Compartment Enforcing Interceptor is enabled, the interceptor needs to know the resource in order to compute the compartment for comparison. However, mass ingestion will set the resource to null. Fixed by ensuring resource is not set to null if the interceptor is present.
  • Added tests and changelog

Closes #6599

Copy link

github-actions bot commented Jan 7, 2025

Formatting check succeeded!

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (rel_8_0@024515e). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             rel_8_0    #6598   +/-   ##
==========================================
  Coverage           ?   83.52%           
  Complexity         ?    28595           
==========================================
  Files              ?     1798           
  Lines              ?   111291           
  Branches           ?    13974           
==========================================
  Hits               ?    92951           
  Misses             ?    12349           
  Partials           ?     5991           

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

Copy link
Collaborator

@TipzCM TipzCM left a comment

Choose a reason for hiding this comment

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

minor changes

@jdar8 jdar8 changed the base branch from master to rel_8_0 January 24, 2025 22:38
jdar and others added 3 commits January 24, 2025 14:45
@KevinDougan KevinDougan enabled auto-merge (squash) February 3, 2025 17:39
@KevinDougan KevinDougan merged commit a4fa654 into rel_8_0 Feb 3, 2025
67 checks passed
@KevinDougan KevinDougan deleted the jd-20250107-fix-NPE-mass-ingestion-with-patient-compartment-interceptor branch February 3, 2025 19:45
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.

NPE when Restarting Storage Module
3 participants