Skip to content

Commit

Permalink
Merge pull request #560 from samply/release-v0.14.0
Browse files Browse the repository at this point in the history
Release v0.14.0
  • Loading branch information
alexanderkiel authored Dec 3, 2021
2 parents 4b1cea6 + ecd065c commit 6533433
Show file tree
Hide file tree
Showing 179 changed files with 1,067 additions and 345 deletions.
10 changes: 10 additions & 0 deletions .github/scripts/check-referential-integrity-enforced.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

ENFORCED=$(curl -s http://localhost:8080/fhir/metadata | jq -r 'isempty(.rest[].resource[].referencePolicy[] | select(. == "enforced")) | not')

if [ "true" = "$ENFORCED" ]; then
echo "Success"
else
echo "Fail"
exit 1
fi
10 changes: 10 additions & 0 deletions .github/scripts/check-referential-integrity-not-enforced.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

ENFORCED=$(curl -s http://localhost:8080/fhir/metadata | jq -r 'isempty(.rest[].resource[].referencePolicy[] | select(. == "enforced")) | not')

if [ "false" = "$ENFORCED" ]; then
echo "Success"
else
echo "Fail"
exit 1
fi
10 changes: 10 additions & 0 deletions .github/scripts/check-total-number-of-resources.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

TOTAL=$(curl -s http://localhost:8080/fhir | jq -r .total)

if [ "$1" = "$TOTAL" ]; then
echo "Success"
else
echo "Fail: total number of resources was $TOTAL but should be $1"
exit 1
fi
33 changes: 33 additions & 0 deletions .github/test-data/etl/0-condition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "Condition/1-1",
"request": {
"method": "PUT",
"url": "Condition/1-1"
},
"resource": {
"id": "1-1",
"meta": {
"profile": [
"https://fhir.bbmri.de/StructureDefinition/Condition"
]
},
"resourceType": "Condition",
"code": {
"coding": [
{
"system": "http://fhir.de/CodeSystem/dimdi/icd-10-gm",
"code": "C34.9"
}
]
},
"subject": {
"reference": "Patient/1"
}
}
}
]
}
111 changes: 111 additions & 0 deletions .github/test-data/etl/1-specimen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "Specimen/1-1",
"request": {
"method": "PUT",
"url": "Specimen/1-1"
},
"resource": {
"extension": [
{
"url": "https://fhir.bbmri.de/StructureDefinition/Custodian",
"valueReference": {
"reference": "Organization/zebanc"
}
}
],
"id": "1-1",
"meta": {
"profile": [
"https://fhir.bbmri.de/StructureDefinition/Specimen"
]
},
"resourceType": "Specimen",
"subject": {
"reference": "Patient/1"
},
"type": {
"coding": [
{
"code": "blood-plasma",
"system": "https://fhir.bbmri.de/CodeSystem/SampleMaterialType"
}
]
}
}
},
{
"fullUrl": "Specimen/1-2",
"request": {
"method": "PUT",
"url": "Specimen/1-2"
},
"resource": {
"extension": [
{
"url": "https://fhir.bbmri.de/StructureDefinition/Custodian",
"valueReference": {
"reference": "Organization/zebanc"
}
}
],
"id": "1-2",
"meta": {
"profile": [
"https://fhir.bbmri.de/StructureDefinition/Specimen"
]
},
"resourceType": "Specimen",
"subject": {
"reference": "Patient/1"
},
"type": {
"coding": [
{
"code": "peripheral-blood-cells-vital",
"system": "https://fhir.bbmri.de/CodeSystem/SampleMaterialType"
}
]
}
}
},
{
"fullUrl": "Specimen/1-3",
"request": {
"method": "PUT",
"url": "Specimen/1-3"
},
"resource": {
"extension": [
{
"url": "https://fhir.bbmri.de/StructureDefinition/Custodian",
"valueReference": {
"reference": "Organization/zebanc"
}
}
],
"id": "1-3",
"meta": {
"profile": [
"https://fhir.bbmri.de/StructureDefinition/Specimen"
]
},
"resourceType": "Specimen",
"subject": {
"reference": "Patient/1"
},
"type": {
"coding": [
{
"code": "blood-plasma",
"system": "https://fhir.bbmri.de/CodeSystem/SampleMaterialType"
}
]
}
}
}
]
}
24 changes: 24 additions & 0 deletions .github/test-data/etl/2-patient.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "Patient/1",
"request": {
"method": "PUT",
"url": "Patient/1"
},
"resource": {
"birthDate": "1989-11-18",
"gender": "male",
"id": "1",
"meta": {
"profile": [
"https://fhir.bbmri.de/StructureDefinition/Patient"
]
},
"resourceType": "Patient"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FHIR Test Data
# FHIR Synthea Test Data

Generates with Synthea v2.7.0 using openjdk 11.

Expand Down Expand Up @@ -269,4 +269,4 @@ Max Age: 140
98 -- Billy698 Homenick806 (78 y/o M) Newton, Massachusetts
93 -- Karine844 Blanda868 (58 y/o F) Worcester, Massachusetts
Records: total=120, alive=100, dead=20
```
```
86 changes: 56 additions & 30 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -303,17 +303,6 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Clojure
uses: DeLaGuardo/setup-clojure@master
with:
tools-deps: '1.10.3.1029'

- name: Install Blazectl
run: .github/scripts/install-blazectl.sh

Expand All @@ -339,8 +328,14 @@ jobs:
- name: Check Capability Statement
run: .github/scripts/check-capability-statement.sh

- name: Check Referential Integrity Enforced
run: .github/scripts/check-referential-integrity-enforced.sh

- name: Load Data
run: blazectl --server http://localhost:8080/fhir upload .github/test-data
run: blazectl --server http://localhost:8080/fhir upload .github/test-data/synthea

- name: Check Total-Number of Resources are 92114
run: .github/scripts/check-total-number-of-resources.sh 92114

- name: Count Resources
run: blazectl --server http://localhost:8080/fhir count-resources
Expand Down Expand Up @@ -459,6 +454,48 @@ jobs:
- name: Prometheus Metrics
run: curl -f http://localhost:8081/metrics

not-enforcing-referential-integrity-test:
needs: build
runs-on: ubuntu-20.04

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Install Blazectl
run: .github/scripts/install-blazectl.sh

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}

