Skip to content

Commit

Permalink
Merge pull request #818 from samply/release-v0.18.1
Browse files Browse the repository at this point in the history
Release v0.18.1
  • Loading branch information
alexanderkiel authored Oct 14, 2022
2 parents 867d3e1 + 66da081 commit 315385a
Show file tree
Hide file tree
Showing 156 changed files with 977 additions and 235 deletions.
4 changes: 2 additions & 2 deletions .github/distributed-test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ services:
HEAP_NEWSIZE: "100M"

blaze-1:
image: "ghcr.io/samply/blaze:sha-${GITHUB_SHA}"
image: "blaze:latest"
environment:
JAVA_TOOL_OPTIONS: "-Xmx512m"
STORAGE: "distributed"
Expand Down Expand Up @@ -94,7 +94,7 @@ services:
- cassandra-2

blaze-2:
image: "ghcr.io/samply/blaze:sha-${GITHUB_SHA}"
image: "blaze:latest"
environment:
JAVA_TOOL_OPTIONS: "-Xmx512m"
STORAGE: "distributed"
Expand Down
2 changes: 1 addition & 1 deletion .github/openid-auth-test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- "${GITHUB_WORKSPACE}/.github/openid-auth-test/realm.json:/tmp/realm.json"

blaze:
image: "ghcr.io/samply/blaze:sha-${GITHUB_SHA}"
image: "blaze:latest"
environment:
JAVA_TOOL_OPTIONS: "-Xmx2g"
OPENID_PROVIDER_URL: "http://keycloak:8080/auth/realms/blaze"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/evaluate-patient-q1-measure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ evaluate-measure() {
}

BASE="http://localhost:8080/fhir"
FILE="modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q1-query.cql"
FILE="modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/q1.cql"
DATA=$(base64 "$FILE" | tr -d '\n')
LIBRARY_URI=$(uuidgen | tr '[:upper:]' '[:lower:]')
MEASURE_URI=$(uuidgen | tr '[:upper:]' '[:lower:]')
Expand Down
236 changes: 126 additions & 110 deletions .github/workflows/build.yml

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## v0.18.1

### Security

