Skip to content

Commit

Permalink
Merge pull request #231 from medizininformatik-initiative/release-v2.4.0
Browse files Browse the repository at this point in the history
Release v2.4.0
  • Loading branch information
alexanderkiel authored Nov 20, 2024
2 parents d4a2c59 + fe4b78a commit 686f48a
Show file tree
Hide file tree
Showing 40 changed files with 884 additions and 520 deletions.
4 changes: 2 additions & 2 deletions .github/integration-test/basic-auth/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
data-store:
image: "samply/blaze:0.28"
image: "samply/blaze:0.30"
healthcheck:
test: ["CMD-SHELL", "curl --fail -s http://localhost:8080/health"]
interval: "5s"
Expand Down Expand Up @@ -37,7 +37,7 @@ services:
depends_on:
- data-store
proxy:
image: "nginx:1.27.0"
image: "nginx:1.27.2"
volumes:
- "./nginx.conf:/etc/nginx/nginx.conf"
- "./proxy.htpasswd:/etc/auth/.htpasswd"
Expand Down
40 changes: 40 additions & 0 deletions .github/integration-test/no-auth-cohort-enabled/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
services:
data-store:
image: "samply/blaze:0.30"
healthcheck:
test: ["CMD-SHELL", "curl --fail -s http://localhost:8080/health"]
interval: "5s"
timeout: "5s"
retries: "3"
start_period: "60s"
environment:
BASE_URL: "http://data-store:8080"
JAVA_TOOL_OPTIONS: "-Xmx1g"
LOG_LEVEL: "debug"
ports:
- "8082:8080"
volumes:
- "data-store-data:/app/data"
flare:
image: "flare:latest"
healthcheck:
test: ["CMD-SHELL", "curl --fail -s http://localhost:8080/cache/stats"]
interval: "5s"
timeout: "5s"
retries: "3"
start_period: "60s"
environment:
JAVA_TOOL_OPTIONS: "-Xmx1g"
FLARE_FHIR_SERVER: "http://data-store:8080/fhir"
LOG_LEVEL: "debug"
FLARE_ENABLE_COHORT_ENDPOINT: true
ports:
- "8080:8080"
volumes:
- "flare-cache:/app/cache"
- "../synthea-test-mapping:/app/ontology"
depends_on:
- data-store
volumes:
data-store-data:
flare-cache:
5 changes: 5 additions & 0 deletions .github/integration-test/no-auth-cohort-enabled/load-data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"

blazectl --no-progress --server http://localhost:8082/fhir upload "$SCRIPT_DIR/../../test-data/synthea"
2 changes: 1 addition & 1 deletion .github/integration-test/no-auth/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
data-store:
image: "samply/blaze:0.28"
image: "samply/blaze:0.30"
healthcheck:
test: ["CMD-SHELL", "curl --fail -s http://localhost:8080/health"]
interval: "5s"
Expand Down
20 changes: 10 additions & 10 deletions .github/integration-test/oauth/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ services:
generate-cert:
condition: service_completed_successfully
keycloak:
image: "keycloak/keycloak:24.0.5"
image: "keycloak/keycloak:25.0.6"
command: ["start", "--import-realm"]
healthcheck:
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/8080;echo -e \"GET /health/ready HTTP/1.1\r\nhost: localhost\r\nConnection: close\r\n\r\n\" >&3;grep \"HTTP/1.1 200 OK\" <&3"]
test: ["CMD-SHELL", "exec 3<>/dev/tcp/127.0.0.1/9000;echo -e \"GET /health/ready HTTP/1.1\r\nhost: localhost\r\nConnection: close\r\n\r\n\" >&3;grep \"HTTP/1.1 200 OK\" <&3"]
interval: "5s"
timeout: "5s"
retries: "3"
retries: 3
start_period: "30s"
networks:
test-oauth:
environment:
KC_HOSTNAME_URL: "https://secure-keycloak:8443"
KC_HOSTNAME_ADMIN_URL: "https://secure-keycloak:8443"
KC_HOSTNAME: "https://secure-keycloak:8443"
KC_HOSTNAME_ADMIN: "https://secure-keycloak:8443"
KC_HTTP_RELATIVE_PATH: "/"
KC_PROXY_HEADERS: "xforwarded"
KC_HTTP_ENABLED: "true"
Expand All @@ -50,12 +50,12 @@ services:
volumes:
- "./realm-test.json:/opt/keycloak/data/import/realm-test.json"
proxy:
image: "nginx:1.27.0"
image: "nginx:1.27.2"
healthcheck:
test: ["CMD-SHELL", "curl --fail -s http://localhost:8080"]
interval: "5s"
timeout: "5s"
retries: "3"
retries: 3
start_period: "5s"
networks:
test-oauth:
Expand All @@ -72,12 +72,12 @@ services:
keycloak:
condition: service_healthy
data-store:
image: "samply/blaze:0.28"
image: "samply/blaze:0.30"
healthcheck:
test: ["CMD-SHELL", "curl --fail -s http://localhost:8080/health"]
interval: "5s"
timeout: "5s"
retries: "3"
retries: 3
start_period: "60s"
networks:
test-oauth:
Expand Down Expand Up @@ -106,7 +106,7 @@ services:
test: ["CMD-SHELL", "curl --fail -s http://localhost:8080/cache/stats"]
interval: "5s"
timeout: "5s"
retries: "3"
retries: 3
start_period: "60s"
networks:
test-oauth:
Expand Down
Binary file modified .github/integration-test/synthea-test-mapping/mapping.zip
Binary file not shown.
15 changes: 15 additions & 0 deletions .github/scripts/execute-cohort-query-enabled.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
. "$SCRIPT_DIR/util.sh"

