From 8a149fde280ae2c06c55292c90e18db987661a36 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 05:47:32 -0700 Subject: [PATCH 1/3] chore(deps): update all non-major dependencies (#413) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- backend/.mvn/wrapper/maven-wrapper.properties | 3 ++- backend/mvnw | 17 +++++++++++++---- backend/mvnw.cmd | 5 ++++- frontend/Dockerfile | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/backend/.mvn/wrapper/maven-wrapper.properties b/backend/.mvn/wrapper/maven-wrapper.properties index 443d8849..d58dfb70 100644 --- a/backend/.mvn/wrapper/maven-wrapper.properties +++ b/backend/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -wrapperVersion=3.3.1 +wrapperVersion=3.3.2 +distributionType=only-script distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/backend/mvnw b/backend/mvnw index ac8e247e..19529ddf 100755 --- a/backend/mvnw +++ b/backend/mvnw @@ -19,7 +19,7 @@ # ---------------------------------------------------------------------------- # ---------------------------------------------------------------------------- -# Apache Maven Wrapper startup batch script, version 3.3.1 +# Apache Maven Wrapper startup batch script, version 3.3.2 # # Optional ENV vars # ----------------- @@ -97,11 +97,19 @@ die() { exit 1 } +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + # parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties while IFS="=" read -r key value; do case "${key-}" in - distributionUrl) distributionUrl="${value-}" ;; - distributionSha256Sum) distributionSha256Sum="${value-}" ;; + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; esac done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" [ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" @@ -131,7 +139,8 @@ esac distributionUrlName="${distributionUrl##*/}" distributionUrlNameMain="${distributionUrlName%.*}" distributionUrlNameMain="${distributionUrlNameMain%-bin}" -MAVEN_HOME="$HOME/.m2/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" exec_maven() { unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : diff --git a/backend/mvnw.cmd b/backend/mvnw.cmd index 1ff8c9dd..b150b91e 100644 --- a/backend/mvnw.cmd +++ b/backend/mvnw.cmd @@ -19,7 +19,7 @@ @REM ---------------------------------------------------------------------------- @REM ---------------------------------------------------------------------------- -@REM Apache Maven Wrapper startup batch script, version 3.3.1 +@REM Apache Maven Wrapper startup batch script, version 3.3.2 @REM @REM Optional ENV vars @REM MVNW_REPOURL - repo url base for downloading maven distribution @@ -79,6 +79,9 @@ if ($env:MVNW_REPOURL) { $distributionUrlName = $distributionUrl -replace '^.*/','' $distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' $MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} $MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' $MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 9ba3a96d..69244808 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,6 +1,6 @@ ## Use this section once builds are fixed -FROM node:20.17.0-bullseye-slim AS build +FROM node:20.18.0-bullseye-slim AS build # Build static files WORKDIR /app From e2086fe733ef8dd91f59eca36683fc2da46dd298 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:02:02 +0000 Subject: [PATCH 2/3] fix(deps): update maven all non-major dependencies (#416) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Paulo Gomes da Cruz Junior --- backend/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/pom.xml b/backend/pom.xml index 26a098a7..7008de85 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -490,12 +490,12 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.5.0 + 3.6.0 com.puppycrawl.tools checkstyle - 10.18.2 + 10.19.0 @@ -541,7 +541,7 @@ com.nimbusds nimbus-jose-jwt - 9.41.2 + 9.42 org.testcontainers From 6a431d91ec6556d32bc613d82b030b5630de1c0f Mon Sep 17 00:00:00 2001 From: Paulo Gomes da Cruz Junior Date: Mon, 28 Oct 2024 07:47:30 -0700 Subject: [PATCH 3/3] chore(deps): code refactor (#417) --- backend/pom.xml | 9 ++------- .../AbstractTestContainerIntegrationTest.java | 2 +- .../extensions/CustomOracleContainer.java | 16 +--------------- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/backend/pom.xml b/backend/pom.xml index 7008de85..230215a0 100644 --- a/backend/pom.xml +++ b/backend/pom.xml @@ -31,7 +31,7 @@ true true true - true + false true ${project.build.directory}/coverage-reports ${maven.build.timestamp} @@ -176,7 +176,7 @@ org.testcontainers - oracle-xe + oracle-free test @@ -186,11 +186,6 @@ spring-boot-starter-test test - - com.h2database - h2 - test - org.springframework.security spring-security-test diff --git a/backend/src/test/java/ca/bc/gov/restapi/results/extensions/AbstractTestContainerIntegrationTest.java b/backend/src/test/java/ca/bc/gov/restapi/results/extensions/AbstractTestContainerIntegrationTest.java index b2a8e96b..969847e2 100644 --- a/backend/src/test/java/ca/bc/gov/restapi/results/extensions/AbstractTestContainerIntegrationTest.java +++ b/backend/src/test/java/ca/bc/gov/restapi/results/extensions/AbstractTestContainerIntegrationTest.java @@ -10,9 +10,9 @@ import org.springframework.test.context.DynamicPropertyRegistry; import org.springframework.test.context.DynamicPropertySource; import org.springframework.test.context.junit.jupiter.SpringExtension; -import org.testcontainers.containers.OracleContainer; import org.testcontainers.containers.PostgreSQLContainer; import org.testcontainers.junit.jupiter.Testcontainers; +import org.testcontainers.oracle.OracleContainer; /** * Abstract base class for integration tests using Testcontainers for PostgreSQL and Oracle diff --git a/backend/src/test/java/ca/bc/gov/restapi/results/extensions/CustomOracleContainer.java b/backend/src/test/java/ca/bc/gov/restapi/results/extensions/CustomOracleContainer.java index e23c832e..7905d33c 100644 --- a/backend/src/test/java/ca/bc/gov/restapi/results/extensions/CustomOracleContainer.java +++ b/backend/src/test/java/ca/bc/gov/restapi/results/extensions/CustomOracleContainer.java @@ -2,25 +2,15 @@ import java.time.Duration; import java.util.UUID; -import org.testcontainers.containers.OracleContainer; +import org.testcontainers.oracle.OracleContainer; import org.testcontainers.utility.DockerImageName; -/** - * CustomOracleContainer extends OracleContainer to provide a customized Oracle database container. - * This is because by default, the library expects the Oracle database to come from a different - * image. - */ public class CustomOracleContainer extends OracleContainer { - /** - * Constructs a CustomOracleContainer with predefined settings. Sets the Docker image, database - * name, username, and a random password. - */ public CustomOracleContainer() { super( DockerImageName .parse("gvenzl/oracle-free:23.5-slim-faststart") - .asCompatibleSubstituteFor("gvenzl/oracle-xe") ); this.withDatabaseName("legacyfsa") @@ -28,10 +18,6 @@ public CustomOracleContainer() { .withPassword(UUID.randomUUID().toString().substring(24)); } - /** - * Overrides the waitUntilContainerStarted method to set a custom startup timeout. The Oracle - * image tends to be slow, so we set a longer timeout. - */ @Override protected void waitUntilContainerStarted() { getWaitStrategy()