From d34265f272d347e7a9035d628c50115fecc1d0d2 Mon Sep 17 00:00:00 2001 From: Thomas Krause Date: Tue, 28 Nov 2023 21:02:40 +0100 Subject: [PATCH 1/3] Update to graphANNIS 3.0.0 --- CHANGELOG.md | 5 +++++ pom.xml | 21 +++++++++++-------- .../annis/gui/ServiceStarter.java | 5 +++-- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2494506f28..d0ee7c1e24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Update to graphANNIS 3.0.0 with various bugfixes. +- Polling the import status in the adminstration view fixed. + ## [4.10.4] - 2023-11-01 ### Fixed diff --git a/pom.xml b/pom.xml index 341531ccc9..7253d9c94e 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ 8.14.3 true org.corpus_tools.annis.gui.AnnisUiApplication - 2.4.8 + 3.0.0 4.7.2 server 1.5.24 @@ -258,11 +258,12 @@ - https://github.com/korpling/graphANNIS/releases/download/v${graphannis.version}/graphannis-webservice + https://github.com/korpling/graphANNIS/releases/download/v${graphannis.version}/graphannis-webservice-x86_64-unknown-linux-gnu.tar.xz - ${project.build.directory}/native/linux-x86-64/ + ${project.build.directory}/native/ - fd55847babf274d9aece5cf9d6dc2fe1e7c72e6d7f5b821a878d291603f0acef + afe76eb683a999202fa7ea2d6e34b89c11a2620bb69ceb29157379c9205b1425 + true @@ -273,11 +274,12 @@ - https://github.com/korpling/graphANNIS/releases/download/v${graphannis.version}/graphannis-webservice.exe + https://github.com/korpling/graphANNIS/releases/download/v${graphannis.version}/graphannis-webservice-x86_64-pc-windows-msvc.zip ${project.build.directory}/native/win32-x86-64/ - ec47440ef06041443cd084895d02ff2ef8325c247e0ea6b6d73e6aac86176a49 + cbae1a43e059477fa02e36d37623dfe52656de4885929e8cc150528d4b3a6d6b + true @@ -288,11 +290,12 @@ - https://github.com/korpling/graphANNIS/releases/download/v${graphannis.version}/graphannis-webservice.osx + https://github.com/korpling/graphANNIS/releases/download/v${graphannis.version}/graphannis-webservice-x86_64-apple-darwin.tar.xz - ${project.build.directory}/native/darwin/ + ${project.build.directory}/native/ - dfd2324ad19db52050dba8edbdac472f6ccd03fc83340715766d603ca82da4a0 + a6b46be4e2fc7ed96f0c51e0625eeeadb577105267677626d43c4bf04af82c10 + true diff --git a/src/main/java/org/corpus_tools/annis/gui/ServiceStarter.java b/src/main/java/org/corpus_tools/annis/gui/ServiceStarter.java index 4a233926f2..bb47a6dd19 100644 --- a/src/main/java/org/corpus_tools/annis/gui/ServiceStarter.java +++ b/src/main/java/org/corpus_tools/annis/gui/ServiceStarter.java @@ -161,10 +161,11 @@ private void startService() { private Optional executablePathForSystem() { Optional execPath = Optional.empty(); if (SystemUtils.IS_OS_MAC_OSX) { - execPath = Optional.of("darwin/graphannis-webservice.osx"); + execPath = Optional.of("graphannis-webservice-x86_64-apple-darwin/graphannis-webservice"); } else if ("amd64".equals(SystemUtils.OS_ARCH) || "x86_64".equals(SystemUtils.OS_ARCH)) { if (SystemUtils.IS_OS_LINUX) { - execPath = Optional.of("linux-x86-64/graphannis-webservice"); + execPath = + Optional.of("graphannis-webservice-x86_64-unknown-linux-gnu/graphannis-webservice"); } else if (SystemUtils.IS_OS_WINDOWS) { execPath = Optional.of("win32-x86-64/graphannis-webservice.exe"); } From ed705a4e42c92e63b6b5aa93ff6475fb772bc637 Mon Sep 17 00:00:00 2001 From: Thomas Krause Date: Tue, 28 Nov 2023 21:12:34 +0100 Subject: [PATCH 2/3] Update test configuration to use Java 17 for SonarCloud code coverage reports --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++-- misc/download-annis-cli.sh | 12 +++++++----- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4a43493307..cc653b8b71 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,7 +26,7 @@ jobs: key: ${{ runner.os }}-corpora-${{ hashFiles('misc/import-test-corpora.sh') }} - name: Set JAVA_HOME to included JDK 8 run: echo JAVA_HOME=$JAVA_HOME_8_X64 >> $GITHUB_ENV - - run: misc/download-annis-cli.sh 2.2.0 + - run: misc/download-annis-cli.sh 3.0.0 env: OS_NAME: linux - run: misc/import-test-corpora.sh @@ -55,7 +55,36 @@ jobs: key: ${{ runner.os }}-corpora-${{ hashFiles('misc/import-test-corpora.sh') }} - name: Set JAVA_HOME to included JDK 11 run: echo JAVA_HOME=$JAVA_HOME_11_X64 >> $GITHUB_ENV - - run: misc/download-annis-cli.sh 2.2.0 + - run: misc/download-annis-cli.sh 3.0.0 + env: + OS_NAME: linux + - run: misc/import-test-corpora.sh + - name: Run Maven install (includes tests) + run: mvn install + test_jdk17: + name: Execute all automated tests on JDK 17 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + # Otherwise the new code can't be determined or code coverage is less informing + fetch-depth: 0 + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-11-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven-11- + - name: Cache test corpora + uses: actions/cache@v2 + with: + path: "*.zip" + key: ${{ runner.os }}-corpora-${{ hashFiles('misc/import-test-corpora.sh') }} + - name: Set JAVA_HOME to included JDK 17 + run: echo JAVA_HOME=$JAVA_HOME_17_X64 >> $GITHUB_ENV + - run: misc/download-annis-cli.sh 3.0.0 env: OS_NAME: linux - run: misc/import-test-corpora.sh diff --git a/misc/download-annis-cli.sh b/misc/download-annis-cli.sh index b1450c9e5a..1a157dfed0 100755 --- a/misc/download-annis-cli.sh +++ b/misc/download-annis-cli.sh @@ -24,17 +24,19 @@ if [ "$install_graphannis_cli" = true ] ; then if [[ "$OS_NAME" == "linux" ]]; then rm -f $HOME/.cargo/bin/annis - curl -L -o $HOME/.cargo/bin/annis https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/annis - chmod u+x $HOME/.cargo/bin/annis + curl -L -o annis.tar.xz https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-unknown-linux-gnu.tar.xz + tar xf annis.tar.xz -C $HOME/.cargo/bin/ elif [[ "$OS_NAME" == "osx" ]]; then rm -f $HOME/.cargo/bin/annis - curl -L -o $HOME/.cargo/bin/annis https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/annis.osx - chmod u+x $HOME/.cargo/bin/annis + curl -L -o annis.tar.xz https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-apple-darwin.tar.xz + tar xf annis.tar.xz -C $HOME/.cargo/bin/ elif [[ "$OS_NAME" == "windows" ]]; then del /s /q $HOME/.cargo/bin/annis.exe - curl -L -o $HOME/.cargo/bin/annis.exe https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/annis.exe + curl -L -o annis.zip https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-pc-windows-msvc.zip + Expand-Archive -Path annis.zip -DestinationPath $HOME/.cargo/bin/annis.exe + else >&2 echo "Unknown value \"${OS_NAME}\" for environment variable OS_NAME" exit 1 From 0c100838592fd2606078956878e26cb9d828b4d5 Mon Sep 17 00:00:00 2001 From: Thomas Krause Date: Tue, 28 Nov 2023 21:18:35 +0100 Subject: [PATCH 3/3] Simplify ANNIS CLI download script to only support linux --- .github/workflows/deploy.yml | 2 +- misc/download-annis-cli.sh | 27 ++++++--------------------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 26b50ba477..7caca6390e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,7 @@ jobs: uses: actions/checkout@v2 - name: Set JAVA_HOME to included JDK 8 run: echo JAVA_HOME=$JAVA_HOME_8_X64 >> $GITHUB_ENV - - run: misc/download-annis-cli.sh 2.2.0 + - run: misc/download-annis-cli.sh 3.0.0 env: OS_NAME: linux - run: misc/import-test-corpora.sh diff --git a/misc/download-annis-cli.sh b/misc/download-annis-cli.sh index 1a157dfed0..261bc17852 100755 --- a/misc/download-annis-cli.sh +++ b/misc/download-annis-cli.sh @@ -1,6 +1,6 @@ #!/bin/bash -GRAPHANNIS_VERSION=${1:-2.2.0} +GRAPHANNIS_VERSION=${1:-3.0.0} install_graphannis_cli=false @@ -21,25 +21,10 @@ fi if [ "$install_graphannis_cli" = true ] ; then echo "Installing graphANNIS CLI version ${GRAPHANNIS_VERSION}" - if [[ "$OS_NAME" == "linux" ]]; - then - rm -f $HOME/.cargo/bin/annis - curl -L -o annis.tar.xz https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-unknown-linux-gnu.tar.xz - tar xf annis.tar.xz -C $HOME/.cargo/bin/ - elif [[ "$OS_NAME" == "osx" ]]; - then - rm -f $HOME/.cargo/bin/annis - curl -L -o annis.tar.xz https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-apple-darwin.tar.xz - tar xf annis.tar.xz -C $HOME/.cargo/bin/ - elif [[ "$OS_NAME" == "windows" ]]; - then - del /s /q $HOME/.cargo/bin/annis.exe - curl -L -o annis.zip https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-pc-windows-msvc.zip - Expand-Archive -Path annis.zip -DestinationPath $HOME/.cargo/bin/annis.exe - - else - >&2 echo "Unknown value \"${OS_NAME}\" for environment variable OS_NAME" - exit 1 - fi + + rm -f $HOME/.cargo/bin/annis + curl -L -o annis.tar.xz https://github.com/korpling/graphANNIS/releases/download/v${GRAPHANNIS_VERSION}/graphannis-cli-x86_64-unknown-linux-gnu.tar.xz + tar xf annis.tar.xz + mv graphannis-cli-x86_64-unknown-linux-gnu/annis $HOME/.cargo/bin/ fi