-
Notifications
You must be signed in to change notification settings - Fork 157
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
feature(erase): Implement Erase Operation #2334
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
- Added Code Coverage and Mock Implementations - db2: Add a stored procedure to Erase multiple versions in a controlled fashion. (must have a standard logfilsz so you don't blow out the transaction log) - Resolve the FHIROperationContext inconsistently available to Batch.java #2297 - Convert the setting of Method Type to a string (instead of casting downstream) - Relax FHIROperationUtil getOutputParameters to not throw Exception - Add Postgres Function to Erase Data - Moved around the extreme version history test to last. - Updated the large version history test to create the versions with a bundle (up to 1100 versions) - Updated the create-database.sh logfilsiz 60000 to increase the transaction log size to support larger transaction where we delete lots of resources - Add Integration Test for $erase that works with the forbidden case (tenant1) - Added support at the Type level and include id,version in the Parameters object - Add fhir-persistence tests for Erase - Added concurrent-1.0 to the server.xml and reference/use in the EraseResourceDAO - ManagedExecutorService is used to dispatch a callable which can be terminated if it exceeds a timeout. Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
- Issues resolved are: - Add GDPR FHIR Operation Support - $erase #850 - FHIROperationContext inconsistently available to Batch.java #2297 - Support $erase (hard delete) for a specific historical version of a resources #2304 - Remove the timeout and count parameters in lieu of the version-specific erase - Update the README with clarity on the parameters - logicalId, version, patient, reason - clarified the HTTP Method, Api Paths, Response Codes, and Responses - Add Acceptance Criteria to explain VERSION delete - Update the test harnesses for Db2 and Postgres to use the simple Erase approach - Clean up the DAO, JdbcEraseTest to move away from Timeout - Removed patient/reason so we don't reflect illegal content. - Change function/stored proc to use resource_type, logical_id only - Refactor erase.json to support only specific values. - Revert test.properties to logging false - Improve IT/UT test coverage Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
prb112
changed the title
Feature(erase): Implement Erase Operation
feature(erase): Implement Erase Operation
May 11, 2021
- Update the EraseOperationTest to use a ThreadPool when testing across all resources - Reduce processing time - Update the fhir-server-config.json to support default, tenant1, and tenant2 Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
- Cleanup on unneeded examples. Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
- Changed eraseBean references for eraseDto - Update the formatting for the Postgres Function - Updated the README.md to add Description Column Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
prb112
requested review from
michaelwschroeder,
punktilious,
lmsurpre,
JohnTimm,
tbieste and
d0roppe
May 11, 2021 17:05
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
tbieste
reviewed
May 11, 2021
operation/fhir-operation-erase/src/main/java/com/ibm/fhir/operation/erase/EraseOperation.java
Outdated
Show resolved
Hide resolved
tbieste
reviewed
May 11, 2021
tbieste
reviewed
May 11, 2021
tbieste
reviewed
May 11, 2021
...operation-erase/src/test/java/com/ibm/fhir/operation/erase/mock/MockFHIRResourceHelpers.java
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 11, 2021
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
punktilious
reviewed
May 11, 2021
fhir-persistence-jdbc/src/main/java/com/ibm/fhir/persistence/jdbc/dao/EraseResourceDAO.java
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 11, 2021
fhir-persistence-jdbc/src/main/java/com/ibm/fhir/persistence/jdbc/dao/EraseResourceDAO.java
Show resolved
Hide resolved
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
punktilious
reviewed
May 13, 2021
...rsistence-jdbc/src/main/java/com/ibm/fhir/persistence/jdbc/impl/FHIRPersistenceJDBCImpl.java
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
...rsistence-jdbc/src/main/java/com/ibm/fhir/persistence/jdbc/impl/FHIRPersistenceJDBCImpl.java
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
fhir-persistence-jdbc/src/test/java/com/ibm/fhir/persistence/jdbc/test/erase/EraseTestMain.java
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
fhir-persistence-jdbc/src/test/java/com/ibm/fhir/persistence/jdbc/test/erase/EraseTestMain.java
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
fhir-persistence-jdbc/src/test/java/com/ibm/fhir/persistence/jdbc/test/erase/EraseTestMain.java
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
fhir-persistence-jdbc/src/test/java/com/ibm/fhir/persistence/jdbc/test/erase/EraseTestMain.java
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
fhir-persistence-jdbc/src/test/java/com/ibm/fhir/persistence/jdbc/test/erase/EraseTestMain.java
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
fhir-persistence-jdbc/src/test/java/com/ibm/fhir/persistence/jdbc/test/erase/EraseTestMain.java
Outdated
Show resolved
Hide resolved
- Important change is the fhir-server-config.json is necessary to use the cache - Update EraseResourceDAO to use the cache to get the ResourceType long id - Update the EraseTestMain to use CommonUtil - Update JDBCEraseTest to inject the cache - Update the pom.xml in fhir-server-test to use less memory Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
lmsurpre
reviewed
May 13, 2021
fhir-persistence-jdbc/src/main/java/com/ibm/fhir/persistence/jdbc/util/ResourceTypesCache.java
Show resolved
Hide resolved
lmsurpre
reviewed
May 13, 2021
fhir-persistence/src/test/resources/logging.unitTest.properties
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
fhir-server/src/main/java/com/ibm/fhir/server/util/FHIROperationUtil.java
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
fhir-server/src/main/java/com/ibm/fhir/server/util/FHIROperationUtil.java
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
fhir-server/src/main/java/com/ibm/fhir/server/util/FHIROperationUtil.java
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 13, 2021
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
- Added an Integration test update to check Bundle Size - Refactored the NOT_FOUND handler - Review the README.md Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
- Updated the resource_change_log erase Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
lmsurpre
approved these changes
May 13, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
punktilious
reviewed
May 14, 2021
fhir-persistence-schema/src/main/resources/db2/erase_resource.sql
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 14, 2021
fhir-persistence-schema/src/main/resources/postgres/erase_resource.sql
Outdated
Show resolved
Hide resolved
punktilious
reviewed
May 14, 2021
fhir-persistence-jdbc/src/main/java/com/ibm/fhir/persistence/jdbc/dao/EraseResourceDAO.java
Show resolved
Hide resolved
punktilious
approved these changes
May 14, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Paul Bastide <pbastide@us.ibm.com>
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.
Issues resolved are:
Remove the timeout and count parameters in lieu of the version-specific erase
Update the README with clarity on the parameters
Update the test harnesses for Db2 and Postgres to use the simple Erase approach
Clean up the DAO, JdbcEraseTest to move away from Timeout
Removed patient/reason so we don't reflect illegal content.
Change function/stored proc to use resource_type, logical_id only
Refactor erase.json to support only specific values.
Revert test.properties to logging false
Improve IT/UT test coverage
Added Code Coverage and Mock Implementations
db2: Add a stored procedure to Erase multiple versions in a controlled fashion. (must have a standard logfilsz so you don't blow out the transaction log)
Resolve the FHIROperationContext inconsistently available to Batch.java FHIROperationContext inconsistently available to Batch.java #2297
Convert the setting of Method Type to a string (instead of casting downstream)
Relax FHIROperationUtil getOutputParameters to not throw Exception
Add Postgres Function to Erase Data
Moved around the extreme version history test to last.
Updated the large version history test to create the versions with a bundle (up to 1100 versions)
Updated the create-database.sh logfilsiz 60000 to increase the transaction log size to support larger transaction where we delete lots of resources
Add Integration Test for $erase that works with the forbidden case (tenant1)
Added support at the Type level and include id,version in the Parameters object
Add fhir-persistence tests for Erase
Added concurrent-1.0 to the server.xml and reference/use in the EraseResourceDAO
ManagedExecutorService is used to dispatch a callable which can be terminated if it exceeds a timeout.
Changed eraseBean references for eraseDto
Update the formatting for the Postgres Function
Updated the README.md to add Description Column
Update the EraseOperationTest to use a ThreadPool when testing across all resources
Reduce processing time
Update the fhir-server-config.json to support default, tenant1, and tenant2