From ce6b4acfacb9e9a82ae383b43aa83a40f45882d4 Mon Sep 17 00:00:00 2001 From: Alexander Kiel Date: Thu, 21 Jul 2022 17:31:50 +0200 Subject: [PATCH 1/4] Remove Bare Polymorph JSON Properties The example is a Task resource were the output value is given as with the bare "value" key instead of one of the concrete keys like "valueReference". Such properties can't be assigned a type and have to be removed. --- .../scripts/evaluate-measure-subject-list.sh | 6 ++-- docs/cql-queries/api.md | 2 +- evaluate-measure.sh | 2 +- .../src/blaze/fhir/spec/impl.clj | 8 ++++-- .../test/blaze/fhir/spec_test.clj | 28 +++++++++++++++++-- .../middleware/params_test.clj | 2 +- .../fhir/operation/evaluate_measure_test.clj | 2 +- 7 files changed, 37 insertions(+), 13 deletions(-) diff --git a/.github/scripts/evaluate-measure-subject-list.sh b/.github/scripts/evaluate-measure-subject-list.sh index f608c2168..a346966b6 100755 --- a/.github/scripts/evaluate-measure-subject-list.sh +++ b/.github/scripts/evaluate-measure-subject-list.sh @@ -71,15 +71,15 @@ cat < (dissoc m k) (assoc key v)) (recur keys)) - m))) + (dissoc m key)))) (def ^:private choice-type-key-cache @@ -392,7 +394,7 @@ (keyword (str (name key) (str/capital (name type))))))))) -(defn choice-type-key [key type] +(defn- choice-type-key [key type] (.get ^LoadingCache choice-type-key-cache [key type])) diff --git a/modules/fhir-structure/test/blaze/fhir/spec_test.clj b/modules/fhir-structure/test/blaze/fhir/spec_test.clj index cf1370b7f..0d4c9eab9 100644 --- a/modules/fhir-structure/test/blaze/fhir/spec_test.clj +++ b/modules/fhir-structure/test/blaze/fhir/spec_test.clj @@ -4332,9 +4332,9 @@ [#fhir/Extension {:value #fhir/Reference{:reference "Patient/153540"}}]} #fhir/uri - {:extension - [#fhir/Extension - {:value #fhir/Reference{:reference "Observation/153628"}}]}]} + {:extension + [#fhir/Extension + {:value #fhir/Reference{:reference "Observation/153628"}}]}]} [["Procedure" "153904"] ["Condition" "153931"] ["Patient" "153540"] @@ -4381,6 +4381,28 @@ ["Observation" "204754"]]))) +(deftest task-test + (testing "conforming" + (s2/form :fhir.json.Task/output) + (testing "JSON" + (are [json fhir] (= fhir (s2/conform :fhir.json/Task json)) + {:resourceType "Task" + :output + [{:valueReference {:reference "bar"}}]} + {:fhir/type :fhir/Task + :output + [{:fhir/type :fhir.Task/output + :value #fhir/Reference{:reference "bar"}}]}) + + (testing "bare :value properties are removed" + (are [json fhir] (= fhir (s2/conform :fhir.json/Task json)) + {:resourceType "Task" + :output + [{:value {:reference "bar"}}]} + {:fhir/type :fhir/Task + :output + [{:fhir/type :fhir.Task/output}]}))))) + (deftest primitive-val-test (are [x] (fhir-spec/primitive-val? x) "foo" diff --git a/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/middleware/params_test.clj b/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/middleware/params_test.clj index 68cd7787c..490fb2d53 100644 --- a/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/middleware/params_test.clj +++ b/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/middleware/params_test.clj @@ -140,7 +140,7 @@ :value #fhir/date"2015"} {:fhir/type :fhir.Parameters/parameter :name "measure" - :value "measure-202606"}]}}]] + :value #fhir/string"measure-202606"}]}}]] (let [{:blaze.fhir.operation.evaluate-measure/keys [params]} @(handler request)] diff --git a/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure_test.clj b/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure_test.clj index 06bdc71a2..ff538afe0 100644 --- a/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure_test.clj +++ b/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure_test.clj @@ -503,7 +503,7 @@ :parameter [{:fhir/type :fhir.Parameters/parameter :name "measure" - :value "url-181501"} + :value #fhir/string"url-181501"} {:fhir/type :fhir.Parameters/parameter :name "periodStart" :value #fhir/date"2014"} From ba7f3b12346fbc56bb81ba1d68e97552fda3191a Mon Sep 17 00:00:00 2001 From: Alexander Kiel Date: Thu, 21 Jul 2022 18:01:17 +0200 Subject: [PATCH 2/4] Migrate to Eclipse Temurin because OpenJDK is Deprecated The former used image openjdk:17-oracle is now 3 month old while the new image eclipse-temurin:17 is only 1 day old. --- Dockerfile | 8 ++++---- docs/deployment/manual-deployment.md | 4 ++-- modules/server/deps.edn | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e798cf25..262bb8459 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ -FROM openjdk:17-oracle +FROM eclipse-temurin:17-jre -RUN microdnf upgrade && microdnf remove expat fontconfig freetype \ - aajohan-comfortaa-fonts fontpackages-filesystem gzip bzip2 tar libpng \ - binutils && microdnf clean all +RUN apt-get update && apt-get upgrade -y && \ + apt-get purge curl libbinutils libctf0 libctf-nobfd0 libncurses6 -y && \ + apt-get autoremove -y && apt-get clean RUN mkdir -p /app/data && chown 1001:1001 /app/data COPY target/blaze-standalone.jar /app/ diff --git a/docs/deployment/manual-deployment.md b/docs/deployment/manual-deployment.md index d8c9ba8a4..2f7c8be83 100644 --- a/docs/deployment/manual-deployment.md +++ b/docs/deployment/manual-deployment.md @@ -1,6 +1,6 @@ # Manual Deployment -The installation works under Windows, Linux and macOS. The only dependency is an installed OpenJDK 11. Blaze is tested with [AdoptOpenJDK][1]. +The installation works under Windows, Linux and macOS. The only dependency is an installed OpenJDK 11 or 17 with 17 recommended. Blaze is tested with [Eclipse Temurin][1]. Blaze runs on the JVM and comes as single JAR file. Download the most recent version [here](https://github.com/samply/blaze/releases/tag/v0.17.11). Look for `blaze-0.17.11-standalone.jar`. @@ -68,5 +68,5 @@ that should return: Blaze will be configured through environment variables which are documented [here][2]. -[1]: +[1]: [2]: diff --git a/modules/server/deps.edn b/modules/server/deps.edn index b674854e3..e2f5c1e0a 100644 --- a/modules/server/deps.edn +++ b/modules/server/deps.edn @@ -6,7 +6,7 @@ {:local/root "../module-base"} org.eclipse.jetty/jetty-server - {:mvn/version "9.4.46.v20220331"} + {:mvn/version "9.4.48.v20220622"} ring/ring-jetty-adapter {:mvn/version "1.9.5" From 698ebbb4c524c1d6f650f041fa5425ad1265a5e3 Mon Sep 17 00:00:00 2001 From: Alexander Kiel Date: Thu, 21 Jul 2022 19:03:19 +0200 Subject: [PATCH 3/4] Update Dependencies --- deps.edn | 2 +- modules/cassandra/deps.edn | 2 +- modules/cql/deps.edn | 2 +- modules/fhir-path/deps.edn | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/deps.edn b/deps.edn index 9ad80e070..55ac43efa 100644 --- a/deps.edn +++ b/deps.edn @@ -80,7 +80,7 @@ :outdated {:replace-deps {com.github.liquidz/antq - {:mvn/version "1.8.847"} + {:mvn/version "1.9.863"} org.slf4j/slf4j-nop {:mvn/version "1.7.36"}} diff --git a/modules/cassandra/deps.edn b/modules/cassandra/deps.edn index 54d541d36..d50769d82 100644 --- a/modules/cassandra/deps.edn +++ b/modules/cassandra/deps.edn @@ -11,7 +11,7 @@ ;; current version of transitive dependency of com.datastax.oss/java-driver-core io.netty/netty-handler - {:mvn/version "4.1.78.Final"}} + {:mvn/version "4.1.79.Final"}} :aliases {:test diff --git a/modules/cql/deps.edn b/modules/cql/deps.edn index f4cd77227..f84439fde 100644 --- a/modules/cql/deps.edn +++ b/modules/cql/deps.edn @@ -8,7 +8,7 @@ {:mvn/version "2.13.3"} info.cqframework/cql-to-elm - {:mvn/version "1.5.9" + {:mvn/version "1.5.10" :exclusions [com.google.code.javaparser/javaparser info.cqframework/qdm diff --git a/modules/fhir-path/deps.edn b/modules/fhir-path/deps.edn index 0b005d9d7..d587785be 100644 --- a/modules/fhir-path/deps.edn +++ b/modules/fhir-path/deps.edn @@ -3,7 +3,7 @@ {:local/root "../fhir-structure"} info.cqframework/cql - {:mvn/version "1.5.9"}} + {:mvn/version "1.5.10"}} :aliases {:test From 253568514b7a158ebb57c49fec80bd10dc343dfc Mon Sep 17 00:00:00 2001 From: Alexander Kiel Date: Thu, 21 Jul 2022 20:48:56 +0200 Subject: [PATCH 4/4] Release v0.17.12 --- CHANGELOG.md | 14 +++++++++++++- README.md | 4 ++-- docs/deployment/docker-deployment.md | 4 ++-- docs/deployment/manual-deployment.md | 12 ++++++------ .../rest-api/src/blaze/rest_api/capabilities.clj | 2 +- perf-test/gatling/pom.xml | 2 +- pom.xml | 2 +- src/blaze/system.clj | 2 +- 8 files changed, 27 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c0e533cb..fa18defe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## v0.17.12 + +### Security + +* Migrate to Eclipse Temurin because OpenJDK is Deprecated ([#773](https://github.com/samply/blaze/issues/773)) + +### Bugfixes + +* Remove Bare Polymorph JSON Properties ([#772](https://github.com/samply/blaze/pull/772)) + +The full changelog can be found [here](https://github.com/samply/blaze/milestone/51?closed=1). + ## v0.17.11 ### Bugfixes @@ -7,7 +19,7 @@ * Fix Quantity Indexing without Value ([#764](https://github.com/samply/blaze/issues/764)) * Fix Deserialisation of Primitive Values in Extensions ([#767](https://github.com/samply/blaze/issues/767)) -### Other Improvements ([#758](https://github.com/samply/blaze/issues/758)) +### Other Improvements * Implement Functions in CQL ([#766](https://github.com/samply/blaze/pull/766)) diff --git a/README.md b/README.md index 6a84a0de1..5d346eb4f 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ The goal of this project is to provide a FHIR® Store with an internal CQL Evalu Blaze passes all [Touchstone FHIR 4.0.1 Basic Tests][12] and almost all [CQL Tests][3]. Please refer to the [Conformance](docs/conformance.md) section and report any issues you encounter during evaluation. -Latest release: [v0.17.11][5] +Latest release: [v0.17.12][5] ## Quick Start @@ -72,7 +72,7 @@ Unless required by applicable law or agreed to in writing, software distributed [3]: [4]: -[5]: +[5]: [6]: [7]: [8]: diff --git a/docs/deployment/docker-deployment.md b/docs/deployment/docker-deployment.md index e4a018a21..551855f57 100644 --- a/docs/deployment/docker-deployment.md +++ b/docs/deployment/docker-deployment.md @@ -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.17.11 in 8.2 seconds +2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.17.12 in 8.2 seconds ``` In order to test connectivity, query the health endpoint: @@ -47,7 +47,7 @@ that should return: ```json { "name": "Blaze", - "version": "0.17.11" + "version": "0.17.12" } ``` diff --git a/docs/deployment/manual-deployment.md b/docs/deployment/manual-deployment.md index 2f7c8be83..3575975d4 100644 --- a/docs/deployment/manual-deployment.md +++ b/docs/deployment/manual-deployment.md @@ -2,12 +2,12 @@ The installation works under Windows, Linux and macOS. The only dependency is an installed OpenJDK 11 or 17 with 17 recommended. Blaze is tested with [Eclipse Temurin][1]. -Blaze runs on the JVM and comes as single JAR file. Download the most recent version [here](https://github.com/samply/blaze/releases/tag/v0.17.11). Look for `blaze-0.17.11-standalone.jar`. +Blaze runs on the JVM and comes as single JAR file. Download the most recent version [here](https://github.com/samply/blaze/releases/tag/v0.17.12). Look for `blaze-0.17.12-standalone.jar`. After the download, you can start blaze with the following command (Linux, macOS): ```sh -java -jar blaze-0.17.11-standalone.jar -m blaze.core +java -jar blaze-0.17.12-standalone.jar -m blaze.core ``` Blaze will run with an in-memory, volatile database for testing and demo purposes. @@ -17,14 +17,14 @@ Blaze can be run with durable storage by setting the environment variables `STOR Under Linux/macOS: ```sh -STORAGE=standalone java -jar blaze-0.17.11-standalone.jar -m blaze.core +STORAGE=standalone java -jar blaze-0.17.12-standalone.jar -m blaze.core ``` Under Windows, you need to set the Environment variables in the PowerShell before starting Blaze: ```powershell $Env:STORAGE="standalone" -java -jar blaze-0.17.11-standalone.jar -m blaze.core +java -jar blaze-0.17.12-standalone.jar -m blaze.core ``` This will create three directories called `index`, `transaction` and `resource` inside the current working directory, one for each database part used. @@ -42,7 +42,7 @@ The output should look 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.17.11 in 8.2 seconds +2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.17.12 in 8.2 seconds ``` In order to test connectivity, query the health endpoint: @@ -62,7 +62,7 @@ that should return: ```json { "name": "Blaze", - "version": "0.17.11" + "version": "0.17.12" } ``` diff --git a/modules/rest-api/src/blaze/rest_api/capabilities.clj b/modules/rest-api/src/blaze/rest_api/capabilities.clj index 062d32ab4..cd6940c35 100644 --- a/modules/rest-api/src/blaze/rest_api/capabilities.clj +++ b/modules/rest-api/src/blaze/rest_api/capabilities.clj @@ -117,7 +117,7 @@ :copyright #fhir/markdown"Copyright 2019 - 2022 The Samply Community\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License." :kind #fhir/code"instance" - :date #fhir/dateTime"2022-07-13" + :date #fhir/dateTime"2022-07-21" :software {:name "Blaze" :version version} diff --git a/perf-test/gatling/pom.xml b/perf-test/gatling/pom.xml index 728352914..e47028531 100644 --- a/perf-test/gatling/pom.xml +++ b/perf-test/gatling/pom.xml @@ -5,7 +5,7 @@ samply.blaze gatling - 0.17.11 + 0.17.12 1.8 diff --git a/pom.xml b/pom.xml index 5dac3ebfe..b3f927d13 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 samply blaze - 0.17.11 + 0.17.12 blaze A FHIR Store with internal, fast CQL Evaluation Engine diff --git a/src/blaze/system.clj b/src/blaze/system.clj index 8870448c7..5fee64886 100644 --- a/src/blaze/system.clj +++ b/src/blaze/system.clj @@ -85,7 +85,7 @@ (def ^:private root-config - {:blaze/version "0.17.11" + {:blaze/version "0.17.12" :blaze/clock {}