* Update Dependencies ([#817](https://github.com/samply/blaze/pull/817))
* Uninstall wget because of CVE-2021-31879 ([#801](https://github.com/samply/blaze/pull/801))

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

## v0.18.0

### New Features
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM eclipse-temurin:17-jre

RUN apt-get update && apt-get upgrade -y && \
apt-get purge curl libbinutils libctf0 libctf-nobfd0 libncurses6 -y && \
apt-get purge curl wget libbinutils libctf0 libctf-nobfd0 libncurses6 -y && \
apt-get autoremove -y && apt-get clean

RUN mkdir -p /app/data && chown 1001:1001 /app/data
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

[![Build](https://github.com/samply/blaze/actions/workflows/build.yml/badge.svg)](https://github.com/samply/blaze/actions/workflows/build.yml)
[![Docker Pulls](https://img.shields.io/docker/pulls/samply/blaze.svg)](https://hub.docker.com/r/samply/blaze/)
[![codecov](https://codecov.io/gh/samply/blaze/branch/develop/graph/badge.svg)](https://codecov.io/gh/samply/blaze)
[![Code Coverage](https://codecov.io/gh/samply/blaze/branch/develop/graph/badge.svg)](https://codecov.io/gh/samply/blaze)
[![Latest Release](https://img.shields.io/github/v/release/samply/blaze)][5]

A FHIR® Store with internal, fast CQL Evaluation Engine

Expand All @@ -14,7 +15,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.18.0][5]
Latest release: [v0.18.1][5]

## Quick Start

Expand Down Expand Up @@ -72,7 +73,7 @@ Unless required by applicable law or agreed to in writing, software distributed

[3]: <https://cql.hl7.org/tests.html>
[4]: <https://alexanderkiel.gitbook.io/blaze/deployment>
[5]: <https://github.com/samply/blaze/releases/tag/v0.18.0>
[5]: <https://github.com/samply/blaze/releases/tag/v0.18.1>
[6]: <https://www.yourkit.com/java/profiler/>
[7]: <https://www.yourkit.com/.net/profiler/>
[8]: <https://www.yourkit.com/youmonitor/>
Expand Down
6 changes: 3 additions & 3 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{:mvn/version "1.3.6"}

org.slf4j/slf4j-nop
{:mvn/version "2.0.2"}}
{:mvn/version "2.0.3"}}

:aliases
{:depstar
Expand Down Expand Up @@ -80,10 +80,10 @@
:outdated
{:replace-deps
{com.github.liquidz/antq
{:mvn/version "2.1.927"}
{:mvn/version "2.1.932"}

org.slf4j/slf4j-nop
{:mvn/version "2.0.2"}}
{:mvn/version "2.0.3"}}

:main-opts
["-m" "antq.core"
Expand Down
2 changes: 1 addition & 1 deletion dev/blaze/dev.clj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[clojure.repl :refer [pst]]
[clojure.spec.test.alpha :as st]
[clojure.tools.namespace.repl :refer [refresh]]
[java-time :as time]
[java-time.api :as time]
[taoensso.timbre :as log])
(:import
[com.github.benmanes.caffeine.cache Cache]))
Expand Down
2 changes: 1 addition & 1 deletion dev/blaze/dev/tx_log.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(:require
[blaze.core :refer [system]]
[blaze.db.tx-log :as tx-log]
[java-time :as time]))
[java-time.api :as time]))


(def tx-log
Expand Down
2 changes: 1 addition & 1 deletion docs/conformance/cql.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ The section numbers refer to the documentation of the [ELM Specification](https:
| 22.15. | ConvertsToString || | |
| 22.16. | ConvertsToTime || | |
| 22.17. | Descendents || | |
| 22.18. | Is | | | |
| 22.18. | Is | | | |
| 22.19. | ToBoolean || | |
| 22.20. | ToChars || | |
| 22.21. | ToConcept || | |
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.18.0 in 8.2 seconds
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.18.1 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.18.0"
"version": "0.18.1"
}
```

Expand Down
12 changes: 6 additions & 6 deletions docs/deployment/manual-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.18.0). Look for `blaze-0.18.0-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.18.1). Look for `blaze-0.18.1-standalone.jar`.

After the download, you can start blaze with the following command (Linux, macOS):

```sh
java -jar blaze-0.18.0-standalone.jar -m blaze.core
java -jar blaze-0.18.1-standalone.jar -m blaze.core
```

Blaze will run with an in-memory, volatile database for testing and demo purposes.
Expand All @@ -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.18.0-standalone.jar -m blaze.core
STORAGE=standalone java -jar blaze-0.18.1-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.18.0-standalone.jar -m blaze.core
java -jar blaze-0.18.1-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.
Expand All @@ -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.18.0 in 8.2 seconds
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.18.1 in 8.2 seconds
```

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

Expand Down
2 changes: 1 addition & 1 deletion modules/byte-buffer/deps.edn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{:deps
{com.google.protobuf/protobuf-java
{:mvn/version "3.21.6"}}
{:mvn/version "3.21.7"}}

:aliases
{:test
Expand Down
4 changes: 2 additions & 2 deletions modules/byte-string/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{:mvn/version "31.1-jre"}

com.google.protobuf/protobuf-java
{:mvn/version "3.21.6"}
{:mvn/version "3.21.7"}

com.fasterxml.jackson.core/jackson-databind
{:mvn/version "2.13.4"}}}
{:mvn/version "2.13.4.2"}}}
4 changes: 2 additions & 2 deletions modules/cassandra/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@

;; current version of transitive dependency of com.datastax.oss/java-driver-core
com.fasterxml.jackson.core/jackson-databind
{:mvn/version "2.13.4"}
{:mvn/version "2.13.4.2"}

;; current version of transitive dependency of com.datastax.oss/java-driver-core
io.netty/netty-handler
{:mvn/version "4.1.82.Final"}}
{:mvn/version "4.1.84.Final"}}

:aliases
{:test
Expand Down
2 changes: 1 addition & 1 deletion modules/cassandra/src/blaze/cassandra/config.clj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns blaze.cassandra.config
(:require
[clojure.string :as str]
[java-time :as time])
[java-time.api :as time])
(:import
[com.datastax.oss.driver.api.core.config OptionsMap TypedDriverOption]
[java.net InetSocketAddress]))
Expand Down
2 changes: 1 addition & 1 deletion modules/cassandra/test/blaze/cassandra/config_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[blaze.cassandra.config :as config]
[clojure.spec.test.alpha :as st]
[clojure.test :as test :refer [deftest are testing]]
[java-time :as time])
[java-time.api :as time])
(:import
[com.datastax.oss.driver.api.core.config OptionsMap TypedDriverOption]
[java.net InetSocketAddress]))
Expand Down
60 changes: 59 additions & 1 deletion modules/cql/src/blaze/elm/compiler/type_operators.clj
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,65 @@
(->DescendentsOperatorExpression source)))


;; TODO 22.18. Is
;; 22.18. Is
(defrecord IsExpression [operand type pred]
core/Expression
(-eval [_ context resource scope]
(pred (core/-eval operand context resource scope)))
(-form [_]
`(~'is ~type ~(core/-form operand))))


(defn- matches-elm-named-type-is [type-name]
(case type-name
"Boolean" ['elm/boolean boolean?]
"Integer" ['elm/integer int?]
"Long" ['elm/long system/long?]
"Decimal" ['elm/decimal decimal?]
"Date" ['elm/date system/date?]
"DateTime" ['elm/date-time date-time/temporal?]
"Quantity" ['elm/quantity quantity/quantity?]
"String" ['elm/string string?]))


(defn- matches-named-type-is [type-name]
(let [[type-ns type-name] (elm-util/parse-qualified-name type-name)]
(case type-ns
"http://hl7.org/fhir"
[(symbol "fhir" type-name)
(let [fhir-type (keyword "fhir" type-name)]
#(identical? fhir-type (fhir-spec/fhir-type %)))]
"urn:hl7-org:elm-types:r1"
(matches-elm-named-type-is type-name))))


(defn- matches-type-specifier-is [is-type-specifier]
(case (:type is-type-specifier)
"NamedTypeSpecifier"
(matches-named-type-is (:name is-type-specifier))

"ListTypeSpecifier"
(let [[type pred] (matches-type-specifier-is (:elementType is-type-specifier))]
[`(~'list ~type)
(fn matches-type? [x]
(every? pred x))])))


(defn- matches-type-is
[{is-type :isType is-type-specifier :isTypeSpecifier}]
(cond
is-type
(matches-named-type-is is-type)

is-type-specifier
(matches-type-specifier-is is-type-specifier)))


(defmethod core/compile* :elm.compiler.type/is
[context {:keys [operand] :as expression}]
(let [[type pred] (matches-type-is expression)]
(->IsExpression (core/compile* context operand) type pred)))


;; 22.19. ToBoolean
(defunop to-boolean [x]
Expand Down
2 changes: 1 addition & 1 deletion modules/cql/src/blaze/elm/date_time.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[blaze.elm.protocols :as p]
[blaze.fhir.spec.type]
[blaze.fhir.spec.type.system :as system]
[java-time :as time])
[java-time.api :as time])
(:import
[blaze.fhir.spec.type OffsetInstant]
[blaze.fhir.spec.type.system DateTimeYear DateTimeYearMonth DateTimeYearMonthDay]
Expand Down
2 changes: 1 addition & 1 deletion modules/cql/src/blaze/elm/expression_spec.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[blaze.elm.expression :as expr]
[blaze.fhir.spec]
[clojure.spec.alpha :as s]
[java-time :as time]))
[java-time.api :as time]))


(s/def ::now
Expand Down
2 changes: 0 additions & 2 deletions modules/cql/test/blaze/cql_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@
"StringToIntegerError" ; TODO: implement
"StringToDateTime" ; TODO: implement
"StringToTime" ; TODO: implement
"IntegerIsInteger" ; TODO: implement
"StringIsInteger" ; TODO: implement
"StringNoToBoolean" ; TODO: implement
"CodeToConcept1" ; TODO: implement
"ToDateTime4" ; time zones don't match
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,10 @@

(tu/testing-binary-null elm/greater-or-equal #elm/date "2013-06-15"))

(testing "DateTime with mixed precision"
(are [x y] (nil? (tu/compile-binop elm/greater-or-equal elm/date-time x y))
"2005-06-17" "2005"))

(testing "Time"
(are [x y res] (= res (tu/compile-binop elm/greater-or-equal elm/time x y))
"00:00:00" "00:00:00" true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[clojure.test :as test :refer [are deftest is testing]]
[clojure.test.check.properties :as prop]
[cognitect.anomalies :as anom]
[java-time :as time]
[java-time.api :as time]
[juxt.iota :refer [given]])
(:import
[java.time Year YearMonth]
Expand Down
Loading

0 comments on commit 315385a

Please sign in to comment.