Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v6.0.0 alpha.5 #396

Merged
merged 45 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
68c438d
No issue - bump version
michael-82 Sep 4, 2024
d4d951f
Bump sq2cql and ontology version
juliangruendner Sep 8, 2024
eaf2e81
Merge branch 'develop' of https://github.com/medizininformatik-initia…
juliangruendner Sep 8, 2024
ca4560a
#288 - Load availability files from file(s) (#364)
juliangruendner Sep 19, 2024
4d6cb2e
#367 - Sort unavailable criteria to the bottom
michael-82 Sep 19, 2024
b9ca514
Merge pull request #368 from medizininformatik-initiative/feature/367…
juliangruendner Sep 19, 2024
e74bb62
#366 - Builtin swagger doc is broken
michael-82 Sep 20, 2024
81c6b7f
Merge pull request #369 from medizininformatik-initiative/bugfix/366-…
michael-82 Sep 20, 2024
a8e9e9f
#370 - Update fhir-resources dependency
michael-82 Sep 20, 2024
eff7311
Merge pull request #372 from medizininformatik-initiative/feature/370…
michael-82 Sep 20, 2024
bf33d36
#371 - Update spring boot to 3.3.4
michael-82 Sep 20, 2024
39251cd
Merge pull request #373 from medizininformatik-initiative/feature/371…
michael-82 Sep 20, 2024
103575a
#363 - Add "results" to GET query/{queryId} response
michael-82 Sep 23, 2024
19476e2
Merge pull request #375 from medizininformatik-initiative/feature/363…
michael-82 Sep 23, 2024
4e44306
#376 - Allow Empty Search with filters (#377)
michael-82 Sep 26, 2024
4d0cba3
bump ontology version
juliangruendner Sep 27, 2024
bbc408f
No issue - update undertow to 2.3.17.Final to fix CVE-2024-7885
michael-82 Oct 17, 2024
e915994
#380 - Change structure of dse profile_tree and profile details for t…
michael-82 Oct 17, 2024
4822a4b
Bump ontology version to v3.0.0-alpha and add ne aliases to sq2cql co…
juliangruendner Oct 20, 2024
a07576d
Release v6.0.0-alpha.3
juliangruendner Oct 20, 2024
c29091a
new dev
juliangruendner Oct 20, 2024
7a81789
No issue - update spring boot to 3.3.5 and remove version override fo…
michael-82 Oct 25, 2024
4558da6
No issue - update testcontainers-keycloak dependency
michael-82 Oct 28, 2024
e292855
#341 - Add elastic search to github integration tests
michael-82 Oct 28, 2024
d869573
Merge pull request #385 from medizininformatik-initiative/feature/341…
michael-82 Oct 29, 2024
98117c9
#386 - Fix trivy build error
michael-82 Nov 1, 2024
fab851c
Merge pull request #387 from medizininformatik-initiative/bugfix/386-…
michael-82 Nov 1, 2024
717bf64
#215 - Use wagon-maven-plugin for Ontology Download
michael-82 Oct 27, 2023
4f7886c
Merge pull request #388 from medizininformatik-initiative/feature/215…
michael-82 Nov 4, 2024
bf81366
#389 - Add recommended and required to dse field
michael-82 Nov 5, 2024
cf97970
Merge pull request #390 from medizininformatik-initiative/feature/389…
michael-82 Nov 6, 2024
a66398a
switch to own es init container
juliangruendner Nov 7, 2024
955c7a7
Add fields object to dse profile tree
juliangruendner Nov 11, 2024
5fd18c7
Change DSE profile tree field info to list of values
juliangruendner Nov 11, 2024
78d964c
bump ontology version
juliangruendner Nov 11, 2024
87f0366
#391 - Ignore termcode version during query validation (#392)
michael-82 Nov 12, 2024
9543b05
Update HAPI Dependencies
EmteZogaf Nov 12, 2024
bce7fc1
Merge pull request #393 from medizininformatik-initiative/update-hapi…
michael-82 Nov 12, 2024
287b949
Add fdpg combined consent to cql aliases
juliangruendner Nov 12, 2024
cb6269a
#394 - Update dependencies (#395)
michael-82 Nov 13, 2024
42a1f4d
bump ontology version and revert back to psql 16
juliangruendner Nov 13, 2024
cd878b2
#237 - Minor suggestions to improve the container image
michael-82 Nov 14, 2023
e62623d
Merge pull request #238 from medizininformatik-initiative/feature/237…
michael-82 Nov 14, 2024
4bea38f
Release 6.0.0-alpha.5
michael-82 Nov 14, 2024
8c5ce2b
Merge branch 'master' into release/v6.0.0-alpha.5
michael-82 Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/integration-test/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
depends_on:
- dataportal-postgres
environment:
JAVA_OPTS: ""
QUERYRESULT_PUBLIC_KEY: "MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEA1lWOfXzE/mUEPitNLxsDMtjERJGVhS8gP1WmuHPvjPxUOQyod4EbJcbJlkBqLqpaIs8Buy3gcbJvIPERdG1N1BSZ8NOKOtRubioKf30JwnLdZAae3vJAzRC3h42OPM3fohZCXMxbrju+KM0ZUIrLEXKEDMHQWfevCQCxeixvXVYpfXlkJIBGaWz4cDgEOiiwhU87AMzGZwjAIHvr4oTF/uHg6+C3Mdx0m8WLtygTiEixJegMb/txR+4gNVYrzpm5BwDUU7Qxy3nTUDYZLlTGeP9MBFWW+W87IHzgP+OFr3ZKMEkAPU0R1lqXFZCYcgZHGA5He2W701isnqkKIQT8ePOH43ZOXo3S34Pqw5oQ4Q2kPubp1wgZWw0VtEiZDtlwqUJ+r3CigU7NAFM5JnC/skiIBKetbWoNm1JPEfGOTrgjHD2uo82jSO8tV45LNH1EaR2+5UWSFZyDvTayLZsxsVlRFXJKgQJDI344R6lhGbLXbhqCuPzeQaHr1XGCKAtdAgMBAAE="
# ----- app
QUERY_VALIDATION_ENABLED: "true"
Expand All @@ -16,7 +17,6 @@ services:
API_BASE_URL: "http://localhost:8091/api/"
ALLOWED_ORIGINS: "https://localhost"
QUERYRESULT_EXPIRY_MINUTES: 5
ELASTIC_SEARCH_ENABLED: "false"
# ---- db config
DATABASE_HOST: "dataportal-postgres"
DATABASE_PORT: 5432
Expand Down Expand Up @@ -60,6 +60,10 @@ services:
PRIVACY_QUOTA_READ_DETAILED_OBFUSCATED_INTERVALSECONDS: 7200
PRIVACY_THRESHOLD_RESULTS: 0
PRIVACY_THRESHOLD_SITES: 0
# ---- Elastic Search
ELASTIC_SEARCH_ENABLED: true
ELASTIC_SEARCH_HOST: dataportal-elastic:9200
ELASTIC_SEARCH_FILTER: context,terminology,kds_module
# ---- logging
LOG_LEVEL_SQL: "warn"
LOG_LEVEL: "warn"
Expand All @@ -82,8 +86,26 @@ services:
POSTGRES_PASSWORD: "dataportalpw"
POSTGRES_DB: "dataportal"

