Making sure that we are not accidentally overwriting an existing reso…
…urce with the same ID from another IG by comparing identifier, url or whatever constitutes uniqueness.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 83.58%. Comparing base (
406db33) to head (698c821). Report is 38 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #6291 +/- ##
============================================
+ Coverage 83.54% 83.58% +0.04%
- Complexity 27432 27562 +130
============================================
Files 1707 1715 +8
Lines 106185 106675 +490
Branches 13397 13434 +37
============================================
+ Hits 88710 89169 +459
+ Misses 11750 11746 -4
- Partials 5725 5760 +35
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@codeforgreen can I persuade you to have a look at this?
Ping @codeforgreen ?
Ping @codeforgreen ?
HI @jkiddo what is this related to? The title of this issue does not ring a bell to me. Can you provide more details and link any related issue or pull request? Thanks. Do you just want me to review your changes?
An issue I discovered in the starter project using the IG installer functionality. If you install multiple IGs with overlapping resources then the order of installing suddenly starts to play a part which it shouldnt. This PR makes sure that all resources are installed using conditional logic and stops that non deterministic behaviour. So yes, please review/comment/merge.
@codeforgreen does the above provide the needed clarity?
@dotasek the error will be thrown in https://github.com/hapifhir/hapi-fhir/blob/8676cf2045375ee37d33f1978c6629fd92cd272a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/JpaResourceDaoCodeSystem.java#L252
I've added this test here https://github.com/hapifhir/hapi-fhir/pull/6291/files#diff-aa258240972be5bb70e69c9bb6ff0a8cd9ea9a93815c0d1e79e4cf446986f789R273 that might better explain and reproduce it.
I'm a bit uncertain on what the test should be on https://github.com/hapifhir/hapi-fhir/pull/6291/files#diff-aa258240972be5bb70e69c9bb6ff0a8cd9ea9a93815c0d1e79e4cf446986f789R285 - as the current expected behaviour is a bit dangerous, IMHO, as only parts of the IG being installed will pass through
@dotasek here's the test that shows the issue - or not? It utterly depends on what expected behaviour is when you install different packages that by coincidence have same id in their resources. Current logic is that last one wins. The logic in this PR will stop that as you can end up in an unexpected state.