diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 6e76e82..7ba24d0 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 '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 found in server logs." + fi + + - name: Upload server logs + if: always() + uses: actions/upload-artifact@v4 + with: + name: server-logs + path: logs/server.log 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 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 504d4fc..0095b53 100644 --- a/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java +++ b/src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java @@ -865,7 +865,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 5827556..e81556e 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: @@ -237,6 +240,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-