From 097ffca753bfaa10e894075f80b3bfe9accf2cbd Mon Sep 17 00:00:00 2001 From: Tim Yates Date: Tue, 17 Sep 2024 14:09:23 +0100 Subject: [PATCH] Revert "Try again with AOT to see if it speeds things up" It does seem to improve startup time, but I don't think it belongs in this PR This reverts commit 51094e53b974305baf161e825ad6ce5d107c7087. --- .../workflows/gradle-build-native-feature.yml | 2 +- .../gradle-deploy-native-develop.yml | 2 +- server/build.gradle | 23 ------------------- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/.github/workflows/gradle-build-native-feature.yml b/.github/workflows/gradle-build-native-feature.yml index ff064045e..142b0cf4f 100644 --- a/.github/workflows/gradle-build-native-feature.yml +++ b/.github/workflows/gradle-build-native-feature.yml @@ -41,4 +41,4 @@ jobs: - name: Build a native docker image uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021 with: - arguments: optimizedDockerBuildNative + arguments: dockerBuildNative diff --git a/.github/workflows/gradle-deploy-native-develop.yml b/.github/workflows/gradle-deploy-native-develop.yml index ce6ba6294..d58a54294 100644 --- a/.github/workflows/gradle-deploy-native-develop.yml +++ b/.github/workflows/gradle-deploy-native-develop.yml @@ -56,7 +56,7 @@ jobs: run: |- gcloud --quiet auth configure-docker - name: Build a native docker image - run: ./gradlew optimizedDockerBuildNative + run: ./gradlew dockerBuildNative env: VITE_APP_API_URL: https://checkins-develop-native-832140020593.us-central1.run.app - name: Push the Docker image to Google Container Registry diff --git a/server/build.gradle b/server/build.gradle index f1da9ee21..074d4f017 100755 --- a/server/build.gradle +++ b/server/build.gradle @@ -4,7 +4,6 @@ plugins { id 'maven-publish' id("com.gradleup.shadow") version "8.3.1" id("io.micronaut.application") version "4.4.0" - id("io.micronaut.aot") version "4.4.0" id "jacoco" id("org.openrewrite.rewrite") version "latest.release" } @@ -27,20 +26,6 @@ micronaut { incremental(true) annotations("com.objectcomputing.checkins.*") } - aot { - // Please review carefully the optimizations enabled below - // Check https://micronaut-projects.github.io/micronaut-aot/latest/guide/ for more details - optimizeServiceLoading = false - convertYamlToJava = false - precomputeOperations = true - cacheEnvironment = true - optimizeClassLoading = true - deduceEnvironment = true - optimizeNetty = true - replaceLogbackXml = true - configurationProperties.put("micronaut.security.jwks.enabled","false") - configurationProperties.put("micronaut.security.openid-configuration.enabled","false") - } } dockerBuildNative { @@ -51,14 +36,6 @@ dockerBuildNative { images = ["checkins:latest"] + imageNameFromGithub } -optimizedDockerBuildNative { - def imageNameFromGithub = [] - if (System.getenv('PROJECT_ID') != null && System.getenv('SERVICE_NAME') && System.getenv('GITHUB_SHA')) { - imageNameFromGithub = ["gcr.io/${System.getenv('PROJECT_ID')}/${System.getenv('SERVICE_NAME')}:${System.getenv("GITHUB_SHA")}".toString()] - } - images = ["checkins:latest"] + imageNameFromGithub -} - graalvmNative { toolchainDetection = false binaries {