- name: Pull Docker Image
run: docker pull ghcr.io/samply/blaze:sha-${{ github.sha }}

- name: Run Blaze
run: docker run --name blaze -d -e JAVA_TOOL_OPTIONS=-Xmx2g -e ENFORCE_REFERENTIAL_INTEGRITY=false -p 8080:8080 -v blaze-data:/app/data ghcr.io/samply/blaze:sha-${{ github.sha }}

- name: Sleep 60 Seconds
run: sleep 60

- name: Docker Logs
run: docker logs blaze

- name: Check Capability Statement
run: .github/scripts/check-capability-statement.sh

- name: Check Referential Integrity Not Enforced
run: .github/scripts/check-referential-integrity-not-enforced.sh

- name: Load Data
run: blazectl --server http://localhost:8080/fhir upload -c1 .github/test-data/etl

- name: Check Total-Number of Resources are 5
run: .github/scripts/check-total-number-of-resources.sh 5

jepsen-test:
needs: build
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -556,23 +593,6 @@ jobs:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'

- name: Setup Clojure
uses: DeLaGuardo/setup-clojure@master
with:
tools-deps: '1.10.3.1029'

- name: APT Update
run: sudo apt-get update

- name: Install Gnuplot
run: sudo apt-get install gnuplot

- name: Install Blazectl
run: .github/scripts/install-blazectl.sh

Expand Down Expand Up @@ -613,8 +633,14 @@ jobs:
- name: Check Capability Statement
run: .github/scripts/check-capability-statement.sh

- name: Check Referential Integrity Enforced
run: .github/scripts/check-referential-integrity-enforced.sh

- name: Load Data
run: blazectl --server http://localhost:8080/fhir upload .github/test-data
run: blazectl --server http://localhost:8080/fhir upload .github/test-data/synthea

- name: Check Total-Number of Resources are 92114
run: .github/scripts/check-total-number-of-resources.sh 92114

- name: Count Resources
run: blazectl --server http://localhost:8080/fhir count-resources
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v0.14.0

### New Features

* Allow Disabling Referential Integrity ([#544](https://github.com/samply/blaze/pull/544))

The full changelog can be found [here](https://github.com/samply/blaze/milestone/11?closed=1).

## v0.13.5

### Bugfixes
Expand Down
4 changes: 2 additions & 2 deletions docs/deployment/docker-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Blaze should log something like this:
2021-06-27T11:02:37.834Z ee086ef908c1 main INFO [blaze.core:64] - JVM version: 16.0.2
2021-06-27T11:02:37.834Z ee086ef908c1 main INFO [blaze.core:65] - Maximum available memory: 1738 MiB
2021-06-27T11:02:37.835Z ee086ef908c1 main INFO [blaze.core:66] - Number of available processors: 8
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.13.5 in 8.2 seconds
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.14.0 in 8.2 seconds
```

In order to test connectivity, query the health endpoint:
Expand All @@ -47,7 +47,7 @@ that should return:
```json
{
"name": "Blaze",
"version": "0.13.5"
"version": "0.14.0"
}
```

Expand Down
1 change: 1 addition & 0 deletions docs/deployment/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ More information about distributed deployment are available [here](distributed.m
| JAVA_TOOL_OPTIONS || | JVM options \(Docker only\) |
| FHIR_OPERATION_EVALUATE_MEASURE_THREADS | 4 | v0.8 | The maximum number of parallel $evaluate-measure executions. Not the same as the number of threads used for measure evaluation which equal to the number of available processors. |
| OPENID_PROVIDER_URL | - | v0.11 | [OpenID Connect][4] provider URL to enable [authentication][5] |
| ENFORCE_REFERENTIAL_INTEGRITY | true | v0.14 | Enforce referential integrity on resource create, update and delete. It's enabled by default but can be disabled on proxy/middleware/secondary systems were a primary system ensures referential integrity. |

### Common JAVA_TOOL_OPTIONS

Expand Down
Loading

0 comments on commit 6533433

Please sign in to comment.