From 9b52a66107f1c2de42f22853bfa6c58dac052a95 Mon Sep 17 00:00:00 2001 From: Lindsey Dew <1202622+lindseydew@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:27:46 +0100 Subject: [PATCH 1/5] Upgrade run time env on ci --- .github/workflows/ci-mobile-save-for-later-user-deletion.yaml | 2 +- .github/workflows/ci-mobile-save-for-later.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-mobile-save-for-later-user-deletion.yaml b/.github/workflows/ci-mobile-save-for-later-user-deletion.yaml index 86e9b23b..c7885ab5 100644 --- a/.github/workflows/ci-mobile-save-for-later-user-deletion.yaml +++ b/.github/workflows/ci-mobile-save-for-later-user-deletion.yaml @@ -16,7 +16,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v3 with: - java-version: 11 + java-version: 21 distribution: corretto cache: sbt diff --git a/.github/workflows/ci-mobile-save-for-later.yaml b/.github/workflows/ci-mobile-save-for-later.yaml index 02b2e3ea..2b00fa54 100644 --- a/.github/workflows/ci-mobile-save-for-later.yaml +++ b/.github/workflows/ci-mobile-save-for-later.yaml @@ -16,7 +16,7 @@ jobs: - name: Set up JDK uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 distribution: corretto cache: sbt From c3ab1fde38860e7a3b73c6128d08088e4d8d9c61 Mon Sep 17 00:00:00 2001 From: Lindsey Dew <1202622+lindseydew@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:28:01 +0100 Subject: [PATCH 2/5] Update docs to use java21 --- docs/testing/save-for-later.md | 3 ++- docs/testing/user-deletion.md | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/testing/save-for-later.md b/docs/testing/save-for-later.md index 41c00271..8d8d3cb6 100644 --- a/docs/testing/save-for-later.md +++ b/docs/testing/save-for-later.md @@ -39,7 +39,8 @@ ### Pre-requisites 1) Mobile credentials from [Janus](https://janus.gutools.co.uk/login) -2) Follow the authentication flow as outlined at the [top](#setting-up-oauth-flow) +2) Make sure you have java 21 installed ([SDK man](https://sdkman.io/) is a good package manager) +3) Follow the authentication flow as outlined at the [top](#setting-up-oauth-flow) * Go to `src/main/scala/com/gu/sfl/local/LocalServer.scala` * Select the drop down menu to the left of the run button and select `LocalServer` under run configurations diff --git a/docs/testing/user-deletion.md b/docs/testing/user-deletion.md index 92d21893..784451b3 100644 --- a/docs/testing/user-deletion.md +++ b/docs/testing/user-deletion.md @@ -36,6 +36,7 @@ ### Pre-requisites 1) Mobile credentials from [Janus](https://janus.gutools.co.uk/login) +2) Make sure you have java 21 installed ([SDK man](https://sdkman.io/) is a good package manager) * Go to `src/main/scala/local/RunUserDeletionLambda.scala` * Select the drop down menu to the left of the run button and select `RunUserDeletionLambda` under run configurations From b0026503f69acebfb8a68b1ec56444d8bf38e78b Mon Sep 17 00:00:00 2001 From: Lindsey Dew <1202622+lindseydew@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:28:57 +0100 Subject: [PATCH 3/5] Remove the java version in compiler options --- build.sbt | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sbt b/build.sbt index 45cba728..a23933b1 100644 --- a/build.sbt +++ b/build.sbt @@ -67,7 +67,6 @@ val commonSettings: immutable.Seq[Def.Setting[_]] = List( "-deprecation", "-encoding", "UTF-8", - "-release:11", "-Ypartial-unification", "-Ywarn-dead-code" ) From 310c08415dbb360c9bf0af08dd00d4712b1ad56e Mon Sep 17 00:00:00 2001 From: Lindsey Dew <1202622+lindseydew@users.noreply.github.com> Date: Wed, 10 Apr 2024 12:41:45 +0100 Subject: [PATCH 4/5] Update lambda runtimes to use java21 --- cdk/lib/__snapshots__/mobile-save-for-later.test.ts.snap | 8 ++++---- cdk/lib/mobile-save-for-later.ts | 2 +- mobile-save-for-later-user-deletion/conf/cfn.yaml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cdk/lib/__snapshots__/mobile-save-for-later.test.ts.snap b/cdk/lib/__snapshots__/mobile-save-for-later.test.ts.snap index ff990992..7f3a4d33 100644 --- a/cdk/lib/__snapshots__/mobile-save-for-later.test.ts.snap +++ b/cdk/lib/__snapshots__/mobile-save-for-later.test.ts.snap @@ -763,7 +763,7 @@ Object { "Arn", ], }, - "Runtime": "java11", + "Runtime": "java21", "Tags": Array [ Object { "Key": "App", @@ -993,7 +993,7 @@ Object { "Arn", ], }, - "Runtime": "java11", + "Runtime": "java21", "Tags": Array [ Object { "Key": "App", @@ -2029,7 +2029,7 @@ Object { "Arn", ], }, - "Runtime": "java11", + "Runtime": "java21", "Tags": Array [ Object { "Key": "App", @@ -2259,7 +2259,7 @@ Object { "Arn", ], }, - "Runtime": "java11", + "Runtime": "java21", "Tags": Array [ Object { "Key": "App", diff --git a/cdk/lib/mobile-save-for-later.ts b/cdk/lib/mobile-save-for-later.ts index c0338b29..8757b127 100644 --- a/cdk/lib/mobile-save-for-later.ts +++ b/cdk/lib/mobile-save-for-later.ts @@ -41,7 +41,7 @@ export class MobileSaveForLater extends GuStack { const app = "mobile-save-for-later"; const commonLambdaProps = { - runtime: Runtime.JAVA_11, + runtime: Runtime.JAVA_21, app, fileName: `${app}.jar`, }; diff --git a/mobile-save-for-later-user-deletion/conf/cfn.yaml b/mobile-save-for-later-user-deletion/conf/cfn.yaml index c2268248..12baed4e 100644 --- a/mobile-save-for-later-user-deletion/conf/cfn.yaml +++ b/mobile-save-for-later-user-deletion/conf/cfn.yaml @@ -149,7 +149,7 @@ Resources: Handler: com.gu.sfl.userdeletion.UserDeletionLambda::handler MemorySize: 512 Role: !GetAtt UserDeletionRole.Arn - Runtime: java11 + Runtime: java21 Timeout: 300 UserDeletionEventSource: Type: AWS::Lambda::EventSourceMapping From 192846e816293faa57a3ad56e90b1f8f6037b13a Mon Sep 17 00:00:00 2001 From: Lindsey Dew <1202622+lindseydew@users.noreply.github.com> Date: Mon, 15 Apr 2024 14:06:31 +0100 Subject: [PATCH 5/5] Add release tag --- build.sbt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sbt b/build.sbt index a23933b1..1103f923 100644 --- a/build.sbt +++ b/build.sbt @@ -67,6 +67,7 @@ val commonSettings: immutable.Seq[Def.Setting[_]] = List( "-deprecation", "-encoding", "UTF-8", + "-release:21", "-Ypartial-unification", "-Ywarn-dead-code" )