From 0c88ef4ccd9aa6d9985355d91090af27b58b279a Mon Sep 17 00:00:00 2001 From: James McLaughlin Date: Mon, 23 May 2022 13:53:50 +0100 Subject: [PATCH 1/2] exception handling for TOLOAD ontologies --- .../uk/ac/ebi/spot/ols/LoadingApplication.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ols-apps/ols-indexer/src/main/java/uk/ac/ebi/spot/ols/LoadingApplication.java b/ols-apps/ols-indexer/src/main/java/uk/ac/ebi/spot/ols/LoadingApplication.java index ffb2662d..5397c6d1 100644 --- a/ols-apps/ols-indexer/src/main/java/uk/ac/ebi/spot/ols/LoadingApplication.java +++ b/ols-apps/ols-indexer/src/main/java/uk/ac/ebi/spot/ols/LoadingApplication.java @@ -173,7 +173,7 @@ else if (deleteOntologies.length > 0){ else { // otherwise load everything set TOLOAD for (OntologyDocument document : ontologyRepositoryService.getAllDocumentsByStatus(Status.TOLOAD)) { - // try { + try { boolean loadResult = ontologyIndexingService.indexOntologyDocument(document); if (loadResult) updatedOntologies.add(document.getOntologyId()); @@ -181,14 +181,14 @@ else if (deleteOntologies.length > 0){ haserror = true; failingOntologies.put(document.getOntologyId(), "An error occurred. Check logs."); } - // } catch (Throwable t) { - // logger.error("Application failed creating indexes for " + document.getOntologyId() + ": " + - // t.getMessage(), t); - // exceptions.append(t.getMessage()); - // exceptions.append("\n"); - // haserror = true; - // failingOntologies.put(document.getOntologyId(),t.getMessage()); - // } + } catch (Throwable t) { + logger.error("Application failed creating indexes for " + document.getOntologyId() + ": " + + t.getMessage(), t); + exceptions.append(t.getMessage()); + exceptions.append("\n"); + haserror = true; + failingOntologies.put(document.getOntologyId(),t.getMessage()); + } } } From 69c36b285e2c8a1a4397bf236bcb2f3bca1f1c85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20H=C3=B6ffner?= Date: Thu, 23 Jun 2022 09:37:38 +0200 Subject: [PATCH 2/2] Drastically reduce Maven build log size by using batch mode in setting download log level to warn. --- .github/workflows/ols-release.yml | 2 +- ols-apps/ols-config-importer/Dockerfile | 3 ++- ols-apps/ols-indexer/Dockerfile | 3 ++- ols-web/Dockerfile | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ols-release.yml b/.github/workflows/ols-release.yml index 9102edb4..22f220ad 100644 --- a/.github/workflows/ols-release.yml +++ b/.github/workflows/ols-release.yml @@ -30,7 +30,7 @@ jobs: mvn -B release:update-versions -DreleaseVersion=${{ steps.versionNumber.outputs.value }} -DdevelopmentVersion=${{ steps.versionNumber.outputs.value }}-SNAPSHOT mvn versions:set -DremoveSnapshot -DgenerateBackupPoms=false -DprocessAllModules=true - name: Build OLS - run: mvn clean package -DskipTests + run: mvn -B clean package -DskipTests - name: Create archive run: | mkdir ols_jars_${{ github.ref_name }} diff --git a/ols-apps/ols-config-importer/Dockerfile b/ols-apps/ols-config-importer/Dockerfile index d2686c55..372c3862 100644 --- a/ols-apps/ols-config-importer/Dockerfile +++ b/ols-apps/ols-config-importer/Dockerfile @@ -3,7 +3,8 @@ FROM maven:3.6-jdk-8 AS build RUN mkdir /opt/ols COPY . /opt/ols/ COPY build-fix/. /root/.m2/repository/ -RUN cd /opt/ols && ls && mvn clean package -DskipTests +ENV MAVEN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" +RUN cd /opt/ols && ls && mvn clean package -B -DskipTests FROM openjdk:8-jre-alpine RUN apk add bash diff --git a/ols-apps/ols-indexer/Dockerfile b/ols-apps/ols-indexer/Dockerfile index 3cc38e13..386b7951 100644 --- a/ols-apps/ols-indexer/Dockerfile +++ b/ols-apps/ols-indexer/Dockerfile @@ -3,7 +3,8 @@ FROM maven:3.6-jdk-8 AS build RUN mkdir /opt/ols COPY . /opt/ols/ COPY build-fix/. /root/.m2/repository/ -RUN cd /opt/ols && ls && mvn clean package -DskipTests +ENV MAVEN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" +RUN cd /opt/ols && ls && mvn clean package -B -DskipTests FROM openjdk:8-jre-alpine RUN apk add bash diff --git a/ols-web/Dockerfile b/ols-web/Dockerfile index 7610f5c0..54599319 100644 --- a/ols-web/Dockerfile +++ b/ols-web/Dockerfile @@ -3,7 +3,8 @@ FROM maven:3.6-jdk-8 AS build RUN mkdir /opt/ols COPY . /opt/ols/ COPY build-fix/. /root/.m2/repository/ -RUN cd /opt/ols && ls && mvn clean package -DskipTests +ENV MAVEN_OPTS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" +RUN cd /opt/ols && ls && mvn -B clean package -DskipTests FROM openjdk:8-jre-alpine RUN apk add bash