BASE="http://localhost:8080"
EXPECTED_ARRAY_LENGTH=$2
EXPECTED_ID_LENGTH=$3
CURL_RESPONSE=$(curl -s "$BASE/query/execute-cohort" -H "Content-Type: application/sq+json" -d @"$SCRIPT_DIR/../integration-test/query-$1.json")

ACTUAL_PAT_ID_ARRAY_LENGTH=$(echo "$CURL_RESPONSE" | jq '. | length')
ACTUAL_PAT_ID_ARRAY_ID_LENGTH=$(echo "$CURL_RESPONSE" | jq '.[] | length' | uniq)

test "cohort length" $ACTUAL_PAT_ID_ARRAY_LENGTH $EXPECTED_ARRAY_LENGTH
test "cohort id length" $ACTUAL_PAT_ID_ARRAY_ID_LENGTH $EXPECTED_ID_LENGTH
10 changes: 10 additions & 0 deletions .github/scripts/execute-cohort-query-not-enabled.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
. "$SCRIPT_DIR/util.sh"

BASE="http://localhost:8080"
STATUS_CODE=$(curl -s -o /dev/null -w "%{http_code}" "$BASE/query/execute-cohort" -H "Content-Type: application/sq+json" -d @"$SCRIPT_DIR/../integration-test/query-$1.json")
EXPECTED_STATUS_CODE=404

test "cohort endpoint status code" "$STATUS_CODE" $EXPECTED_STATUS_CODE
38 changes: 25 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ name: Build
on:
push:
branches:
- main
- develop
- main
- develop
tags:
- 'v*.*.*'
- 'v*.*.*'
pull_request:
branches:
- main
- develop
- main
- develop
schedule:
- cron: '0 1 * * *'
- cron: '0 1 * * *'

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Build and Export to Docker
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
tags: flare:latest
Expand All @@ -71,7 +71,7 @@ jobs:

image-scan:
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Download Flare Image
Expand All @@ -94,6 +94,9 @@ jobs:
output: trivy-results.sarif
severity: 'CRITICAL,HIGH'
timeout: '15m0s'
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1

- name: Upload Trivy Scan Results to GitHub Security Tab
uses: github/codeql-action/upload-sarif@v3
Expand All @@ -102,7 +105,7 @@ jobs:

integration-test-default-config:
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Check out Git repository
Expand Down Expand Up @@ -131,7 +134,8 @@ jobs:
- no-auth
- basic-auth
- oauth
runs-on: ubuntu-22.04
- no-auth-cohort-enabled
runs-on: ubuntu-24.04

steps:
- name: Check out Git repository
Expand All @@ -158,13 +162,21 @@ jobs:
- name: Query for Viral sinusitis (disorder)
run: .github/scripts/execute-query.sh 444814009 69

- name: Query for Viral sinusitis (disorder) cohort not enabled
if: ${{ matrix.test == 'no-auth' }}
run: .github/scripts/execute-cohort-query-not-enabled.sh 444814009

- name: Query for Viral sinusitis (disorder) cohort enabled
if: ${{ matrix.test == 'no-auth-cohort-enabled' }}
run: .github/scripts/execute-cohort-query-enabled.sh 444814009 69 16

push-image:
needs:
- build
- integration-test-default-config
- integration-test
- image-scan
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: ${{ ! startsWith(github.head_ref, 'dependabot/')}}

steps:
Expand Down Expand Up @@ -222,7 +234,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.mvn
.idea/
cache
target
/ontology/mapping.zip
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
# Changelog

## v2.4.0

### Enhancements

* Updated ontology to v3.0.0
* Add Feature Toggle for the Cohort Endpoint ([#217](https://github.com/medizininformatik-initiative/flare/pull/217))
* Update mapping_tree creation ([#191](https://github.com/medizininformatik-initiative/flare/issues/191))
* Add cohort extraction endpoint ([#178](https://github.com/medizininformatik-initiative/flare/issues/178))
* docker-compose.yml should be for flare instead of blaze ([#184](https://github.com/medizininformatik-initiative/flare/issues/184))

The full changelog can be found [here](https://github.com/medizininformatik-initiative/flare/milestone/15?closed=1).

## v2.4.0-alpha.3

### Enhancements

* Add Feature Toggle for the Cohort Endpoint ([#217](https://github.com/medizininformatik-initiative/flare/pull/217))
* Updated ontology to v3.0.0-alpha.1

## v2.4.0-alpha.2

### Enhancements

* Updated ontology to v3.0.0-alpha

## v2.4.0-alpha.1

### Enhancements

* Update mapping_tree creation ([#191](https://github.com/medizininformatik-initiative/flare/issues/191))
* Add cohort extraction endpoint ([#178](https://github.com/medizininformatik-initiative/flare/issues/178))
* docker-compose.yml should be for flare instead of blaze ([#184](https://github.com/medizininformatik-initiative/flare/issues/184))

## v2.3.0

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:21.0.3_9-jre
FROM eclipse-temurin:21.0.5_11-jre

RUN apt-get update && apt-get upgrade -y && \
apt-get purge wget libbinutils libctf0 libctf-nobfd0 libncurses6 -y && \
Expand Down
Loading

0 comments on commit 686f48a

Please sign in to comment.