Commit Graph

1014 Commits

Author SHA1 Message Date
Etienne Poirier d2fd0989c3
3820 Providing an exception for search request with invalid or incomplete tokenParam (#3825)
* Creating an exception to be raised when searching for _tag/_provide/_security where the associated tokenParam is not properly formatted.

* Adding changelogs.

* Adding integration test.

* Rewording ChangeLog.

* Rewording exception message.

* Addressing code review comments.

* Addressing code review comments.

* Bumping hapi-fhir version to 6.1.0-PRE20-SNAPSHOT

* Modifications to pass checkstyle.

Co-authored-by: peartree <etienne.poirier@smilecdr.com>
2022-07-22 11:55:44 -04:00
Ken Stevens 85384feac7
separate elastic tests into their own project (#3827)
* move elastic tests out into their own project in the hopes it solves ci memory issues

* move elastic tests out into their own project in the hopes it solves ci memory issues

* disable elastic tests temporarily

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-21 17:12:19 +00:00
Qingyixia 592190701c
Implement patch in mongo db (#3781)
* Not the final version

* Support PATCH operation

* minor modifications

* minor modifications

* Final version

* Final version

* Version Bump

* bump version again

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-17 21:26:34 -04:00
TipzCM 8ed0a18ef4
3531 implement bulk processors (#3566)
* base batch2 bulk export steps - unimplemented

* added the basic steps

* adding tests

* we have added the tests

* added tests for bulk export stages

* implementing jpa

* 3531 adding the jpabukexportprocessorimplementation

* 3531 first step for mongo bulk export

* jpa stuff updated

* 3531 hapi fhir stuff

* trying to fix up tests

* fixing test

* fixed most tests in batch export

* deprecate

* need some more guidance here

* fixing some tests

* some steps taken

* blah

* stashing

* test

* fixing tests round 1

* many a changes

* updating version

* small updates

* merging in mster again

* fixing up serialization

* added the permission checkers

* cleanup and sonarkube crap

* some more tests

* updating adding tests

* crimes

* blah

* updatingmsg number again

* removal of commented code

* cleanup

* merge confflicts

* fixing msg

* review fixes round 1

* more review fixes

* merging in master

* fixing poms

* review points

* test fix

* test fix

* fix test race condition

* truncate error

* add stack trace to error

* rename to IT

* fix race condition in test

* finally fixed race condition in test.  this time I'm optimistic hapi ci will finally pass

* fix mock test.  not a fan of mock tests like this.

* any job definition with a reducer step must be gated.

* fixed common batch bean wiring

* fix test

* lazy init ResponseTerminologyTranslationSvc

* change the way we lazy init ResponseTerminologyTranslationSvc

* change the way we lazy init ResponseTerminologyTranslationSvc (for the third time.  this is super tricky!)

* disabling testGoldenResourceWithCircularReferenceCanBeCleared for now

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-17 17:49:03 -04:00
TipzCM 0c644271ce
3770 fix batch2 failure loop (#3779)
* 3770 fixing error handling

* some updates to error handling

* changelog

* blah

* bumping version

* fix test failures

* code review points

* review points

* add retry test

* assert counts in the test

* test fixes

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-15 12:42:46 -04:00
Mark Iantorno e0169fa6c7
Adding autoclosing for sonatype publishing (#3798) 2022-07-15 11:10:26 -04:00
dependabot[bot] 31034dd173
Bump jetty-http from 9.4.44.v20210927 to 9.4.48.v20220622 (#3766)
Bumps [jetty-http](https://github.com/eclipse/jetty.project) from 9.4.44.v20210927 to 9.4.48.v20220622.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.44.v20210927...jetty-9.4.48.v20220622)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-http
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-12 15:59:00 -04:00
jamesagnew b7c316fb21 Credit for #3619 2022-07-12 15:57:26 -04:00
StevenXLi 2bc6c91153
3719 enable map response terminology for bulk export (#3735)
* added failing test for Map Response Terminology for bulk export

* moved logic for terminology translation out of the interceptor to svc, added translation logic to bulk export file writer, added more tests

* added changelog

* Wip refactor dependency fix

* wip terminology translation code refactor

* terminology translation code refactor

* refactor clean up

* Remove circular dependency

* Update hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/6_1_0/3719-enable-map-response-terminology-for-bulk-export.yaml

* bump version of hapi to 6.1.0-PRE7-SNAPSHOT

* doc update

* fix issue when search param registry doesn't contain search param for the resource type

* fix beans

* hapi version bump from PRE7 to PRE10

* doc update

* add ResponseTerminologyTranslationSvc as a constructor variable to the interceptor

* fixed ResponseTerminologyInterceptorLoaderTest, added IT for cdr side

* version bump to PRE13

* removed unused import

Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Tadgh <garygrantgraham@gmail.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-12 12:24:15 -04:00
Ken Stevens 0526da080b
3757 move delete expunge to batch2 (#3759)
* begin with failing test

* begin with failing test

* remove unused Spring Batch classes.
convert service classes

* move provider

* just one test left to fix

* fix test

* msg.code

* change log

* bumping hapi to PRE12

* fix test

* review feedback

* license update

* fix intermittent and status update atomicity

* restore url-level partition selection

* fix tests

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-09 17:25:55 -04:00
Nathan Doef b68ccb373a
3693 Search by id is returning a deleted resource with a client-generated id (#3694)
- Added functionality to optionally filter out deleted resources when resolving forced ids to persistent ids
- Bumps version

Co-authored-by: nathaniel.doef <nathaniel.doef@smilecdr.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-05 12:37:25 -04:00
Ken Stevens 3a28920ea7
Add error-handler callback and ensure batch2 completion handler can't be called twice (#3752)
* rename field that drives everything includes

* discovered design flaw in completion

* fix intermittent

* ensure batch2 completion handler can't be called twice

* changelog

* changelog

* javadoc

* bump hapi version

* licences

* Batch2 job definitions can now optionally provide an error handler callback that will be called when a job
instance fails, errors or is cancelled.

* Changed error handler and completion handler to take a "read-only" copy of an instance instead of just certain fields.

* comment

* javadoc

* fix test

* change step execution context from taking instance id to instance

* review feedback

* fix test

* replace 20 or so jetbrains annotations

* fixed a few incorrect @NotNull annotations

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-07-04 23:27:58 -04:00
Ken Stevens 069f20a5f7
batch2 management operations api (#3742)
* first test passes.  onto the next one

* two down two to go

* three down one to go

* licenses

* basic admin-json plumbing confirmed with IT

* FIXME

* FIXME

* FIXME

* FIXME

* changelog

* bump hapi version to 6.1.0-PRE6-SNAPSHOT

Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-06-28 23:02:17 -04:00
jmarchionatto 84fe58cc86
Hsearch namespace consolidation (#3733)
* Initial implementation

* Implement job cancellation

* Works for date and token. Cleanup required.

* Works for string and quantity.Cleanup pending.

* Works for reference and perform cleanup.

* Cleanup configuration and add missing tests

* Eliminate sort property registry (no go for a cluster) for a static property map.

* Missed in previous commit

* Implement HSearch number parameter

* Implement HSearch number sorting

* Unify different hibernate search names (HibernateSearch, Freetext and Lucene) to HSearch

* Move analysis configures for lucene and elastic to same file to enforce the need to keep them in synch

* Use new defined constant

* Rename package too

* Rename additional elastic references

* bump version to 6.1.0-PRE5-SNAPSHOT

* Restore Hap prefix to hapi configurers

* fixing hapi version of new maven module

* fix pom

* fix pom

Co-authored-by: juan.marchionatto <juan.marchionatto@smilecdr.com>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-06-28 18:38:05 -04:00
Ken Stevens 49d298dba1
mdm clear move to batch2 (#3671)
* begin with failing test

* continue building out

* continue building out

* reworking chunk api

* replace ChunkId zippers with proper iterator

* progressing test

* yay test passes!

* switch to idchunk interface

* fixmes

* compiles

* fixme

* fixme

* rename classes

* rename json classes with json suffix

* work towards homogeneous chunks

* fixme

* fixme

* unit test

* fixme

* fixme

* pull out builder

* moar tests

* moar tests

* preserve order

* moar test

* moar test

* fixme

* fixme -> wip to start ci

* msg code

* msg code fix test

* fixme

* change provider implementation

* final WIPs

* IT failing

* IT passes

* java 11

* fix test

* fix test

* fix test

* changelog

* use batch size if provided

* last WIP

* fix test

* fix test

* fix test

* whitespace change to trigger new build

* fix test

* bumping hapi version

* bumping hapi version

* fix test

* review feedback

Co-authored-by: Ken Stevens <ken@Kens-MacBook-Pro.local>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-06-25 20:26:44 -04:00
TipzCM 48c28997e6
3662 batch2 reduction step (#3681)
* adding a bunch of stuff

* most of the steps are working now

* writing more tests

* adding more tests

* updated the batch2 coordinators

* updating version

* some minor test tweaks

* added a new test

* adding more tests

* blah

* blah

* review fixes 1

* fixing tests and refactoring

* review points

* updated for code review

* review fixes

* updated

* step 1 on review step 5

* final touches

* blah

Co-authored-by: leif stawnyczy <leifstawnyczy@leifs-MacBook-Pro.local>
Co-authored-by: Ken Stevens <ken@smilecdr.com>
2022-06-20 18:59:01 +00:00
James Agnew ac8f4f1e56
Apply fix from #3270 (#3712)
* Apply fix from #3270

* Rework compare method
2022-06-16 15:46:14 -04:00
Martin Ashby e2effc65b8
Upgrade okhttp_version to 4.9.3. (#3683)
* Upgrade okhttp_version to 4.9.3.

Remove dependency on okhttp.internal package.

Fixes https://github.com/hapifhir/hapi-fhir/issues/3682

* Include "okhttp/" before the okhttp version in the user agent.

Fixup GenericClientDstu3IT test expectation for the new okhttp version.

Fixes https://github.com/hapifhir/hapi-fhir/pull/3683#issuecomment-1151492939

* Remove the okhttp version from the user-agent.

For consistency with the apache-based client, also simplifies upgrade (tests won't fail).

Fixes https://github.com/hapifhir/hapi-fhir/pull/3683#issuecomment-1151589776
2022-06-14 09:59:02 -04:00
Patrick Werner 1b25a32567
set h2 to latest version to fix #3673 (#3676)
closes #3673
2022-06-08 08:50:11 -04:00
JasonRoberts-smile b9579313ef
Jr 20220519 expunge config params (#3627)
* fix config settings for system-level expunge

* clean up expunge everything interface

* extract common system provider

* changelog

* version bump

* touch changelog to force a fresh pipeline

* re-enable publishing of checkstyle

* back out Gary's Sonatype change entirely
2022-05-23 18:55:42 -04:00
Tadgh 90c9759e95
Minor CVE bumps (#3623) 2022-05-19 07:50:01 -04:00
jamesagnew 8da0a70d50 Credits for #3577 2022-05-18 10:04:13 -04:00
Mark Iantorno 544ef3de1b
Update to 6 1 (#3582)
* added changelog folder, upped version

* version enum
2022-05-03 20:34:25 +00:00
Tadgh 581f40f373
Upgrade Hibernate Search (#3572)
* wip

* updated rest high level for lucene mismatch

* Remove custom JNA

* Bump to 13

* License files

* Changelog
2022-05-02 13:38:56 -04:00
Tadgh f7a31287b6
3558 bulk export premature deletion (#3562)
* Implementation, parameterize test, changelog

* Bump spring framework for a vuln while i'm in here

* Fix number of changelog

* Add IS NOT NULL to query
2022-04-24 01:46:44 +00:00
JasonRoberts-smile 1114c72f03
Further expunge refactoring (#3550)
* convert expunge public interfaces to use ResourcePersistentId instead of Long

* changelog

* version bump
2022-04-21 09:51:19 -04:00
James Agnew 7dec2e334d
AuthorizationInterceptor concurrency failure (#3528)
* Fix #3256 - AuthorizationInterceptor concurrency failure

* Test fixes
2022-04-15 15:27:57 -04:00
James Agnew 8d116b932e
Refactor to restore LGTM functionality (#3455)
* Refactor to restore LGTM functionality

* Compile fix

* Work on cleanup

* Attempt to restore LGTM

* Work on tests

* Fixes

* Build fixes

* Build fix

* Test fix

* Test fixes

* Work on build

* License header updates

* Test fixes

* Test fixes

* License header

* Test fix

* Test fix

* Test fixes

* Restore LGTM

* Fix azure

* Disable test

* Test fixes

* Test cleanup

* Build fix

* Build fix

* Test fix

* Test fix

* Test fixes
2022-04-10 15:54:27 -04:00
longma1 01d6e15f90
2579 partitioned support for mdm (#3485)
* committed changes discussed at tasking

* Changed the subscription message to store the request partition

* modified mdm subscription loader to create a cross partition subscription in the default partition if multitenancy is enabled

* Fix errors when running Multitenant IT for mdm

* Added partition id to mdm golden resource search and creating/updating golden resource

* added partition id column to the mdm link table

* Added partition id of the source resource to partition id column of the mdm link table

* broken build

* working -links, missing hapi tests

* Fixed the mdm link db table due to feedback

* added IT for create link mdm operation, also added changes to pass the IT

* Fixed test for create mdm links, added test for update mdm link on partitioned server

* changed mdmLink search from searchbyExample to criteriaBuilder, added partitionHelperSvc to determine partition

* added test for merge golden resource and search golden resource on partitioned server

* added unit test for not duplicate on partitioned and non-partitioned server

* added criteriabuilder search and tests

* code cleanup

* added partition support to -merge-golden-resources operation

* test cleanup

* fixed  operations with multitenancy

* added test for mdm clear operation

* added waiting for batch job to finish in mdm clear operation test

* added query to dao to support partitioned server for mdm clear operation

* resolve mistake from merge conflict

* added mdm-submit operations, also fixed paging for -query

* added partitionIds constant

* fixed build issue where there was no Code.msg in mdm partition exceptions

* code review fixes

* fix broken test, also fix a bug where query link could not query by linkSource properly

* fix test stubbing

* bump hapi version to 6.0.0-PRE10-SNAPSHOT

Co-authored-by: Ken Stevens <khstevens@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Long Ma <long@smilecdr.com>
2022-04-06 15:48:30 -04:00
Tadgh 53f82870f7 Minor version bump for a CVE 2022-04-03 16:59:21 -07:00
Tadgh 9e0c364fb4
Dependency bumps for CVEs (#3510)
* Bump jackson-databind to address https://nvd.nist.gov/vuln/detail/CVE-2020-36518

* Bump jackson and mariadb
2022-03-31 18:26:19 +00:00
Tadgh 77b4c2a1b1 re-add release prop 2022-03-28 20:22:00 -07:00
Tadgh 6b3b4b2102 Temporarily remove release tag 2022-03-27 14:12:48 -07:00
Tadgh 5b413a9135
Package move-around (#3488)
* moved classes

* Bump version

* licensing

* Repackage, fix messages

* reject empty streams

* Remove dead import

* Version bump

* Fix up test to actually return a data stream

* Move null binary svc to storage
2022-03-26 22:43:41 +00:00
James Agnew b833c13a3c
Improve batch2 error handling (#3482)
* Improve batch2 error handling

* Build fixes

* Work on reindexing

* Test fixes

* Account for gzipped contents

* License header updates

* Register VS operations on public server

* Test fix

* Build fix

* Remove animal sniffer plugin

* Compile fix
2022-03-26 17:40:12 -04:00
James Agnew f82534ca51
Convert Reindex into Batch2 Job (#3458)
* Start working on reindex job

* Updates

* Ongoing work

* Ongoing work

* Work on reindex

* Reindex work

* Add logging

* Fix typo

* Test fix

* Test fix

* Address fixme

* Liocense header

* Resolve fixme

* Add logging

* Update logs

* Address review comments

* License header

* Test fixes

* Test fix

* Test fixes

* Test fix

* Version bump

* Version bump
2022-03-19 16:07:58 -04:00
Ken Stevens dfd99c5471
improve search parameter registry logging (#3452)
* Startup log cleanup.  Use cached fhir contexts.

* improve logging

* improve logging

* add full comparator

* wrap resource search param map

* rename wrapped map methods

* add fixmes

* further searchparam encapsulation

* fix regression found by test

* improve logging

* pre-review cleanup

* pre-review cleanup

* bump hapi version

* license

* since I'm bumping hapi-fhir now, improve the api dependency

* licenses
2022-03-09 19:57:38 -05:00
James Agnew ac80c7ffaa
Search Narrowing by Code Tweaks (#3453)
* Search narrowing tweaks

* Search narrowing tweaks

* Test

* Test fixes

* Try to fix LGTM

* Add license headers

* Test fixes

* Test fixes
2022-03-07 20:27:21 -05:00
Ken Stevens 62bcb80443 Fix sitemap.xml 2022-03-06 15:46:49 -05:00
Tadgh 016774d653
Bump mariadb (#3439) 2022-03-02 18:35:08 -05:00
James Agnew f614eaf6c8
Avoid error when unknown code system behaviour set to warning (#3436)
* Avoid error when unknown code system behaviour set to warning

* Add changelog

* Test fix

* Build fix

* Fixes

* Address review comment
2022-03-01 17:30:59 +00:00
James Agnew 2cba62b4e8
Enable search narrowing on large ValueSets (#3405)
* Enable search narrowing on large ValueSets

* ValueSet improvements

* Work on narrowing

* Work on narrowing

* Work on narrowing

* Work on narrowing

* Add test

* Work on narrowing interceptor

* Work on narrowing

* License headers

* Refactor code narrowing

* Add docs

* Version bump

* Test fix

* Test fixes

* Build fix

* Fixes

* Version bump

* Test fix

* License header updates

* Build fix

* Test fixes

* Test fix

* Test fix

* Docs fix

* Test fix

* Test fix

* Resolve fixme

* Bump

* Force a CI build

* Make CI happen again
2022-03-01 09:16:31 -05:00
Tadgh 68c1015552
Bump core to 5.6.36 (#3433)
* Bump version

* Add changelog, make use of theNoInactive flag

* add test

* remove magic strings
2022-03-01 08:23:48 -05:00
michaelabuckley b263c7a595
bump compiler settings. JDK 11 for prod, JDK 17 for tests (#3435) 2022-02-28 21:51:32 +00:00
James Agnew b7d1ae217d
New batch framework / Bulk Import (#3387)
* Work on new batch framework

* Work on new batch framework

* Work on new batch framework

* Work on batch

* Compile working

* Work on bulk import

* Adjust import

* Work

* Work on batch

* Bump version

* WOrk on new batch processes

* Work on bath

* Bump to PRE4

* Build fixes

* CLeanup

* Small tweak

* Add exception code

* Test fixes

* Test fixes

* Test fix

* Additional synchronization

* Add license headers

* Test fixes

* Test fixes

* Add changelogs

* Address PG

* Test fix

* Test fix

* Test fixes

* Review notes

* Work on tests

* Test fixes

* Test fix

* Work on tests

* Tets fix

* Test fixes

* Test fixes

* Add missing exception codes

* Test fix

* Test fixes

* More test fixing

* License headers

* Test fix

* Add new test logging

* Work on tests

* Test fixes

* Test fix

* Resolve fixme

* Try to avoid test failure

* Add import command

* Work on storage

* Fix error codes

* Fixes

* License header

* Build fix

* Build fixes

* Fix dep
2022-02-27 16:04:49 -05:00
James Agnew cc44deee1a
GraphQL Introspection Support (#3348)
* Start working on graphql Schema

* Start testing

* Work on introspection

* Work on introspection

* Use integers for date ordinals

* Add changelog

* GraphQL updates

* Ongoing wrk

* Cleanup

* Bump core lib

* Add changelog

* Clean up dependencies

* CLeanup

* Add missing message

* Test fix

* Change to force CI
2022-02-22 09:48:57 -05:00
James Agnew 1e2e17784a
Fix parameter count limitation on MSSQL/Oracle large transactions (#3075)
* Fix parameter count limitation on MSSQL/Oracle large transactions

* Changelog fix

* Move changelog

* Force a change to trigger CI

* Test refactoring
2022-02-20 11:52:42 -05:00
Tadgh 3561672fe7
Rel 5 7 mergeback (#3401)
* fix handling of common search parameters

* Revert "fix handling of common search parameters"

This reverts commit 89c45eebdc.

* Fix implementation, add test (#3378)

* Fix implementation, add test

* Tighten test

* Rip out dead modules

* Add changelog

* Jr 20220210 handle common search params in contained searches (#3377)

* fix handling of common search parameters

* add support for reference search parameters with multiple paths

* Issue 3357

* Version bump

* Fixed null pointer exception for re-loading subscription on cdr restart and when there's no partition id in the request, and added tests

* added changelogs for this fix

* Fix broken changelog file

* Can't specify specific resource type permissions for bulk export (#3376)

* deny user from exporting without perms

* add unit tests

* add changelog

Co-authored-by: olivia-you <olivia.you@smilecdr.com>

* Make migration donothing as it was added in error

* Remove ehcache

* Add version.yaml:

* Add to sources/javadocs for dist

* Fix typo

* fix up pom

* wip test removing checkstyle plugin from deployable pom

* remove test pom changes, instead just dont deploy to sonatype

* typo

* Remove ehcache

Co-authored-by: Jason Roberts <jason.roberts@smilecdr.com>
Co-authored-by: JasonRoberts-smile <85363818+JasonRoberts-smile@users.noreply.github.com>
Co-authored-by: Mark Iantorno <markiantorno@gmail.com>
Co-authored-by: Steven Li <steven@smilecdr.com>
Co-authored-by: Olivia You <46392181+oliviayou@users.noreply.github.com>
Co-authored-by: olivia-you <olivia.you@smilecdr.com>
2022-02-18 19:22:44 +00:00
Ken Stevens 631391819b
remove hapi jpa spring config hierarchy (#3390)
* initial refactor to remove hapi jpa spring config hierarchy

* fix poms

* fix batch config

* dependency rearrangement arising from further testing

* fix searchDao bean name

* fixed dstu2 tests

* consolidate validation config

* dstu2 validation regression (man dstu2 support is expensive)

* fix test (with WIP comment)

* restore poms

* fix demo projects

* fix build

* bumping version

* rename generated config class
2022-02-16 20:44:03 -05:00
Ken Stevens fb342cc2a6
2825 ks smile startup (#3388)
* bump flyway

* update thymeleaf template from html5 to html

* add UNKNOWN to batch status test
2022-02-14 15:06:26 -05:00