From e9a1ddfeac20d9041d5d0232edcd703a0412f55f Mon Sep 17 00:00:00 2001 From: Patrick Werner Date: Wed, 16 Apr 2025 14:54:43 +0200 Subject: [PATCH 1/5] fix: set default value for request_tenant_partitioning_mode to true to support easy default partitioning --- src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java | 2 +- src/main/resources/application.yaml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java index 25ad070..33c9115 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java @@ -855,7 +855,7 @@ public class AppProperties { private Boolean database_partition_mode_enabled = false; private Boolean patient_id_partitioning_mode = false; private Integer default_partition_id = 0; - private boolean request_tenant_partitioning_mode; + private boolean request_tenant_partitioning_mode = true; public boolean isRequest_tenant_partitioning_mode() { return request_tenant_partitioning_mode; diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index a0756d6..3eb0bd9 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -237,6 +237,7 @@ hapi: # allow_references_across_partitions: false # partitioning_include_in_search_hashes: false # conditional_create_duplicate_identifiers_enabled: false + # request_tenant_partitioning_mode: true cors: allow_Credentials: true # These are allowed_origin patterns, see: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/cors/CorsConfiguration.html#setAllowedOriginPatterns-java.util.List- From 0e04931b23a933f3d1f0159b2900437d3bc3b603 Mon Sep 17 00:00:00 2001 From: Patrick Werner Date: Tue, 29 Apr 2025 13:12:13 +0200 Subject: [PATCH 2/5] feat: enhance smoke tests with logging and error highlighting --- .github/workflows/smoke-tests.yml | 65 ++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 18 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 6e76e82..08c5d8b 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -20,22 +20,51 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout project - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: zulu - - name: Build with Maven - run: mvn -B package --file pom.xml -Dmaven.test.skip=true - - name: Docker Pull HTTP client - run: docker pull jetbrains/intellij-http-client - - name: Start server with jetty - run: | - mvn -P jetty spring-boot:run & export JPA_PROCESS=$! - sleep 80 - - name: Execute smoke tests - run: docker run --rm -v $PWD:/workdir --add-host host.docker.internal:host-gateway jetbrains/intellij-http-client -D src/test/smoketest/plain_server.http --env-file src/test/smoketest/http-client.env.json --env default + - name: Checkout project + uses: actions/checkout@v4 - + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: zulu + + - name: Build with Maven + run: mvn -B package --file pom.xml -Dmaven.test.skip=true + + - name: Docker Pull HTTP client + run: docker pull jetbrains/intellij-http-client + + - name: Start server with jetty + run: | + mkdir -p logs + mvn -P jetty spring-boot:run | tee logs/server.log & + sleep 80 + + - name: Execute smoke tests + run: docker run --rm -v $PWD:/workdir --add-host host.docker.internal:host-gateway jetbrains/intellij-http-client -D src/test/smoketest/plain_server.http --env-file src/test/smoketest/http-client.env.json --env default + + - name: Show last server logs + if: always() + run: | + echo "===== Last 200 Lines of Server Log =====" + tail -n 200 logs/server.log || true + + - name: Highlight server errors + if: always() + run: | + echo "===== Highlighted Server Errors =====" + if grep -E 'ERROR|Exception|WARN' logs/server.log > /dev/null; then + grep -E 'ERROR|Exception|WARN' logs/server.log | while read -r line; do + echo "::error::${line}" + done + else + echo "No errors or exceptions found in server logs." + fi + + - name: Upload server logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: server-logs + path: logs/server.log From 81dab90931de32fa3fdd297c9ecaaf46d163d1b8 Mon Sep 17 00:00:00 2001 From: Patrick Werner Date: Tue, 29 Apr 2025 13:18:55 +0200 Subject: [PATCH 3/5] feat: refine error logging in smoke tests to focus on ERROR level --- .github/workflows/smoke-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 08c5d8b..7ba24d0 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -54,12 +54,12 @@ jobs: if: always() run: | echo "===== Highlighted Server Errors =====" - if grep -E 'ERROR|Exception|WARN' logs/server.log > /dev/null; then - grep -E 'ERROR|Exception|WARN' logs/server.log | while read -r line; do + if grep 'ERROR' logs/server.log > /dev/null; then + grep 'ERROR' logs/server.log | while read -r line; do echo "::error::${line}" done else - echo "No errors or exceptions found in server logs." + echo "No errors found in server logs." fi - name: Upload server logs From 10b75b3d83a48187b48b2a81adcebabb54e299d3 Mon Sep 17 00:00:00 2001 From: Patrick Werner Date: Tue, 29 Apr 2025 20:34:34 +0200 Subject: [PATCH 4/5] feat: add support for relaxed query characters in Tomcat configuration (#802) --- src/main/resources/application.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index a0756d6..0947ff0 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -3,6 +3,9 @@ server: # servlet: # context-path: /example/path port: 8080 + tomcat: + # allow | as a separator in the URL + relaxed-query-chars: "|" #Adds the option to go to eg. http://localhost:8080/actuator/health for seeing the running configuration #see https://docs.spring.io/spring-boot/docs/current/reference/html/actuator.html#actuator.endpoints management: From 780127bfd31bc778b05817cc31aba1163c9b8efc Mon Sep 17 00:00:00 2001 From: dotasek Date: Wed, 30 Apr 2025 13:54:25 -0400 Subject: [PATCH 5/5] Bump to revision 2 for release --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3ce5cc2..d7d1141 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 17 - 1 + 2 3.20.0