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 a05c1888b4e79a01c4c007be2b9f74e3e7db5667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konrad=20H=C3=B6ffner?= Date: Fri, 22 Apr 2022 11:15:03 +0200 Subject: [PATCH 2/2] Add Docker BuildKit Maven caches. --- ols-apps/ols-config-importer/Dockerfile | 4 ++-- ols-apps/ols-indexer/Dockerfile | 5 ++--- ols-web/Dockerfile | 5 ++--- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/ols-apps/ols-config-importer/Dockerfile b/ols-apps/ols-config-importer/Dockerfile index d2686c55..af4ac151 100644 --- a/ols-apps/ols-config-importer/Dockerfile +++ b/ols-apps/ols-config-importer/Dockerfile @@ -2,8 +2,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 +COPY build-fix/. /root/build-fix +RUN --mount=type=cache,target=/root/.m2 mkdir -p /root/.m2/repository && cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -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..bbb64436 100644 --- a/ols-apps/ols-indexer/Dockerfile +++ b/ols-apps/ols-indexer/Dockerfile @@ -1,9 +1,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 +COPY build-fix/. /root/build-fix +RUN --mount=type=cache,target=/root/.m2 mkdir -p /root/.m2/repository && cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests FROM openjdk:8-jre-alpine RUN apk add bash diff --git a/ols-web/Dockerfile b/ols-web/Dockerfile index 7610f5c0..afa67c3f 100644 --- a/ols-web/Dockerfile +++ b/ols-web/Dockerfile @@ -1,9 +1,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 +COPY build-fix/. /root/build-fix +RUN --mount=type=cache,target=/root/.m2 mkdir -p /root/.m2/repository && cp -r /root/build-fix/* /root/.m2/repository/ && cd /opt/ols && ls && mvn clean package -DskipTests FROM openjdk:8-jre-alpine RUN apk add bash