Skip to content

Commit

Permalink
Merge pull request #901 from samply/release-v0.19.1
Browse files Browse the repository at this point in the history
Release v0.19.1
  • Loading branch information
alexanderkiel committed Feb 10, 2023
2 parents 5a2b8d5 + d44780d commit b3207cc
Show file tree
Hide file tree
Showing 37 changed files with 215 additions and 90 deletions.
11 changes: 10 additions & 1 deletion .github/scripts/wait-for-url.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/bash -e

URL=$1
START_EPOCH="$(date +"%s")"

while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' $URL)" != "200" ]]; do sleep 2; done
eclipsed() {
EPOCH="$(date +"%s")"
echo $((EPOCH - START_EPOCH))
}

# wait at maximum 120 seconds
while [[ ($(eclipsed) -lt 120) && ("$(curl -s -o /dev/null -w ''%{http_code}'' "$URL")" != "200") ]]; do
sleep 2
done
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ jobs:
uses: docker/setup-buildx-action@v2

- name: Build and Export to Docker
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
tags: blaze:latest
Expand Down Expand Up @@ -1305,7 +1305,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
- name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# Changelog

## v0.19.1

### Security

* Update Dependencies ([#898](https://github.com/samply/blaze/pull/898))
* Update Dependencies ([#899](https://github.com/samply/blaze/pull/899))

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

## v0.19.0

### Documentation
### New Features

* Add Evaluate Measure Timeout ([#888](https://github.com/samply/blaze/pull/888))

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update && apt-get upgrade -y && \
rm -rf /var/lib/apt/lists/

RUN mkdir -p /app/data && chown 1001:1001 /app/data
COPY target/blaze-0.19.0-standalone.jar /app/
COPY target/blaze-0.19.1-standalone.jar /app/

WORKDIR /app
USER 1001
Expand All @@ -16,4 +16,4 @@ ENV INDEX_DB_DIR="/app/data/index"
ENV TRANSACTION_DB_DIR="/app/data/transaction"
ENV RESOURCE_DB_DIR="/app/data/resource"

CMD ["java", "-jar", "blaze-0.19.0-standalone.jar"]
CMD ["java", "-jar", "blaze-0.19.1-standalone.jar"]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,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.19.0][5]
Latest release: [v0.19.1][5]

## Quick Start

Expand Down Expand Up @@ -73,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.19.0>
[5]: <https://github.com/samply/blaze/releases/tag/v0.19.1>
[6]: <https://www.yourkit.com/java/profiler/>
[7]: <https://www.yourkit.com/.net/profiler/>
[8]: <https://www.yourkit.com/youmonitor/>
Expand Down
2 changes: 1 addition & 1 deletion build.clj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(:require [clojure.tools.build.api :as b]))

(def lib 'samply/blaze)
(def version "0.19.0")
(def version "0.19.1")
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def uber-file (format "target/%s-%s-standalone.jar" (name lib) version))
Expand Down
4 changes: 2 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{:build
{:deps
{io.github.clojure/tools.build
{:git/tag "v0.9.2" :git/sha "fe6b140"}}
{:git/tag "v0.9.3" :git/sha "e537cd1"}}
:ns-default build}

:test
Expand Down Expand Up @@ -80,7 +80,7 @@
:outdated
{:replace-deps
{com.github.liquidz/antq
{:mvn/version "2.2.970"}
{:mvn/version "2.2.992"}

org.slf4j/slf4j-nop
{:mvn/version "2.0.6"}}
Expand Down
44 changes: 26 additions & 18 deletions docs/conformance/cql.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ The section numbers refer to the documentation of the [ELM Specification](https:
| 5.1. | Library || | |
| 5.2. | IncludeDef | ! | no custom includes, only FHIRHelpers | |
| 5.3. | VersionedIdentifier || | |
| 5.4. | ContextDef || | |


### 6. Data Model

Expand Down Expand Up @@ -87,6 +89,7 @@ The section numbers refer to the documentation of the [ELM Specification](https:
| 9.2. | ExpressionRef | ! | only inside same library | |
| 9.3. | FunctionDef || | |
| 9.4. | FunctionRef | ! | hard coded implementation of some functions | |
| 9.5. | OperandRef || | |

### 10. Queries

Expand All @@ -98,19 +101,22 @@ The section numbers refer to the documentation of the [ELM Specification](https:
| 10.4. | ByColumn || | |
| 10.5. | ByDirection || | |
| 10.6. | ByExpression || | |
| 10.7. | LetClause || | |
| 10.8. | QueryLetRef || | |
| 10.9. | RelationshipClause || | |
| 10.10. | ReturnClause | ! | always distinct | |
| 10.11. | SortClause || | |
| 10.12. | With | ! | only equiv version | |
| 10.13. | Without || | |
| 10.7. | IdentifierRef || | |
| 10.8. | LetClause || | |
| 10.9. | QueryLetRef || | |
| 10.10. | RelationshipClause || | |
| 10.11. | ReturnClause | ! | always distinct | |
| 10.12. | AggregateClause || | |
| 10.13. | SortClause || | |
| 10.14. | With | ! | only equiv version | |
| 10.15. | Without || | |

### 11. External Data

| Num | Group | Expression | State | Notes |
|-------|----------|------------|----------------|-------|
| 11.1. | Retrieve | ! | no date ranges | |
| Num | Group | Expression | State | Notes |
|-------|----------------|------------|----------------|-------|
| 11.1. | Retrieve | ! | no date ranges | |
| 11.2. | IncludeElement || | |

### 12. Comparison Operators

Expand Down Expand Up @@ -176,7 +182,7 @@ The section numbers refer to the documentation of the [ELM Specification](https:
| 16.19. | Round ||
| 16.20. | Subtract ||
| 16.21. | Successor ||
| 16.12. | Truncate ||
| 16.22. | Truncate ||
| 16.23. | TruncatedDivide ||

### 17. String Operators
Expand Down Expand Up @@ -260,10 +266,11 @@ The section numbers refer to the documentation of the [ELM Specification](https:
| 19.25. | ProperIn ||
| 19.26. | ProperIncludes ||
| 19.27. | ProperIncludedIn ||
| 19.28. | Start ||
| 19.29. | Starts ||
| 19.28. | Size ||
| 19.29. | Start ||
| 19.30. | Starts ||
| 19.31. | Union ||
| 19.31. | Width ||
| 19.32. | Width ||

### 20. List Operators

Expand Down Expand Up @@ -296,7 +303,7 @@ The section numbers refer to the documentation of the [ELM Specification](https:
| 20.25. | SingletonFrom || | |
| 20.26. | Slice || | |
| 20.27. | Sort || | |
| 20.28. | Times | | | |
| 20.28. | Times | | | |
| 20.29. | Union || | |

### 21. Aggregate Operators
Expand Down Expand Up @@ -367,9 +374,10 @@ The section numbers refer to the documentation of the [ELM Specification](https:
| 23.6. | Equivalent ||
| 23.7. | InCodeSystem ||
| 23.8. | InValueSet ||
| 23.9. | Not Equal ||
| 23.10. | SubsumedBy ||
| 23.11. | Subsumes ||
| 23.9. | ExpandValueSet ||
| 23.10. | Not Equal ||
| 23.11. | SubsumedBy ||
| 23.12. | Subsumes ||

### 24. Errors and Messages

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.19.0 in 8.2 seconds
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.19.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.19.0"
"version": "0.19.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.19.0). Look for `blaze-0.19.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.19.1). Look for `blaze-0.19.1-standalone.jar`.

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

```sh
java -jar blaze-0.19.0-standalone.jar
java -jar blaze-0.19.1-standalone.jar
```

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.19.0-standalone.jar
STORAGE=standalone java -jar blaze-0.19.1-standalone.jar
```

Under Windows, you need to set the Environment variables in the PowerShell before starting Blaze:

```powershell
$Env:STORAGE="standalone"
java -jar blaze-0.19.0-standalone.jar
java -jar blaze-0.19.1-standalone.jar
```

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.19.0 in 8.2 seconds
2021-06-27T11:02:37.836Z ee086ef908c1 main INFO [blaze.core:67] - Successfully started Blaze version 0.19.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.19.0"
"version": "0.19.1"
}
```

Expand Down
2 changes: 1 addition & 1 deletion modules/byte-string/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
{:mvn/version "3.21.12"}

com.fasterxml.jackson.core/jackson-databind
{:mvn/version "2.14.1"}}}
{:mvn/version "2.14.2"}}}
2 changes: 1 addition & 1 deletion modules/cassandra/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

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

;; current version of transitive dependency of com.datastax.oss/java-driver-core
io.netty/netty-handler
Expand Down
12 changes: 6 additions & 6 deletions modules/cql/deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,23 @@
{:local/root "../db"}

com.fasterxml.jackson.module/jackson-module-jaxb-annotations
{:mvn/version "2.14.1"}
{:mvn/version "2.14.2"}

com.fasterxml.jackson.dataformat/jackson-dataformat-xml
{:mvn/version "2.14.1"}
{:mvn/version "2.14.2"}

info.cqframework/cql-to-elm
{:mvn/version "2.4.0"
{:mvn/version "2.5.0"
:exclusions [xpp3/xpp3_xpath]}

info.cqframework/elm-jackson
{:mvn/version "2.4.0"}
{:mvn/version "2.5.0"}

info.cqframework/model-jackson
{:mvn/version "2.4.0"}
{:mvn/version "2.5.0"}

info.cqframework/quick
{:mvn/version "2.4.0"}
{:mvn/version "2.5.0"}

org.apache.commons/commons-text
{:mvn/version "1.10.0"}
Expand Down
2 changes: 1 addition & 1 deletion modules/cql/src/blaze/cql_translator_spec.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@


(s/fdef cql-translator/translate
:args (s/cat :cql string? :opts (s/* some?))
:args (s/cat :cql string?)
:ret (s/or :library :elm/library :anomaly ::anom/anomaly))
11 changes: 10 additions & 1 deletion modules/cql/src/blaze/elm/compiler/list_operators.clj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[blaze.anomaly :as ba]
[blaze.coll.core :as coll]
[blaze.elm.compiler.core :as core]
[blaze.elm.compiler.macros :refer [defunop]]
[blaze.elm.compiler.macros :refer [defbinop defunop]]
[blaze.elm.compiler.queries :as queries]
[blaze.elm.protocols :as p]
[cognitect.anomalies :as anom])
Expand Down Expand Up @@ -220,3 +220,12 @@
(->SortByDirectionExpression source (queries/comparator direction))))
source
sort-by-items)))


;; 20.28. Times
(defbinop times [list1 list2]
(transduce
(mapcat #(eduction (map (partial merge %)) list1))
(completing (fnil conj []))
nil
list2))
11 changes: 0 additions & 11 deletions modules/cql/src/blaze/elm/compiler/queries.clj
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,6 @@


;; 10.1. Query
;;
;; The Query operator represents a clause-based query. The result of the query
;; is determined by the type of sources included, as well as the clauses used in
;; the query.
(defmulti compile-sort-by-item (fn [_ {:keys [type]}] type))


Expand Down Expand Up @@ -304,9 +300,6 @@


;; 10.3. AliasRef
;;
;; The AliasRef expression allows for the reference of a specific source within
;; the context of a query.
(defrecord AliasRefExpression [key]
core/Expression
(-eval [_ _ _ scopes]
Expand All @@ -327,10 +320,6 @@


;; 10.14. With
;;
;; The With clause restricts the elements of a given source to only those
;; elements that have elements in the related source that satisfy the suchThat
;; condition. This operation is known as a semi-join in database languages.
(defn- find-operand-with-alias
"Finds the operand in `expression` that accesses entities with `alias`."
[operands alias]
Expand Down
4 changes: 4 additions & 0 deletions modules/cql/src/blaze/elm/normalizer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@
(derive :elm.normalizer.type/singleton-from :elm.normalizer.type/unary-expression)


;; 20.28. Times
(derive :elm.normalizer.type/times :elm.normalizer.type/binary-expression)



;; 22. Type Operators

Expand Down
Loading

0 comments on commit b3207cc

Please sign in to comment.