dataportal-elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:8.16.0
container_name: dataportal-elastic
ports:
- '9200:9200'
- '9300:9300'
healthcheck:
test: [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1" ]
interval: 30s
timeout: 30s
retries: 3
environment:
discovery.type: single-node
ES_JAVA_OPTS: -Xmx512m -Xms512m
node.name: es01
cluster.name: elasticsearch
xpack.security.enabled: false

blaze:
image: "samply/blaze:0.29"
image: "samply/blaze:0.30"
environment:
BASE_URL: "http://blaze:8080"
JAVA_TOOL_OPTIONS: "-Xmx1g"
Expand All @@ -94,7 +116,7 @@ services:
- "blaze-data:/app/data"

flare:
image: ghcr.io/medizininformatik-initiative/flare:2.2.0
image: ghcr.io/medizininformatik-initiative/flare:2.3.0
ports:
- "8092:8080"
environment:
Expand Down Expand Up @@ -138,4 +160,4 @@ services:

volumes:
dataportal-auth-db:
blaze-data:
blaze-data:
10 changes: 0 additions & 10 deletions .github/scripts/check-if-running-as-dataportal-user.sh

This file was deleted.

10 changes: 10 additions & 0 deletions .github/scripts/check-if-running-as-user-10001.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

if docker exec -u0 dataportal-backend pgrep -u 10001 java > /dev/null
then
echo "Java process is running as user 10001"
exit 0
else
echo "Java process is not running as user 10001"
exit 1
fi
2 changes: 1 addition & 1 deletion .github/scripts/download-and-unpack-ontology.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash -e

mkdir --parents .github/integration-test/ontology/ui_profiles .github/integration-test/ontology/migration
curl -L https://github.com/medizininformatik-initiative/fhir-ontology-generator/raw/v3.0.0-test.1/example/fdpg-ontology/backend.zip -o .github/integration-test/ontology/backend.zip
curl -L https://github.com/medizininformatik-initiative/fhir-ontology-generator/raw/${ONTOLOGY_GIT_TAG}/example/fdpg-ontology/backend.zip -o .github/integration-test/ontology/backend.zip
unzip -jod .github/integration-test/ontology/ui_profiles/ .github/integration-test/ontology/backend.zip
mv .github/integration-test/ontology/ui_profiles/R__Load_latest_ui_profile.sql .github/integration-test/ontology/migration/
rm .github/integration-test/ontology/backend.zip
26 changes: 9 additions & 17 deletions elastic-init.sh → .github/scripts/init-elasticsearch.sh
Original file line number Diff line number Diff line change
@@ -1,49 +1,41 @@
#!/bin/sh
#!/bin/bash -e

# Wait for Elasticsearch to start up before doing anything
until curl -X GET "$ELASTIC_HOST/_cluster/health" | grep -q '"status":"green"\|"status":"yellow"'; do
echo "Waiting for Elasticsearch..."
sleep 5
done

ABSOLUTE_FILEPATH="${ELASTIC_FILEPATH//TAGPLACEHOLDER/$ELASTIC_GIT_TAG}$ELASTIC_FILENAME"
ABSOLUTE_FILEPATH="${ELASTIC_FILEPATH//TAGPLACEHOLDER/$ONTOLOGY_GIT_TAG}$ELASTIC_FILENAME"
echo "Downloading $ABSOLUTE_FILEPATH"
response_onto_dl=$(curl --write-out "%{http_code}" -sLO "$ABSOLUTE_FILEPATH")

if [ "$response_onto_dl" -ne 200 ]; then
echo "Could not download ontology file. Maybe the tag $ELASTIC_GIT_TAG does not exist? Error code was $response_onto_dl"
echo "Could not download ontology file. Maybe the tag $ONTOLOGY_GIT_TAG does not exist? Error code was $response_onto_dl"
exit 1
fi

unzip -o "$ELASTIC_FILENAME"

if [ "$OVERRIDE_EXISTING" = "true" ]; then
echo "(Trying to) delete existing indices"
curl -s -DELETE "$ELASTIC_HOST/ontology"
curl -s -DELETE "$ELASTIC_HOST/codeable_concept"
fi
echo "(Trying to) delete existing indices"
curl --request DELETE "$ELASTIC_HOST/ontology"
curl --request DELETE "$ELASTIC_HOST/codeable_concept"

echo "Creating ontology index..."
response_onto=$(curl --write-out "%{http_code}" -s --output /dev/null -XPUT -H 'Content-Type: application/json' "$ELASTIC_HOST/ontology" -d @elastic/ontology_index.json)
echo "Creating codeable concept index..."
response_cc=$(curl --write-out "%{http_code}" -s --output /dev/null -XPUT -H 'Content-Type: application/json' "$ELASTIC_HOST/codeable_concept" -d @elastic/codeable_concept_index.json)
echo "Done"
echo "Done."

for FILE in elastic/*; do
if [ -f "$FILE" ]; then
BASENAME=$(basename "$FILE")
if [[ $BASENAME == onto_es__ontology* && $BASENAME == *.json ]]; then
if [[ "$response_onto" -eq 200 || "$OVERRIDE_EXISTING" = "true" ]]; then
echo "Uploading $BASENAME"
curl -s --output /dev/null -XPOST -H 'Content-Type: application/json' --data-binary @"$FILE" "$ELASTIC_HOST/ontology/_bulk?pretty"
curl -s --output /dev/null -XPOST -H 'Content-Type: application/json' --data-binary @"$FILE" "$ELASTIC_HOST/ontology/_bulk"
else
echo "Skipping $BASENAME because index was already existing. Set OVERRIDE_EXISTING to true to force creating a new index"
fi
fi
if [[ $BASENAME == onto_es__codeable_concept* && $BASENAME == *.json ]]; then
if [[ "$response_cc" -eq 200 || "$OVERRIDE_EXISTING" = "true" ]]; then
echo "Uploading $BASENAME"
curl -s --output /dev/null -XPOST -H 'Content-Type: application/json' --data-binary @"$FILE" "$ELASTIC_HOST/codeable_concept/_bulk?pretty"
curl -s --output /dev/null -XPOST -H 'Content-Type: application/json' --data-binary @"$FILE" "$ELASTIC_HOST/codeable_concept/_bulk"
else
echo "Skipping $BASENAME because index was already existing. Set OVERRIDE_EXISTING to true to force creating a new index"
fi
Expand Down
96 changes: 96 additions & 0 deletions .github/scripts/post-elastic-test-queries.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#!/bin/bash -e

curl "$ELASTIC_HOST/_cat/indices"

response=$(curl -s -w "%{http_code}" -o response_body "$ELASTIC_HOST/ontology/_doc/9c2328b0-ac4e-3d69-8f2f-d8b905875348")
http_code="${response: -3}"
json_body=$(cat response_body)

if [ "$http_code" -eq 200 ]; then
if echo "$json_body" | jq '.found == true' | grep -q true; then
echo "Ontology Document found in elastic search"
else
echo "Empty or nonexistent response from elastic search"
exit 1
fi
else
echo "Response code $http_code"
exit 1
fi


response=$(curl -s -w "%{http_code}" -o response_body "$ELASTIC_HOST/codeable_concept/_doc/d676be36-7f34-3ea6-9838-c0c9e1ca3dcc")
http_code="${response: -3}"
json_body=$(cat response_body)

if [ "$http_code" -eq 200 ]; then
if echo "$json_body" | jq '.found == true' | grep -q true; then
echo "Codeable Concept Document found in elastic search"
else
echo "Empty or nonexistent response from elastic search"
exit 1
fi
else
echo "Response code $http_code"
exit 1
fi

access_token="$(curl -s --request POST \
--url http://localhost:8083/auth/realms/dataportal/protocol/openid-connect/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=password \
--data client_id=dataportal-webapp \
--data username=testuser \
--data password=testpassword \
--data scope=openid | jq '.access_token' | tr -d '"')"

response=$(curl -s -w "%{http_code}" --header "Authorization: Bearer $access_token" -o response_body "http://localhost:8091/api/v4/terminology/entry/search?searchterm=Blutdruck")
http_code="${response: -3}"
json_body=$(cat response_body)

if [ "$http_code" -eq 200 ]; then
if echo "$json_body" | jq '.totalHits > 0' | grep -q true; then
echo "OK response with non-empty array"
else
echo "Empty or nonexistent response"
exit 1
fi
else
echo "Response code $http_code"
exit 1
fi

response=$(curl -s -w "%{http_code}" --header "Authorization: Bearer $access_token" -o response_body "http://localhost:8091/api/v4/codeable-concept/entry/search?searchterm=Vectorcardiogram")
http_code="${response: -3}"
json_body=$(cat response_body)

if [ "$http_code" -eq 200 ]; then
if echo "$json_body" | jq '.totalHits > 0' | grep -q true; then
echo "OK response with non-empty array"
else
echo "Empty or nonexistent response"
exit 1
fi
else
echo "Response code $http_code"
exit 1
fi

response=$(curl -s -w "%{http_code}" --header "Authorization: Bearer $access_token" -o response_body "http://localhost:8091/api/v4/codeable-concept/entry/d676be36-7f34-3ea6-9838-c0c9e1ca3dcc")
http_code="${response: -3}"
json_body=$(cat response_body)

if [ "$http_code" -eq 200 ]; then
if echo "$json_body" | jq -e '.code and .code != ""' | grep -q true; then
echo "OK response with non-empty array"
else
echo "Empty or nonexistent response"
exit 1
fi
else
echo "Response code $http_code"
exit 1
fi

echo "All elastic search tests completed"
exit 0
Loading