From 21974b5a9bd920a82c709c675323ce26e27a87e4 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 11 Oct 2023 09:14:34 +0200 Subject: [PATCH 01/15] Upgrade dependencies --- .github/workflows/broken_links_checker.yml | 8 ++-- .github/workflows/ci-build-next-java.yml | 6 +-- .github/workflows/ci-build.yml | 4 +- .github/workflows/dependencies_check.yml | 8 ++-- .github/workflows/project-keeper-verify.yml | 6 +-- .github/workflows/project-keeper.sh | 2 +- ...elease_droid_prepare_original_checksum.yml | 8 ++-- .../release_droid_print_quick_checksum.yml | 7 ++-- ...ase_droid_upload_github_release_assets.yml | 10 ++--- .project-keeper.yml | 2 +- dependencies.md | 12 +++--- doc/changes/changelog.md | 1 + doc/changes/changes_0.3.4.md | 41 +++++++++++++++++++ go-client/TestSetupAbstraction.go | 2 +- server/.settings/org.eclipse.jdt.core.prefs | 2 +- server/pk_generated_parent.pom | 21 +++++----- server/pom.xml | 20 ++++----- 17 files changed, 100 insertions(+), 60 deletions(-) create mode 100644 doc/changes/changes_0.3.4.md diff --git a/.github/workflows/broken_links_checker.yml b/.github/workflows/broken_links_checker.yml index c4ff3be..82ec1cd 100644 --- a/.github/workflows/broken_links_checker.yml +++ b/.github/workflows/broken_links_checker.yml @@ -15,16 +15,18 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Configure broken links checker run: | mkdir -p ./target echo '{"aliveStatusCodes": [429, 200], "ignorePatterns": [' \ '{"pattern": "^https?://(www|dev).mysql.com/"},' \ '{"pattern": "^https?://(www.)?opensource.org"}' \ + '{"pattern": "^https?://(www.)?eclipse.org"}' \ + '{"pattern": "^https?://projects.eclipse.org"}' \ ']}' > ./target/broken_links_checker.json - uses: gaurav-nelson/github-action-markdown-link-check@v1 with: - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' + use-quiet-mode: "yes" + use-verbose-mode: "yes" config-file: ./target/broken_links_checker.json diff --git a/.github/workflows/ci-build-next-java.yml b/.github/workflows/ci-build-next-java.yml index e267b27..3ef61de 100644 --- a/.github/workflows/ci-build-next-java.yml +++ b/.github/workflows/ci-build-next-java.yml @@ -14,15 +14,15 @@ jobs: cancel-in-progress: true steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 17 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 17 - cache: 'maven' + cache: "maven" - name: Run tests and build with Maven run: | mvn --file server/ --batch-mode --update-snapshots clean package -DtrimStackTrace=false \ diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index c0129ce..81e26c0 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -14,13 +14,13 @@ jobs: cancel-in-progress: true steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 11 - name: Set up Go uses: actions/setup-go@v3 diff --git a/.github/workflows/dependencies_check.yml b/.github/workflows/dependencies_check.yml index b091a55..368541b 100644 --- a/.github/workflows/dependencies_check.yml +++ b/.github/workflows/dependencies_check.yml @@ -9,12 +9,12 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 11 - cache: 'maven' + cache: "maven" - name: Checking dependencies for vulnerabilities - run: mvn --batch-mode org.sonatype.ossindex.maven:ossindex-maven-plugin:audit --file server/pom.xml \ No newline at end of file + run: mvn --batch-mode org.sonatype.ossindex.maven:ossindex-maven-plugin:audit --file server/pom.xml diff --git a/.github/workflows/project-keeper-verify.yml b/.github/workflows/project-keeper-verify.yml index 5c20418..5744029 100644 --- a/.github/workflows/project-keeper-verify.yml +++ b/.github/workflows/project-keeper-verify.yml @@ -14,7 +14,7 @@ jobs: cancel-in-progress: true steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -25,9 +25,9 @@ jobs: java-version: 11 - name: Set up Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4 with: - go-version: 1.19 + go-version: "1.20" diff --git a/.github/workflows/project-keeper.sh b/.github/workflows/project-keeper.sh index 4911800..e75b381 100755 --- a/.github/workflows/project-keeper.sh +++ b/.github/workflows/project-keeper.sh @@ -5,7 +5,7 @@ set -o nounset set -o pipefail readonly pk_mode="${1-verify}"; -readonly version="2.9.7" +readonly version="2.9.12" readonly pk_jar="$HOME/.m2/repository/com/exasol/project-keeper-cli/$version/project-keeper-cli-$version.jar" diff --git a/.github/workflows/release_droid_prepare_original_checksum.yml b/.github/workflows/release_droid_prepare_original_checksum.yml index 50dabcc..ceba664 100644 --- a/.github/workflows/release_droid_prepare_original_checksum.yml +++ b/.github/workflows/release_droid_prepare_original_checksum.yml @@ -8,15 +8,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 11 - cache: 'maven' + cache: "maven" - name: Enable testcontainer reuse run: echo 'testcontainers.reuse.enable=true' > "$HOME/.testcontainers.properties" - name: Run tests and build with Maven @@ -28,4 +28,4 @@ jobs: with: name: original_checksum retention-days: 5 - path: original_checksum \ No newline at end of file + path: original_checksum diff --git a/.github/workflows/release_droid_print_quick_checksum.yml b/.github/workflows/release_droid_print_quick_checksum.yml index 7c018f1..a74ce0e 100644 --- a/.github/workflows/release_droid_print_quick_checksum.yml +++ b/.github/workflows/release_droid_print_quick_checksum.yml @@ -8,17 +8,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 11 - cache: 'maven' + cache: "maven" - name: Build with Maven skipping tests run: mvn --file server/pom.xml --batch-mode clean verify -DskipTests - name: Print checksum run: echo 'checksum_start==';find server/target -maxdepth 1 -name *.jar -exec sha256sum "{}" + | xargs;echo '==checksum_end' - diff --git a/.github/workflows/release_droid_upload_github_release_assets.yml b/.github/workflows/release_droid_upload_github_release_assets.yml index 4bf7f4e..057f3e4 100644 --- a/.github/workflows/release_droid_upload_github_release_assets.yml +++ b/.github/workflows/release_droid_upload_github_release_assets.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: upload_url: - description: 'Assets upload URL' + description: "Assets upload URL" required: true jobs: @@ -12,15 +12,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout the repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up JDK 11 uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: "temurin" java-version: 11 - cache: 'maven' + cache: "maven" - name: Build with Maven skipping tests run: mvn --file server/pom.xml --batch-mode clean verify -DskipTests - name: Generate sha256sum files @@ -41,4 +41,4 @@ jobs: uses: shogo82148/actions-upload-release-asset@v1 with: upload_url: ${{ github.event.inputs.upload_url }} - asset_path: target/error_code_report.json \ No newline at end of file + asset_path: target/error_code_report.json diff --git a/.project-keeper.yml b/.project-keeper.yml index 52c72fc..2b1e321 100644 --- a/.project-keeper.yml +++ b/.project-keeper.yml @@ -8,4 +8,4 @@ sources: path: go-client/go.mod linkReplacements: - https://javalin.io/javalin|https://javalin.io/ -version: 0.3.3 +version: 0.3.4 diff --git a/dependencies.md b/dependencies.md index cc76c71..bc4d4c8 100644 --- a/dependencies.md +++ b/dependencies.md @@ -17,15 +17,15 @@ | [JUnit Jupiter Engine][4] | [Eclipse Public License v2.0][5] | | [JUnit Jupiter Params][4] | [Eclipse Public License v2.0][5] | | [Hamcrest][6] | [BSD License 3][7] | -| [mockito-junit-jupiter][8] | [The MIT License][9] | +| [mockito-junit-jupiter][8] | [MIT][9] | | [REST Assured][10] | [Apache 2.0][11] | | [JUnit5 System Extensions][12] | [Eclipse Public License v2.0][13] | ### Runtime Dependencies -| Dependency | License | -| ------------------------- | ----------------- | -| [SLF4J JDK14 Binding][14] | [MIT License][15] | +| Dependency | License | +| -------------------------- | ----------------- | +| [SLF4J JDK14 Provider][14] | [MIT License][15] | ### Plugin Dependencies @@ -40,7 +40,7 @@ | [Maven Surefire Plugin][24] | [Apache-2.0][19] | | [Versions Maven Plugin][25] | [Apache License, Version 2.0][19] | | [duplicate-finder-maven-plugin Maven Mojo][26] | [Apache License 2.0][11] | -| [Apache Maven Assembly Plugin][27] | [Apache License, Version 2.0][19] | +| [Apache Maven Assembly Plugin][27] | [Apache-2.0][19] | | [Apache Maven JAR Plugin][28] | [Apache License, Version 2.0][19] | | [Artifact reference checker and unifier][29] | [MIT License][30] | | [Maven Failsafe Plugin][31] | [Apache-2.0][19] | @@ -95,7 +95,7 @@ [23]: https://sonatype.github.io/ossindex-maven/maven-plugin/ [24]: https://maven.apache.org/surefire/maven-surefire-plugin/ [25]: https://www.mojohaus.org/versions/versions-maven-plugin/ -[26]: https://github.com/basepom/duplicate-finder-maven-plugin +[26]: https://basepom.github.io/duplicate-finder-maven-plugin [27]: https://maven.apache.org/plugins/maven-assembly-plugin/ [28]: https://maven.apache.org/plugins/maven-jar-plugin/ [29]: https://github.com/exasol/artifact-reference-checker-maven-plugin/ diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 0bb81fe..16bdf90 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,5 +1,6 @@ # Changes +* [0.3.4](changes_0.3.4.md) * [0.3.3](changes_0.3.3.md) * [0.3.2](changes_0.3.2.md) * [0.3.1](changes_0.3.1.md) diff --git a/doc/changes/changes_0.3.4.md b/doc/changes/changes_0.3.4.md new file mode 100644 index 0000000..8d814d3 --- /dev/null +++ b/doc/changes/changes_0.3.4.md @@ -0,0 +1,41 @@ +# Exasol Test Setup Abstraction Server 0.3.4, released 2023-??-?? + +Code name: + +## Summary + +## Features + +* ISSUE_NUMBER: description + +## Dependency Updates + +### Server for the Exasol Test-Setup Abstraction + +#### Compile Dependency Updates + +* Updated `com.exasol:exasol-test-setup-abstraction-java:2.0.2` to `2.0.4` +* Updated `io.javalin:javalin:5.6.1` to `5.6.2` + +#### Runtime Dependency Updates + +* Updated `org.slf4j:slf4j-jdk14:2.0.7` to `2.0.9` + +#### Test Dependency Updates + +* Updated `io.rest-assured:rest-assured:5.3.1` to `5.3.2` +* Updated `org.junit.jupiter:junit-jupiter-engine:5.9.3` to `5.10.0` +* Updated `org.junit.jupiter:junit-jupiter-params:5.9.3` to `5.10.0` +* Updated `org.mockito:mockito-junit-jupiter:5.4.0` to `5.6.0` + +#### Plugin Dependency Updates + +* Updated `com.exasol:error-code-crawler-maven-plugin:1.2.3` to `1.3.0` +* Updated `org.apache.maven.plugins:maven-assembly-plugin:3.5.0` to `3.6.0` +* Updated `org.apache.maven.plugins:maven-enforcer-plugin:3.3.0` to `3.4.0` +* Updated `org.apache.maven.plugins:maven-failsafe-plugin:3.0.0` to `3.1.2` +* Updated `org.apache.maven.plugins:maven-surefire-plugin:3.0.0` to `3.1.2` +* Updated `org.basepom.maven:duplicate-finder-maven-plugin:1.5.1` to `2.0.1` +* Updated `org.codehaus.mojo:flatten-maven-plugin:1.4.1` to `1.5.0` +* Updated `org.codehaus.mojo:versions-maven-plugin:2.15.0` to `2.16.0` +* Updated `org.jacoco:jacoco-maven-plugin:0.8.9` to `0.8.10` diff --git a/go-client/TestSetupAbstraction.go b/go-client/TestSetupAbstraction.go index 80bfc27..ff24e7e 100644 --- a/go-client/TestSetupAbstraction.go +++ b/go-client/TestSetupAbstraction.go @@ -18,7 +18,7 @@ type TestSetupAbstraction struct { server *serverProcess } -const serverVersion = "0.3.3" +const serverVersion = "0.3.4" // Create creates a new Exasol test setup with the given path to the config file // and starts a local server. diff --git a/server/.settings/org.eclipse.jdt.core.prefs b/server/.settings/org.eclipse.jdt.core.prefs index 8b5a9aa..bb40c3f 100644 --- a/server/.settings/org.eclipse.jdt.core.prefs +++ b/server/.settings/org.eclipse.jdt.core.prefs @@ -111,7 +111,7 @@ org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning -org.eclipse.jdt.core.compiler.processAnnotations=enabled +org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false diff --git a/server/pk_generated_parent.pom b/server/pk_generated_parent.pom index 8b613b9..2003d8b 100644 --- a/server/pk_generated_parent.pom +++ b/server/pk_generated_parent.pom @@ -3,7 +3,7 @@ 4.0.0 com.exasol exasol-test-setup-abstraction-server-generated-parent - 0.3.3 + 0.3.4 pom UTF-8 @@ -51,7 +51,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.3.0 + 3.4.0 enforce-maven @@ -71,7 +71,7 @@ org.codehaus.mojo flatten-maven-plugin - 1.4.1 + 1.5.0 true oss @@ -110,7 +110,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0 + 3.1.2 @@ -121,7 +121,7 @@ org.codehaus.mojo versions-maven-plugin - 2.15.0 + 2.16.0 display-updates @@ -139,7 +139,7 @@ org.basepom.maven duplicate-finder-maven-plugin - 1.5.1 + 2.0.1 default @@ -157,7 +157,6 @@ true true false - true true false @@ -165,7 +164,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.5.0 + 3.6.0 src/assembly/all-dependencies.xml @@ -215,7 +214,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0 + 3.1.2 @@ -236,7 +235,7 @@ org.jacoco jacoco-maven-plugin - 0.8.9 + 0.8.10 prepare-agent @@ -277,7 +276,7 @@ com.exasol error-code-crawler-maven-plugin - 1.2.3 + 1.3.0 verify diff --git a/server/pom.xml b/server/pom.xml index c081366..eed52e1 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -1,33 +1,31 @@ - + 4.0.0 com.exasol exasol-test-setup-abstraction-server - 0.3.3 + 0.3.4 Server for the Exasol Test-Setup Abstraction Test setup abstraction backend for Go and other languages. https://github.com/exasol/exasol-test-setup-abstraction-server/ - 5.9.3 + 5.10.0 com.exasol exasol-test-setup-abstraction-java - 2.0.2 + 2.0.4 io.javalin javalin - 5.6.1 + 5.6.2 org.slf4j slf4j-jdk14 - 2.0.7 + 2.0.9 runtime @@ -52,13 +50,13 @@ org.mockito mockito-junit-jupiter - 5.4.0 + 5.6.0 test io.rest-assured rest-assured - 5.3.1 + 5.3.2 test @@ -141,7 +139,7 @@ exasol-test-setup-abstraction-server-generated-parent com.exasol - 0.3.3 + 0.3.4 pk_generated_parent.pom From b4c510e115fc1223056e53644951266f6761ce7b Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 11 Oct 2023 09:47:26 +0200 Subject: [PATCH 02/15] Fix vulnerability in dependencies --- dependencies.md | 159 ++++++++++++++++++----------------- doc/changes/changes_0.3.4.md | 1 + go-client/server.go | 10 ++- server/pom.xml | 10 ++- 4 files changed, 97 insertions(+), 83 deletions(-) diff --git a/dependencies.md b/dependencies.md index bc4d4c8..0692e64 100644 --- a/dependencies.md +++ b/dependencies.md @@ -5,53 +5,54 @@ ### Compile Dependencies -| Dependency | License | -| --------------------------------------- | --------------------------------------------- | -| [exasol-test-setup-abstraction-java][0] | [MIT License][1] | -| [javalin][2] | [The Apache Software License, Version 2.0][3] | +| Dependency | License | +| --------------------------------------- | ------------------------------------------------------------------------------------- | +| [exasol-test-setup-abstraction-java][0] | [MIT License][1] | +| [javalin][2] | [The Apache Software License, Version 2.0][3] | +| [Jetty :: Http Utility][4] | [Eclipse Public License - Version 2.0][5]; [Apache Software License - Version 2.0][6] | ### Test Dependencies | Dependency | License | | ------------------------------ | --------------------------------- | -| [JUnit Jupiter Engine][4] | [Eclipse Public License v2.0][5] | -| [JUnit Jupiter Params][4] | [Eclipse Public License v2.0][5] | -| [Hamcrest][6] | [BSD License 3][7] | -| [mockito-junit-jupiter][8] | [MIT][9] | -| [REST Assured][10] | [Apache 2.0][11] | -| [JUnit5 System Extensions][12] | [Eclipse Public License v2.0][13] | +| [JUnit Jupiter Engine][7] | [Eclipse Public License v2.0][8] | +| [JUnit Jupiter Params][7] | [Eclipse Public License v2.0][8] | +| [Hamcrest][9] | [BSD License 3][10] | +| [mockito-junit-jupiter][11] | [MIT][12] | +| [REST Assured][13] | [Apache 2.0][14] | +| [JUnit5 System Extensions][15] | [Eclipse Public License v2.0][16] | ### Runtime Dependencies | Dependency | License | | -------------------------- | ----------------- | -| [SLF4J JDK14 Provider][14] | [MIT License][15] | +| [SLF4J JDK14 Provider][17] | [MIT License][18] | ### Plugin Dependencies | Dependency | License | | ------------------------------------------------------- | --------------------------------------------- | -| [SonarQube Scanner for Maven][16] | [GNU LGPL 3][17] | -| [Apache Maven Compiler Plugin][18] | [Apache-2.0][19] | -| [Apache Maven Enforcer Plugin][20] | [Apache-2.0][19] | -| [Maven Flatten Plugin][21] | [Apache Software Licenese][19] | -| [Exec Maven Plugin][22] | [Apache License 2][19] | -| [org.sonatype.ossindex.maven:ossindex-maven-plugin][23] | [ASL2][3] | -| [Maven Surefire Plugin][24] | [Apache-2.0][19] | -| [Versions Maven Plugin][25] | [Apache License, Version 2.0][19] | -| [duplicate-finder-maven-plugin Maven Mojo][26] | [Apache License 2.0][11] | -| [Apache Maven Assembly Plugin][27] | [Apache-2.0][19] | -| [Apache Maven JAR Plugin][28] | [Apache License, Version 2.0][19] | -| [Artifact reference checker and unifier][29] | [MIT License][30] | -| [Maven Failsafe Plugin][31] | [Apache-2.0][19] | -| [JaCoCo :: Maven Plugin][32] | [Eclipse Public License 2.0][33] | -| [error-code-crawler-maven-plugin][34] | [MIT License][35] | -| [Reproducible Build Maven Plugin][36] | [Apache 2.0][3] | -| [Maven Clean Plugin][37] | [The Apache Software License, Version 2.0][3] | -| [Maven Resources Plugin][38] | [The Apache Software License, Version 2.0][3] | -| [Maven Install Plugin][39] | [The Apache Software License, Version 2.0][3] | -| [Maven Deploy Plugin][40] | [The Apache Software License, Version 2.0][3] | -| [Maven Site Plugin 3][41] | [The Apache Software License, Version 2.0][3] | +| [SonarQube Scanner for Maven][19] | [GNU LGPL 3][20] | +| [Apache Maven Compiler Plugin][21] | [Apache-2.0][22] | +| [Apache Maven Enforcer Plugin][23] | [Apache-2.0][22] | +| [Maven Flatten Plugin][24] | [Apache Software Licenese][22] | +| [Exec Maven Plugin][25] | [Apache License 2][22] | +| [org.sonatype.ossindex.maven:ossindex-maven-plugin][26] | [ASL2][3] | +| [Maven Surefire Plugin][27] | [Apache-2.0][22] | +| [Versions Maven Plugin][28] | [Apache License, Version 2.0][22] | +| [duplicate-finder-maven-plugin Maven Mojo][29] | [Apache License 2.0][14] | +| [Apache Maven Assembly Plugin][30] | [Apache-2.0][22] | +| [Apache Maven JAR Plugin][31] | [Apache License, Version 2.0][22] | +| [Artifact reference checker and unifier][32] | [MIT License][33] | +| [Maven Failsafe Plugin][34] | [Apache-2.0][22] | +| [JaCoCo :: Maven Plugin][35] | [Eclipse Public License 2.0][5] | +| [error-code-crawler-maven-plugin][36] | [MIT License][37] | +| [Reproducible Build Maven Plugin][38] | [Apache 2.0][3] | +| [Maven Clean Plugin][39] | [The Apache Software License, Version 2.0][3] | +| [Maven Resources Plugin][40] | [The Apache Software License, Version 2.0][3] | +| [Maven Install Plugin][41] | [The Apache Software License, Version 2.0][3] | +| [Maven Deploy Plugin][42] | [The Apache Software License, Version 2.0][3] | +| [Maven Site Plugin 3][43] | [The Apache Software License, Version 2.0][3] | ## Go-client @@ -59,59 +60,61 @@ | Dependency | License | | ---------------------------------- | --------- | -| github.com/exasol/exasol-driver-go | [MIT][42] | +| github.com/exasol/exasol-driver-go | [MIT][44] | ### Test Dependencies | Dependency | License | | --------------------------- | --------- | -| github.com/antchfx/xmlquery | [MIT][43] | -| github.com/stretchr/testify | [MIT][44] | -| gopkg.in/yaml.v3 | [MIT][45] | +| github.com/antchfx/xmlquery | [MIT][45] | +| github.com/stretchr/testify | [MIT][46] | +| gopkg.in/yaml.v3 | [MIT][47] | [0]: https://github.com/exasol/exasol-test-setup-abstraction-java/ [1]: https://github.com/exasol/exasol-test-setup-abstraction-java/blob/main/LICENSE [2]: https://javalin.io/ [3]: http://www.apache.org/licenses/LICENSE-2.0.txt -[4]: https://junit.org/junit5/ -[5]: https://www.eclipse.org/legal/epl-v20.html -[6]: http://hamcrest.org/JavaHamcrest/ -[7]: http://opensource.org/licenses/BSD-3-Clause -[8]: https://github.com/mockito/mockito -[9]: https://github.com/mockito/mockito/blob/main/LICENSE -[10]: http://code.google.com/p/rest-assured -[11]: http://www.apache.org/licenses/LICENSE-2.0.html -[12]: https://github.com/itsallcode/junit5-system-extensions -[13]: http://www.eclipse.org/legal/epl-v20.html -[14]: http://www.slf4j.org -[15]: http://www.opensource.org/licenses/mit-license.php -[16]: http://sonarsource.github.io/sonar-scanner-maven/ -[17]: http://www.gnu.org/licenses/lgpl.txt -[18]: https://maven.apache.org/plugins/maven-compiler-plugin/ -[19]: https://www.apache.org/licenses/LICENSE-2.0.txt -[20]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ -[21]: https://www.mojohaus.org/flatten-maven-plugin/ -[22]: https://www.mojohaus.org/exec-maven-plugin -[23]: https://sonatype.github.io/ossindex-maven/maven-plugin/ -[24]: https://maven.apache.org/surefire/maven-surefire-plugin/ -[25]: https://www.mojohaus.org/versions/versions-maven-plugin/ -[26]: https://basepom.github.io/duplicate-finder-maven-plugin -[27]: https://maven.apache.org/plugins/maven-assembly-plugin/ -[28]: https://maven.apache.org/plugins/maven-jar-plugin/ -[29]: https://github.com/exasol/artifact-reference-checker-maven-plugin/ -[30]: https://github.com/exasol/artifact-reference-checker-maven-plugin/blob/main/LICENSE -[31]: https://maven.apache.org/surefire/maven-failsafe-plugin/ -[32]: https://www.jacoco.org/jacoco/trunk/doc/maven.html -[33]: https://www.eclipse.org/legal/epl-2.0/ -[34]: https://github.com/exasol/error-code-crawler-maven-plugin/ -[35]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE -[36]: http://zlika.github.io/reproducible-build-maven-plugin -[37]: http://maven.apache.org/plugins/maven-clean-plugin/ -[38]: http://maven.apache.org/plugins/maven-resources-plugin/ -[39]: http://maven.apache.org/plugins/maven-install-plugin/ -[40]: http://maven.apache.org/plugins/maven-deploy-plugin/ -[41]: http://maven.apache.org/plugins/maven-site-plugin/ -[42]: https://github.com/exasol/exasol-driver-go/blob/v1.0.0/LICENSE -[43]: https://github.com/antchfx/xmlquery/blob/HEAD/LICENSE -[44]: https://github.com/stretchr/testify/blob/HEAD/LICENSE -[45]: https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE +[4]: https://eclipse.dev/jetty/jetty-http +[5]: https://www.eclipse.org/legal/epl-2.0/ +[6]: https://www.apache.org/licenses/LICENSE-2.0 +[7]: https://junit.org/junit5/ +[8]: https://www.eclipse.org/legal/epl-v20.html +[9]: http://hamcrest.org/JavaHamcrest/ +[10]: http://opensource.org/licenses/BSD-3-Clause +[11]: https://github.com/mockito/mockito +[12]: https://github.com/mockito/mockito/blob/main/LICENSE +[13]: http://code.google.com/p/rest-assured +[14]: http://www.apache.org/licenses/LICENSE-2.0.html +[15]: https://github.com/itsallcode/junit5-system-extensions +[16]: http://www.eclipse.org/legal/epl-v20.html +[17]: http://www.slf4j.org +[18]: http://www.opensource.org/licenses/mit-license.php +[19]: http://sonarsource.github.io/sonar-scanner-maven/ +[20]: http://www.gnu.org/licenses/lgpl.txt +[21]: https://maven.apache.org/plugins/maven-compiler-plugin/ +[22]: https://www.apache.org/licenses/LICENSE-2.0.txt +[23]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ +[24]: https://www.mojohaus.org/flatten-maven-plugin/ +[25]: https://www.mojohaus.org/exec-maven-plugin +[26]: https://sonatype.github.io/ossindex-maven/maven-plugin/ +[27]: https://maven.apache.org/surefire/maven-surefire-plugin/ +[28]: https://www.mojohaus.org/versions/versions-maven-plugin/ +[29]: https://basepom.github.io/duplicate-finder-maven-plugin +[30]: https://maven.apache.org/plugins/maven-assembly-plugin/ +[31]: https://maven.apache.org/plugins/maven-jar-plugin/ +[32]: https://github.com/exasol/artifact-reference-checker-maven-plugin/ +[33]: https://github.com/exasol/artifact-reference-checker-maven-plugin/blob/main/LICENSE +[34]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[35]: https://www.jacoco.org/jacoco/trunk/doc/maven.html +[36]: https://github.com/exasol/error-code-crawler-maven-plugin/ +[37]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE +[38]: http://zlika.github.io/reproducible-build-maven-plugin +[39]: http://maven.apache.org/plugins/maven-clean-plugin/ +[40]: http://maven.apache.org/plugins/maven-resources-plugin/ +[41]: http://maven.apache.org/plugins/maven-install-plugin/ +[42]: http://maven.apache.org/plugins/maven-deploy-plugin/ +[43]: http://maven.apache.org/plugins/maven-site-plugin/ +[44]: https://github.com/exasol/exasol-driver-go/blob/v1.0.0/LICENSE +[45]: https://github.com/antchfx/xmlquery/blob/HEAD/LICENSE +[46]: https://github.com/stretchr/testify/blob/HEAD/LICENSE +[47]: https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE diff --git a/doc/changes/changes_0.3.4.md b/doc/changes/changes_0.3.4.md index 8d814d3..73d9095 100644 --- a/doc/changes/changes_0.3.4.md +++ b/doc/changes/changes_0.3.4.md @@ -16,6 +16,7 @@ Code name: * Updated `com.exasol:exasol-test-setup-abstraction-java:2.0.2` to `2.0.4` * Updated `io.javalin:javalin:5.6.1` to `5.6.2` +* Added `org.eclipse.jetty:jetty-http:11.0.17` #### Runtime Dependency Updates diff --git a/go-client/server.go b/go-client/server.go index 718ee52..95e90cb 100644 --- a/go-client/server.go +++ b/go-client/server.go @@ -81,7 +81,8 @@ func downloadServerIfNotPresent() (string, error) { } func getServerPort(stopped *bool, output *bytes.Buffer, errorStream *bytes.Buffer) (int, error) { - for counter := 0; counter < 500; counter++ { // we need to wait quite long here if the server can't reuse a testcontainer + secondsToWait := 500 + for counter := 0; counter < secondsToWait; counter++ { // we need to wait quite long here if the server can't reuse a testcontainer pattern := regexp.MustCompile("Server running on port: (\\d+)\n") result := pattern.FindSubmatch(output.Bytes()) if len(result) != 0 { @@ -96,17 +97,18 @@ func getServerPort(stopped *bool, output *bytes.Buffer, errorStream *bytes.Buffe time.Sleep(1 * time.Second) } } - return -1, fmt.Errorf("failed to start server. The server did not print a port number. Output: %q, error stream: %q", output, errorStream) + return -1, fmt.Errorf("failed to start server. Server did not print a port number after %d seconds. Output: '%s', Error: '%s'", secondsToWait, output, errorStream) } -func waitForServer(serverProcess *exec.Cmd, errorStream *bytes.Buffer, stopped *bool, stoppedMutex *sync.Mutex) { +func waitForServer(serverProcess *exec.Cmd, errorStream *bytes.Buffer, outputStream *bytes.Buffer, stopped *bool, stoppedMutex *sync.Mutex) { err := serverProcess.Run() if err != nil && !isStopped(stopped, stoppedMutex) { // after we killed the thread we expect an error - fmt.Println(errorStream.String()) + fmt.Printf("failed to start server: %v. Error output: '%s', output stream: '%s'", err, errorStream.String(), outputStream.String()) } stoppedMutex.Lock() *stopped = true stoppedMutex.Unlock() + fmt.Println("Server stopped.") } func isStopped(stopped *bool, stoppedMutex *sync.Mutex) bool { diff --git a/server/pom.xml b/server/pom.xml index eed52e1..748c244 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -21,7 +21,12 @@ javalin 5.6.2 - + + + org.eclipse.jetty + jetty-http + 11.0.17 + org.slf4j slf4j-jdk14 @@ -121,6 +126,9 @@ CVE-2020-36641 is reported to be fixed in aXMLRPC 1.12.1. We use version 1.13.0, so this is a false positive. --> CVE-2020-36641 + + CVE-2023-4586 From 4589ba4f7249a815b74281897fdae32344f3d529 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 11 Oct 2023 09:51:09 +0200 Subject: [PATCH 03/15] Add note about vulnerabilities --- doc/changes/changes_0.3.4.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/changes/changes_0.3.4.md b/doc/changes/changes_0.3.4.md index 73d9095..fe6ed45 100644 --- a/doc/changes/changes_0.3.4.md +++ b/doc/changes/changes_0.3.4.md @@ -4,6 +4,12 @@ Code name: ## Summary +**Note**: This release contains the following third party libraries with vulnerabilities: +* `io.netty:netty-handler`: CVE-2023-4586 CWE-300: Channel Accessible by Non-Endpoint ('Man-in-the-Middle') (6.5); +* `fr.turri:aXMLRPC`: CVE-2020-36641 CWE-611: Improper Restriction of XML External Entity Reference ('XXE') (9.8); + +We assume that these vulnerabilities are not exploitable. + ## Features * ISSUE_NUMBER: description From 4a83ebca06b1b519112529146348005df3acf18b Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 11 Oct 2023 09:51:24 +0200 Subject: [PATCH 04/15] Improve error handling in go client --- go-client/server.go | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/go-client/server.go b/go-client/server.go index 95e90cb..38a2c8b 100644 --- a/go-client/server.go +++ b/go-client/server.go @@ -30,13 +30,13 @@ func startServer(serverVersion string, config Builder) (*serverProcess, error) { args := getServerProcessArguments(serverPath, config) log.Printf("Starting server with arguments %v", args) process := exec.Command("java", args...) - var output, errorStream bytes.Buffer - process.Stdout = &output + var outputStream, errorStream bytes.Buffer + process.Stdout = &outputStream process.Stderr = &errorStream stoppedMutex := &sync.Mutex{} stopped := false - go waitForServer(process, &errorStream, &stopped, stoppedMutex) - port, err := getServerPort(&stopped, &output, &errorStream) + go waitForServer(process, &errorStream, &outputStream, &stopped, stoppedMutex) + port, err := getServerPort(&stopped, &outputStream, &errorStream) if err != nil { return nil, err } @@ -81,8 +81,8 @@ func downloadServerIfNotPresent() (string, error) { } func getServerPort(stopped *bool, output *bytes.Buffer, errorStream *bytes.Buffer) (int, error) { - secondsToWait := 500 - for counter := 0; counter < secondsToWait; counter++ { // we need to wait quite long here if the server can't reuse a testcontainer + startTime := time.Now() + for counter := 0; counter < 500; counter++ { // we need to wait quite long here if the server can't reuse a testcontainer pattern := regexp.MustCompile("Server running on port: (\\d+)\n") result := pattern.FindSubmatch(output.Bytes()) if len(result) != 0 { @@ -97,7 +97,8 @@ func getServerPort(stopped *bool, output *bytes.Buffer, errorStream *bytes.Buffe time.Sleep(1 * time.Second) } } - return -1, fmt.Errorf("failed to start server. Server did not print a port number after %d seconds. Output: '%s', Error: '%s'", secondsToWait, output, errorStream) + duration := time.Now().Sub(startTime) + return -1, fmt.Errorf("failed to start server. Server did not print a port number after %v seconds. Output: '%s', Error: '%s'", duration, output, errorStream) } func waitForServer(serverProcess *exec.Cmd, errorStream *bytes.Buffer, outputStream *bytes.Buffer, stopped *bool, stoppedMutex *sync.Mutex) { From fa8c5e1405163673984ff09d794a2ae0432a57dd Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 11 Oct 2023 09:54:51 +0200 Subject: [PATCH 05/15] Update exasol version --- README.md | 2 +- doc/changes/changes_0.3.4.md | 2 ++ go-client/Builder_test.go | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7db09e9..cf2d148 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ package test import testSetupAbstraction "github.com/exasol/exasol-test-setup-abstraction-server/go-client" func myTest() { - exasol, err := testSetupAbstraction.New().CloudSetupConfigFilePath("myConfig.json").DockerDbVersion("7.1.21").Start() + exasol, err := testSetupAbstraction.New().CloudSetupConfigFilePath("myConfig.json").DockerDbVersion("7.1.23").Start() if err != nil { panic("failed to start test setup") } diff --git a/doc/changes/changes_0.3.4.md b/doc/changes/changes_0.3.4.md index fe6ed45..b826601 100644 --- a/doc/changes/changes_0.3.4.md +++ b/doc/changes/changes_0.3.4.md @@ -4,6 +4,8 @@ Code name: ## Summary +The release also upgrades the default Exasol version to 7.1.23. + **Note**: This release contains the following third party libraries with vulnerabilities: * `io.netty:netty-handler`: CVE-2023-4586 CWE-300: Channel Accessible by Non-Endpoint ('Man-in-the-Middle') (6.5); * `fr.turri:aXMLRPC`: CVE-2020-36641 CWE-611: Improper Restriction of XML External Entity Reference ('XXE') (9.8); diff --git a/go-client/Builder_test.go b/go-client/Builder_test.go index 976c553..d101821 100644 --- a/go-client/Builder_test.go +++ b/go-client/Builder_test.go @@ -9,8 +9,8 @@ import ( ) // Default version specified in exasol-test-setup-abstraction-java -const DEFAULT_EXASOL_VERSION = "7.1.19" -const NON_DEFAULT_EXASOL_VERSION = "7.1.21" +const DEFAULT_EXASOL_VERSION = "7.1.23" +const NON_DEFAULT_EXASOL_VERSION = "7.1.22" type BuilderSuite struct { suite.Suite From c4af6c1ffd609d0f9f5dc6b09a2202b748f63048 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 11 Oct 2023 10:07:27 +0200 Subject: [PATCH 06/15] Adapt test --- go-client/Builder_test.go | 2 +- go-client/server.go | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/go-client/Builder_test.go b/go-client/Builder_test.go index d101821..66f88d9 100644 --- a/go-client/Builder_test.go +++ b/go-client/Builder_test.go @@ -48,7 +48,7 @@ func (suite *BuilderSuite) TestCustomMissingConfigFile() { func (suite *BuilderSuite) TestConfigFileWithInvalidContent() { var err error suite.setup, err = New().CloudSetupConfigFilePath(suite.writeTempFile("invalid json content")).Start() - suite.ErrorContains(err, "failed to start server. The server did not print a port number") + suite.ErrorContains(err, "failed to start server. Server did not print a port number") suite.ErrorContains(err, "E-ETSAS-7: Failed to start server: 'Unexpected char 105 at") suite.Nil(suite.setup) } diff --git a/go-client/server.go b/go-client/server.go index 38a2c8b..2e106af 100644 --- a/go-client/server.go +++ b/go-client/server.go @@ -97,19 +97,18 @@ func getServerPort(stopped *bool, output *bytes.Buffer, errorStream *bytes.Buffe time.Sleep(1 * time.Second) } } - duration := time.Now().Sub(startTime) + duration := time.Since(startTime) return -1, fmt.Errorf("failed to start server. Server did not print a port number after %v seconds. Output: '%s', Error: '%s'", duration, output, errorStream) } func waitForServer(serverProcess *exec.Cmd, errorStream *bytes.Buffer, outputStream *bytes.Buffer, stopped *bool, stoppedMutex *sync.Mutex) { err := serverProcess.Run() if err != nil && !isStopped(stopped, stoppedMutex) { // after we killed the thread we expect an error - fmt.Printf("failed to start server: %v. Error output: '%s', output stream: '%s'", err, errorStream.String(), outputStream.String()) + fmt.Printf("failed to start server: %v. Error output: '%s', output stream: '%s'\n", err, errorStream.String(), outputStream.String()) } stoppedMutex.Lock() *stopped = true stoppedMutex.Unlock() - fmt.Println("Server stopped.") } func isStopped(stopped *bool, stoppedMutex *sync.Mutex) bool { From 84064dc4afd896c5c11efb718e28134ea15ad0cd Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 11 Oct 2023 10:19:18 +0200 Subject: [PATCH 07/15] Improve error handling --- go-client/TestSetupAbstraction.go | 10 +++++----- go-client/download.go | 11 ++++++----- go-client/server.go | 6 +++--- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/go-client/TestSetupAbstraction.go b/go-client/TestSetupAbstraction.go index ff24e7e..7ca6178 100644 --- a/go-client/TestSetupAbstraction.go +++ b/go-client/TestSetupAbstraction.go @@ -50,25 +50,25 @@ func (testSetup *TestSetupAbstraction) makeApiRequest(method string, path string client := http.Client{} req, err := http.NewRequest(method, testSetup.server.serverEndpoint+path, strings.NewReader(payload.Encode())) if err != nil { - return fmt.Errorf("failed to create http request for the server. Cause: %v", err.Error()) + return fmt.Errorf("failed to create http request for the server. Cause: %w", err) } if payload != nil { req.Header.Set("Content-Type", "application/x-www-form-urlencoded") } response, err := client.Do(req) if err != nil { - return fmt.Errorf("failed to execute %v %v from test-setup-abstraction server. Cause %v", method, path, err.Error()) + return fmt.Errorf("failed to execute %v %v from test-setup-abstraction server. Cause %w", method, path, err) } body, err := io.ReadAll(response.Body) if err != nil { - return fmt.Errorf("failed to read response body. Cause %v", err.Error()) + return fmt.Errorf("failed to read response body. Cause %w", err) } if response.StatusCode != 200 { return fmt.Errorf("request failed with status %d (%v). Response: %q", response.StatusCode, response.Status, body) } err = json.Unmarshal(body, &jsonResult) if err != nil { - return fmt.Errorf("invalid JSON response:\n%v\nCause: %v", string(body), err.Error()) + return fmt.Errorf("invalid JSON response:\n%v\nCause: %w", string(body), err) } return nil } @@ -99,7 +99,7 @@ func (testSetup *TestSetupAbstraction) CreateConnectionWithConfig(autocommit boo Autocommit(autocommit). String()) if err != nil { - return nil, fmt.Errorf("failed to connect to the database. Cause %v", err.Error()) + return nil, fmt.Errorf("failed to connect to the database. Cause %w", err) } return connection, nil } diff --git a/go-client/download.go b/go-client/download.go index 36268ad..b9c71f4 100644 --- a/go-client/download.go +++ b/go-client/download.go @@ -12,7 +12,7 @@ func downloadFile(url, localPath string) error { log.Printf("Downloading %q to local path %q...", url, localPath) resp, err := http.Get(url) if err != nil { - return fmt.Errorf("download failed: %v", err.Error()) + return fmt.Errorf("download failed: %w", err) } if resp.StatusCode != 200 { return fmt.Errorf("download of %q failed with status %d: %q", url, resp.StatusCode, resp.Status) @@ -22,15 +22,16 @@ func downloadFile(url, localPath string) error { defer func() { err = out.Close() if err != nil { - panic(fmt.Sprintf("failed to close server file. Cause: %v", err.Error())) + panic(fmt.Sprintf("failed to close server file. Cause: %v", err)) } }() if err != nil { - return fmt.Errorf("failed to create file for: %v", err.Error()) + return fmt.Errorf("failed to create file for: %w", err) } - _, err = io.Copy(out, resp.Body) + fileSize, err := io.Copy(out, resp.Body) if err != nil { - return fmt.Errorf("failed to download from %q to %q: %v", url, localPath, err.Error()) + return fmt.Errorf("failed to download from %q to %q: %w", url, localPath, err) } + log.Printf("File downloaded with size %d bytes", fileSize) return nil } diff --git a/go-client/server.go b/go-client/server.go index 2e106af..b0f0fe6 100644 --- a/go-client/server.go +++ b/go-client/server.go @@ -59,13 +59,13 @@ func getServerProcessArguments(serverPath string, config Builder) []string { func downloadServerIfNotPresent() (string, error) { homeDir, err := os.UserHomeDir() if err != nil { - return "", fmt.Errorf("failed to get home dir. Cause: %v", err.Error()) + return "", fmt.Errorf("failed to get home dir. Cause: %w", err) } serverDir := path.Join(homeDir, ".test-setup-abstraction-server") if _, err := os.Stat(serverDir); os.IsNotExist(err) { err := os.Mkdir(serverDir, 0700) if err != nil { - return "", fmt.Errorf("failed to create directory %q: %v", serverDir, err.Error()) + return "", fmt.Errorf("failed to create directory %q: %w", serverDir, err) } } const serverJar = "exasol-test-setup-abstraction-server-" + serverVersion + ".jar" @@ -123,7 +123,7 @@ func (testSetup *serverProcess) stop() error { testSetup.stoppedMutex.Unlock() err := testSetup.process.Process.Signal(os.Kill) if err != nil { - return fmt.Errorf("failed to stop test-setup-abstraction server. Cause: %v", err.Error()) + return fmt.Errorf("failed to stop test-setup-abstraction server. Cause: %w", err) } return nil } From 84209417e85ea6a501e8e3ad3e3be8937e233722 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 18 Oct 2023 15:31:03 +0200 Subject: [PATCH 08/15] Upgrade dependencies --- .github/workflows/ci-build.yml | 3 +- dependencies.md | 155 ++++++++++++++++----------------- doc/changes/changes_0.3.4.md | 14 ++- go-client/go.mod | 13 +-- go-client/go.sum | 28 +++--- server/pom.xml | 8 +- 6 files changed, 114 insertions(+), 107 deletions(-) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 81e26c0..344c78c 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -25,8 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.19 - id: go + go-version: "1.20" - name: Cache local Maven repository uses: actions/cache@v3 with: diff --git a/dependencies.md b/dependencies.md index 0692e64..938aaef 100644 --- a/dependencies.md +++ b/dependencies.md @@ -5,54 +5,53 @@ ### Compile Dependencies -| Dependency | License | -| --------------------------------------- | ------------------------------------------------------------------------------------- | -| [exasol-test-setup-abstraction-java][0] | [MIT License][1] | -| [javalin][2] | [The Apache Software License, Version 2.0][3] | -| [Jetty :: Http Utility][4] | [Eclipse Public License - Version 2.0][5]; [Apache Software License - Version 2.0][6] | +| Dependency | License | +| --------------------------------------- | --------------------------------------------- | +| [exasol-test-setup-abstraction-java][0] | [MIT License][1] | +| [javalin][2] | [The Apache Software License, Version 2.0][3] | ### Test Dependencies | Dependency | License | | ------------------------------ | --------------------------------- | -| [JUnit Jupiter Engine][7] | [Eclipse Public License v2.0][8] | -| [JUnit Jupiter Params][7] | [Eclipse Public License v2.0][8] | -| [Hamcrest][9] | [BSD License 3][10] | -| [mockito-junit-jupiter][11] | [MIT][12] | -| [REST Assured][13] | [Apache 2.0][14] | -| [JUnit5 System Extensions][15] | [Eclipse Public License v2.0][16] | +| [JUnit Jupiter Engine][4] | [Eclipse Public License v2.0][5] | +| [JUnit Jupiter Params][4] | [Eclipse Public License v2.0][5] | +| [Hamcrest][6] | [BSD License 3][7] | +| [mockito-junit-jupiter][8] | [MIT][9] | +| [REST Assured][10] | [Apache 2.0][11] | +| [JUnit5 System Extensions][12] | [Eclipse Public License v2.0][13] | ### Runtime Dependencies | Dependency | License | | -------------------------- | ----------------- | -| [SLF4J JDK14 Provider][17] | [MIT License][18] | +| [SLF4J JDK14 Provider][14] | [MIT License][15] | ### Plugin Dependencies | Dependency | License | | ------------------------------------------------------- | --------------------------------------------- | -| [SonarQube Scanner for Maven][19] | [GNU LGPL 3][20] | -| [Apache Maven Compiler Plugin][21] | [Apache-2.0][22] | -| [Apache Maven Enforcer Plugin][23] | [Apache-2.0][22] | -| [Maven Flatten Plugin][24] | [Apache Software Licenese][22] | -| [Exec Maven Plugin][25] | [Apache License 2][22] | -| [org.sonatype.ossindex.maven:ossindex-maven-plugin][26] | [ASL2][3] | -| [Maven Surefire Plugin][27] | [Apache-2.0][22] | -| [Versions Maven Plugin][28] | [Apache License, Version 2.0][22] | -| [duplicate-finder-maven-plugin Maven Mojo][29] | [Apache License 2.0][14] | -| [Apache Maven Assembly Plugin][30] | [Apache-2.0][22] | -| [Apache Maven JAR Plugin][31] | [Apache License, Version 2.0][22] | -| [Artifact reference checker and unifier][32] | [MIT License][33] | -| [Maven Failsafe Plugin][34] | [Apache-2.0][22] | -| [JaCoCo :: Maven Plugin][35] | [Eclipse Public License 2.0][5] | -| [error-code-crawler-maven-plugin][36] | [MIT License][37] | -| [Reproducible Build Maven Plugin][38] | [Apache 2.0][3] | -| [Maven Clean Plugin][39] | [The Apache Software License, Version 2.0][3] | -| [Maven Resources Plugin][40] | [The Apache Software License, Version 2.0][3] | -| [Maven Install Plugin][41] | [The Apache Software License, Version 2.0][3] | -| [Maven Deploy Plugin][42] | [The Apache Software License, Version 2.0][3] | -| [Maven Site Plugin 3][43] | [The Apache Software License, Version 2.0][3] | +| [SonarQube Scanner for Maven][16] | [GNU LGPL 3][17] | +| [Apache Maven Compiler Plugin][18] | [Apache-2.0][19] | +| [Apache Maven Enforcer Plugin][20] | [Apache-2.0][19] | +| [Maven Flatten Plugin][21] | [Apache Software Licenese][19] | +| [Exec Maven Plugin][22] | [Apache License 2][19] | +| [org.sonatype.ossindex.maven:ossindex-maven-plugin][23] | [ASL2][3] | +| [Maven Surefire Plugin][24] | [Apache-2.0][19] | +| [Versions Maven Plugin][25] | [Apache License, Version 2.0][19] | +| [duplicate-finder-maven-plugin Maven Mojo][26] | [Apache License 2.0][11] | +| [Apache Maven Assembly Plugin][27] | [Apache-2.0][19] | +| [Apache Maven JAR Plugin][28] | [Apache License, Version 2.0][19] | +| [Artifact reference checker and unifier][29] | [MIT License][30] | +| [Maven Failsafe Plugin][31] | [Apache-2.0][19] | +| [JaCoCo :: Maven Plugin][32] | [Eclipse Public License 2.0][33] | +| [error-code-crawler-maven-plugin][34] | [MIT License][35] | +| [Reproducible Build Maven Plugin][36] | [Apache 2.0][3] | +| [Maven Clean Plugin][37] | [The Apache Software License, Version 2.0][3] | +| [Maven Resources Plugin][38] | [The Apache Software License, Version 2.0][3] | +| [Maven Install Plugin][39] | [The Apache Software License, Version 2.0][3] | +| [Maven Deploy Plugin][40] | [The Apache Software License, Version 2.0][3] | +| [Maven Site Plugin 3][41] | [The Apache Software License, Version 2.0][3] | ## Go-client @@ -60,61 +59,59 @@ | Dependency | License | | ---------------------------------- | --------- | -| github.com/exasol/exasol-driver-go | [MIT][44] | +| github.com/exasol/exasol-driver-go | [MIT][42] | +| github.com/stretchr/testify | [MIT][43] | +| gopkg.in/yaml.v3 | [MIT][44] | ### Test Dependencies | Dependency | License | | --------------------------- | --------- | | github.com/antchfx/xmlquery | [MIT][45] | -| github.com/stretchr/testify | [MIT][46] | -| gopkg.in/yaml.v3 | [MIT][47] | [0]: https://github.com/exasol/exasol-test-setup-abstraction-java/ [1]: https://github.com/exasol/exasol-test-setup-abstraction-java/blob/main/LICENSE [2]: https://javalin.io/ [3]: http://www.apache.org/licenses/LICENSE-2.0.txt -[4]: https://eclipse.dev/jetty/jetty-http -[5]: https://www.eclipse.org/legal/epl-2.0/ -[6]: https://www.apache.org/licenses/LICENSE-2.0 -[7]: https://junit.org/junit5/ -[8]: https://www.eclipse.org/legal/epl-v20.html -[9]: http://hamcrest.org/JavaHamcrest/ -[10]: http://opensource.org/licenses/BSD-3-Clause -[11]: https://github.com/mockito/mockito -[12]: https://github.com/mockito/mockito/blob/main/LICENSE -[13]: http://code.google.com/p/rest-assured -[14]: http://www.apache.org/licenses/LICENSE-2.0.html -[15]: https://github.com/itsallcode/junit5-system-extensions -[16]: http://www.eclipse.org/legal/epl-v20.html -[17]: http://www.slf4j.org -[18]: http://www.opensource.org/licenses/mit-license.php -[19]: http://sonarsource.github.io/sonar-scanner-maven/ -[20]: http://www.gnu.org/licenses/lgpl.txt -[21]: https://maven.apache.org/plugins/maven-compiler-plugin/ -[22]: https://www.apache.org/licenses/LICENSE-2.0.txt -[23]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ -[24]: https://www.mojohaus.org/flatten-maven-plugin/ -[25]: https://www.mojohaus.org/exec-maven-plugin -[26]: https://sonatype.github.io/ossindex-maven/maven-plugin/ -[27]: https://maven.apache.org/surefire/maven-surefire-plugin/ -[28]: https://www.mojohaus.org/versions/versions-maven-plugin/ -[29]: https://basepom.github.io/duplicate-finder-maven-plugin -[30]: https://maven.apache.org/plugins/maven-assembly-plugin/ -[31]: https://maven.apache.org/plugins/maven-jar-plugin/ -[32]: https://github.com/exasol/artifact-reference-checker-maven-plugin/ -[33]: https://github.com/exasol/artifact-reference-checker-maven-plugin/blob/main/LICENSE -[34]: https://maven.apache.org/surefire/maven-failsafe-plugin/ -[35]: https://www.jacoco.org/jacoco/trunk/doc/maven.html -[36]: https://github.com/exasol/error-code-crawler-maven-plugin/ -[37]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE -[38]: http://zlika.github.io/reproducible-build-maven-plugin -[39]: http://maven.apache.org/plugins/maven-clean-plugin/ -[40]: http://maven.apache.org/plugins/maven-resources-plugin/ -[41]: http://maven.apache.org/plugins/maven-install-plugin/ -[42]: http://maven.apache.org/plugins/maven-deploy-plugin/ -[43]: http://maven.apache.org/plugins/maven-site-plugin/ -[44]: https://github.com/exasol/exasol-driver-go/blob/v1.0.0/LICENSE +[4]: https://junit.org/junit5/ +[5]: https://www.eclipse.org/legal/epl-v20.html +[6]: http://hamcrest.org/JavaHamcrest/ +[7]: http://opensource.org/licenses/BSD-3-Clause +[8]: https://github.com/mockito/mockito +[9]: https://github.com/mockito/mockito/blob/main/LICENSE +[10]: http://code.google.com/p/rest-assured +[11]: http://www.apache.org/licenses/LICENSE-2.0.html +[12]: https://github.com/itsallcode/junit5-system-extensions +[13]: http://www.eclipse.org/legal/epl-v20.html +[14]: http://www.slf4j.org +[15]: http://www.opensource.org/licenses/mit-license.php +[16]: http://sonarsource.github.io/sonar-scanner-maven/ +[17]: http://www.gnu.org/licenses/lgpl.txt +[18]: https://maven.apache.org/plugins/maven-compiler-plugin/ +[19]: https://www.apache.org/licenses/LICENSE-2.0.txt +[20]: https://maven.apache.org/enforcer/maven-enforcer-plugin/ +[21]: https://www.mojohaus.org/flatten-maven-plugin/ +[22]: https://www.mojohaus.org/exec-maven-plugin +[23]: https://sonatype.github.io/ossindex-maven/maven-plugin/ +[24]: https://maven.apache.org/surefire/maven-surefire-plugin/ +[25]: https://www.mojohaus.org/versions/versions-maven-plugin/ +[26]: https://basepom.github.io/duplicate-finder-maven-plugin +[27]: https://maven.apache.org/plugins/maven-assembly-plugin/ +[28]: https://maven.apache.org/plugins/maven-jar-plugin/ +[29]: https://github.com/exasol/artifact-reference-checker-maven-plugin/ +[30]: https://github.com/exasol/artifact-reference-checker-maven-plugin/blob/main/LICENSE +[31]: https://maven.apache.org/surefire/maven-failsafe-plugin/ +[32]: https://www.jacoco.org/jacoco/trunk/doc/maven.html +[33]: https://www.eclipse.org/legal/epl-2.0/ +[34]: https://github.com/exasol/error-code-crawler-maven-plugin/ +[35]: https://github.com/exasol/error-code-crawler-maven-plugin/blob/main/LICENSE +[36]: http://zlika.github.io/reproducible-build-maven-plugin +[37]: http://maven.apache.org/plugins/maven-clean-plugin/ +[38]: http://maven.apache.org/plugins/maven-resources-plugin/ +[39]: http://maven.apache.org/plugins/maven-install-plugin/ +[40]: http://maven.apache.org/plugins/maven-deploy-plugin/ +[41]: http://maven.apache.org/plugins/maven-site-plugin/ +[42]: https://github.com/exasol/exasol-driver-go/blob/v1.0.3/LICENSE +[43]: https://github.com/stretchr/testify/blob/v1.8.4/LICENSE +[44]: https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE [45]: https://github.com/antchfx/xmlquery/blob/HEAD/LICENSE -[46]: https://github.com/stretchr/testify/blob/HEAD/LICENSE -[47]: https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE diff --git a/doc/changes/changes_0.3.4.md b/doc/changes/changes_0.3.4.md index b826601..f43b355 100644 --- a/doc/changes/changes_0.3.4.md +++ b/doc/changes/changes_0.3.4.md @@ -23,8 +23,7 @@ We assume that these vulnerabilities are not exploitable. #### Compile Dependency Updates * Updated `com.exasol:exasol-test-setup-abstraction-java:2.0.2` to `2.0.4` -* Updated `io.javalin:javalin:5.6.1` to `5.6.2` -* Added `org.eclipse.jetty:jetty-http:11.0.17` +* Updated `io.javalin:javalin:5.6.1` to `5.6.3` #### Runtime Dependency Updates @@ -48,3 +47,14 @@ We assume that these vulnerabilities are not exploitable. * Updated `org.codehaus.mojo:flatten-maven-plugin:1.4.1` to `1.5.0` * Updated `org.codehaus.mojo:versions-maven-plugin:2.15.0` to `2.16.0` * Updated `org.jacoco:jacoco-maven-plugin:0.8.9` to `0.8.10` + +### Go-client + +#### Compile Dependency Updates + +* Updated `golang:1.19` to `1.20` +* Updated `github.com/exasol/exasol-driver-go:v1.0.0` to `v1.0.3` + +#### Test Dependency Updates + +* Updated `github.com/antchfx/xmlquery:v1.3.17` to `v1.3.18` diff --git a/go-client/go.mod b/go-client/go.mod index 7fc4a5a..3e61405 100644 --- a/go-client/go.mod +++ b/go-client/go.mod @@ -1,13 +1,13 @@ module github.com/exasol/exasol-test-setup-abstraction-server/go-client -go 1.19 +go 1.20 -require github.com/exasol/exasol-driver-go v1.0.0 +require github.com/exasol/exasol-driver-go v1.0.3 require github.com/stretchr/testify v1.8.4 require ( - github.com/antchfx/xmlquery v1.3.17 + github.com/antchfx/xmlquery v1.3.18 gopkg.in/yaml.v3 v3.0.1 ) @@ -19,8 +19,9 @@ require ( github.com/gorilla/websocket v1.5.0 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/net v0.11.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/text v0.10.0 // indirect + github.com/stretchr/objx v0.5.1 // indirect + golang.org/x/net v0.17.0 // indirect + golang.org/x/sync v0.4.0 // indirect + golang.org/x/text v0.13.0 // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect ) diff --git a/go-client/go.sum b/go-client/go.sum index c6b8fd4..5e05d50 100644 --- a/go-client/go.sum +++ b/go-client/go.sum @@ -1,5 +1,5 @@ -github.com/antchfx/xmlquery v1.3.17 h1:d0qWjPp/D+vtRw7ivCwT5ApH/3CkQU8JOeo3245PpTk= -github.com/antchfx/xmlquery v1.3.17/go.mod h1:Afkq4JIeXut75taLSuI31ISJ/zeq+3jG7TunF7noreA= +github.com/antchfx/xmlquery v1.3.18 h1:FSQ3wMuphnPPGJOFhvc+cRQ2CT/rUj4cyQXkJcjOwz0= +github.com/antchfx/xmlquery v1.3.18/go.mod h1:Afkq4JIeXut75taLSuI31ISJ/zeq+3jG7TunF7noreA= github.com/antchfx/xpath v1.2.4 h1:dW1HB/JxKvGtJ9WyVGJ0sIoEcqftV3SqIstujI+B9XY= github.com/antchfx/xpath v1.2.4/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -8,8 +8,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/exasol/error-reporting-go v0.2.0 h1:nKIe4zYiTHbYrKJRlSNJcmGjTJCZredDh5akVHfIbRs= github.com/exasol/error-reporting-go v0.2.0/go.mod h1:lUzRJqKLiSuYpqRUN2LVyj08WeHzhMEC/8Gmgtuqh1Y= -github.com/exasol/exasol-driver-go v1.0.0 h1:+CbB2noe8QDKnzdd4NM2tKAIczyw9prU0Gf5o9+gPqk= -github.com/exasol/exasol-driver-go v1.0.0/go.mod h1:p/saPOXAA5ZX5AtBJ6LuRycJzzGl1XtO7WpgjXjLX8U= +github.com/exasol/exasol-driver-go v1.0.3 h1:Q2rnp8Zlh2Ef8fqjskRNH/3cq/alIsGdSwS7orKF2Nc= +github.com/exasol/exasol-driver-go v1.0.3/go.mod h1:5lkVe9phxZ6u/IYginlXwHXfHxQyHhd2Msa4rMA3Hno= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -25,10 +25,16 @@ github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsK github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.1 h1:4VhoImhV/Bm0ToFkXFi8hXNXwpDRZ/ynw3amt82mzq0= +github.com/stretchr/objx v0.5.1/go.mod h1:/iHQpkQwBD6DLUmQ4pE+s1TXdob1mORJ4/UFdrifcy0= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= @@ -39,12 +45,12 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.11.0 h1:Gi2tvZIJyBtO9SDr1q9h5hEQCp/4L2RQ+ar0qjx2oNU= -golang.org/x/net v0.11.0/go.mod h1:2L/ixqYpgIVXmeoSA/4Lu7BzTG4KIyPIryS4IsOd1oQ= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= +golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -58,8 +64,8 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.10.0 h1:UpjohKhiEgNc0CSauXmwYftY1+LlaC75SJwh0SgCX58= -golang.org/x/text v0.10.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= diff --git a/server/pom.xml b/server/pom.xml index 748c244..9bc3a29 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -19,13 +19,7 @@ io.javalin javalin - 5.6.2 - - - - org.eclipse.jetty - jetty-http - 11.0.17 + 5.6.3 org.slf4j From 6fa906d025c1e309192517a6cddb446a3193d80d Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 18 Oct 2023 16:31:22 +0200 Subject: [PATCH 09/15] Allow configuring a startup timeout --- go-client/Builder.go | 16 +++++++++++++++- go-client/Builder_test.go | 2 +- go-client/server.go | 16 ++++++++++------ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/go-client/Builder.go b/go-client/Builder.go index 25da01b..d6b12d6 100644 --- a/go-client/Builder.go +++ b/go-client/Builder.go @@ -1,13 +1,20 @@ package exasol_test_setup_abstraction_go +import "time" + type Builder struct { configFilePath string dockerDbVersion string + startupTimeout time.Duration } // New creates a new builder that allows creating a new TestSetupAbstraction. func New() Builder { - return Builder{} + return Builder{ + configFilePath: "", + dockerDbVersion: "", + startupTimeout: time.Minute * 6, + } } // CloudSetupConfigFilePath sets the path to the cloud setup config file. @@ -25,6 +32,13 @@ func (c Builder) DockerDbVersion(dockerDbVersion string) Builder { return c } +// StartupTimeout sets the timeout for starting the Exasol test setup. +// This defaults to 6 minutes. +func (c Builder) StartupTimeout(timeout time.Duration) Builder { + c.startupTimeout = timeout + return c +} + // Start launches the test setup using the given configuration. // Don't forget to stop the setup after usage by calling TestSetupAbstraction.Stop(). func (c Builder) Start() (*TestSetupAbstraction, error) { diff --git a/go-client/Builder_test.go b/go-client/Builder_test.go index 66f88d9..e7cff3f 100644 --- a/go-client/Builder_test.go +++ b/go-client/Builder_test.go @@ -10,7 +10,7 @@ import ( // Default version specified in exasol-test-setup-abstraction-java const DEFAULT_EXASOL_VERSION = "7.1.23" -const NON_DEFAULT_EXASOL_VERSION = "7.1.22" +const NON_DEFAULT_EXASOL_VERSION = "8.23.0" type BuilderSuite struct { suite.Suite diff --git a/go-client/server.go b/go-client/server.go index b0f0fe6..678e2c3 100644 --- a/go-client/server.go +++ b/go-client/server.go @@ -36,7 +36,7 @@ func startServer(serverVersion string, config Builder) (*serverProcess, error) { stoppedMutex := &sync.Mutex{} stopped := false go waitForServer(process, &errorStream, &outputStream, &stopped, stoppedMutex) - port, err := getServerPort(&stopped, &outputStream, &errorStream) + port, err := getServerPort(config.startupTimeout, &stopped, &outputStream, &errorStream) if err != nil { return nil, err } @@ -80,10 +80,10 @@ func downloadServerIfNotPresent() (string, error) { return localPath, nil } -func getServerPort(stopped *bool, output *bytes.Buffer, errorStream *bytes.Buffer) (int, error) { +func getServerPort(timeout time.Duration, stopped *bool, output *bytes.Buffer, errorStream *bytes.Buffer) (int, error) { startTime := time.Now() - for counter := 0; counter < 500; counter++ { // we need to wait quite long here if the server can't reuse a testcontainer - pattern := regexp.MustCompile("Server running on port: (\\d+)\n") + pattern := regexp.MustCompile("Server running on port: (\\d+)\n") + for { result := pattern.FindSubmatch(output.Bytes()) if len(result) != 0 { portString := string(result[1]) @@ -93,12 +93,16 @@ func getServerPort(stopped *bool, output *bytes.Buffer, errorStream *bytes.Buffe } return int(port), nil } + duration := time.Since(startTime) + if duration >= timeout { + return -1, fmt.Errorf("failed to start server. Server did not print a port number after %v seconds. Output: '%s', Error: '%s'", duration, output, errorStream) + } if !*stopped { time.Sleep(1 * time.Second) + } else { + return -1, fmt.Errorf("server stopped after %v seconds. Output: '%s', Error: '%s'", duration, output, errorStream) } } - duration := time.Since(startTime) - return -1, fmt.Errorf("failed to start server. Server did not print a port number after %v seconds. Output: '%s', Error: '%s'", duration, output, errorStream) } func waitForServer(serverProcess *exec.Cmd, errorStream *bytes.Buffer, outputStream *bytes.Buffer, stopped *bool, stoppedMutex *sync.Mutex) { From 9a558f9b7586c1bde662493538ee5c0d8efab64e Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 18 Oct 2023 16:49:16 +0200 Subject: [PATCH 10/15] Fix linter warnings --- .golangci.yaml | 29 ++++++++++++++++++++++++++++- go-client/Builder_test.go | 2 +- go-client/TestSetupAbstraction.go | 19 ++++++++++++------- go-client/download.go | 1 + go-client/project_version_test.go | 1 + go-client/server.go | 4 ++-- 6 files changed, 45 insertions(+), 11 deletions(-) diff --git a/.golangci.yaml b/.golangci.yaml index aa826b8..e3ed06c 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -1,3 +1,30 @@ # https://golangci-lint.run/usage/configuration/ linters: - enable-all: false \ No newline at end of file + enable-all: false + presets: + - bugs + - comment + - complexity + - error + - format + - import + - metalinter + - module + - performance + - sql + #- style + - test + - unused + disable: + - gofumpt # "gofmt" is OK for us, no need for stricter rules (https://github.com/mvdan/gofumpt) + - gci # No need to explicitly format imports using GCI (https://github.com/daixiang0/gci) + - depguard # No need to restrict imported packages (https://github.com/OpenPeeDeeP/depguard) + - goerr113 # Using static errors is not necessary (https://github.com/Djarvur/go-err113) + - wrapcheck # Wrapping errors is not necessary (https://github.com/tomarrell/wrapcheck#tldr) + - paralleltest # Running tests in parallel is not possible + + # Fix later + - revive # Many naming issues, may cause breaking changes + - testpackage # Naming of test package causes compile errors in test +run: + tests: true diff --git a/go-client/Builder_test.go b/go-client/Builder_test.go index e7cff3f..80a5558 100644 --- a/go-client/Builder_test.go +++ b/go-client/Builder_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/suite" ) -// Default version specified in exasol-test-setup-abstraction-java +// Default version specified in exasol-test-setup-abstraction-java. const DEFAULT_EXASOL_VERSION = "7.1.23" const NON_DEFAULT_EXASOL_VERSION = "8.23.0" diff --git a/go-client/TestSetupAbstraction.go b/go-client/TestSetupAbstraction.go index 7ca6178..3758993 100644 --- a/go-client/TestSetupAbstraction.go +++ b/go-client/TestSetupAbstraction.go @@ -1,6 +1,7 @@ package exasol_test_setup_abstraction_go import ( + "context" "database/sql" _ "embed" "encoding/json" @@ -47,8 +48,9 @@ func (testSetup *TestSetupAbstraction) GetConnectionInfo() (*ConnectionInfo, err } func (testSetup *TestSetupAbstraction) makeApiRequest(method string, path string, jsonResult interface{}, payload url.Values) error { + //nolint:exhaustruct // default values are OK client := http.Client{} - req, err := http.NewRequest(method, testSetup.server.serverEndpoint+path, strings.NewReader(payload.Encode())) + req, err := http.NewRequestWithContext(context.Background(), method, testSetup.server.serverEndpoint+path, strings.NewReader(payload.Encode())) if err != nil { return fmt.Errorf("failed to create http request for the server. Cause: %w", err) } @@ -59,6 +61,7 @@ func (testSetup *TestSetupAbstraction) makeApiRequest(method string, path string if err != nil { return fmt.Errorf("failed to execute %v %v from test-setup-abstraction server. Cause %w", method, path, err) } + defer response.Body.Close() body, err := io.ReadAll(response.Body) if err != nil { return fmt.Errorf("failed to read response body. Cause %w", err) @@ -73,7 +76,7 @@ func (testSetup *TestSetupAbstraction) makeApiRequest(method string, path string return nil } -// Contains information required for connecting to an exasol database +// Contains information required for connecting to an exasol database. type ConnectionInfo struct { Host string `json:"host"` // Host name Port int `json:"port"` // Port number @@ -121,7 +124,7 @@ func (testSetup *TestSetupAbstraction) MakeDatabaseTcpServiceAccessibleFromLocal // MakeLocalTcpServiceAccessibleFromDatabase makes a local TCP service available from within the Exasol database. // You can use this method for example for accessing a local s3 bucket implementation from inside the Exasol database. // Another example is to connect from UDFs to a debugger running on the test PC. -// Returns the address under which the service is available from within the exasol database (same port) +// Returns the address under which the service is available from within the exasol database (same port). func (testSetup *TestSetupAbstraction) MakeLocalTcpServiceAccessibleFromDatabase(localPort int) (*ServiceAddress, error) { var serviceAddress ServiceAddress err := testSetup.makeApiRequest("POST", "makeLocalTcpServiceAccessibleFromDatabase", &serviceAddress, url.Values{ @@ -148,7 +151,7 @@ func (testSetup *TestSetupAbstraction) MakeTcpServiceAccessibleFromDatabase(serv // UploadFile uploads a local file to the default BucketFS bucket. func (testSetup TestSetupAbstraction) UploadFile(localPath string, remoteName string) error { - return testSetup.makeApiRequest("POST", "bfs/uploadFile", &successResult{}, url.Values{ + return testSetup.makeApiRequest("POST", "bfs/uploadFile", &successResult{Success: true}, url.Values{ "localPath": {localPath}, "remoteName": {remoteName}, }) @@ -156,7 +159,7 @@ func (testSetup TestSetupAbstraction) UploadFile(localPath string, remoteName st // UploadStringContent uploads the given string content to a file in the default BucketFS bucket. func (testSetup TestSetupAbstraction) UploadStringContent(stringContent string, remoteName string) error { - return testSetup.makeApiRequest("POST", "bfs/uploadStringContent", &successResult{}, url.Values{ + return testSetup.makeApiRequest("POST", "bfs/uploadStringContent", &successResult{Success: true}, url.Values{ "stringContent": {stringContent}, "remoteName": {remoteName}, }) @@ -168,6 +171,7 @@ type downloadFileAsStringResult struct { // DownloadFileAsString downloads a file from the default BucketFS bucket. func (testSetup TestSetupAbstraction) DownloadFileAsString(path string) (string, error) { + //nolint:exhaustruct // struct will be filled during unmarshal result := downloadFileAsStringResult{} err := testSetup.makeApiRequest("GET", "bfs/downloadFileAsString?path="+url.QueryEscape(path), &result, url.Values{}) if err != nil { @@ -178,18 +182,19 @@ func (testSetup TestSetupAbstraction) DownloadFileAsString(path string) (string, // DownloadFile downloads a file from the default BucketFS bucket to a local file. func (testSetup TestSetupAbstraction) DownloadFile(remotePath string, localPath string) error { - return testSetup.makeApiRequest("GET", "bfs/downloadFile?remotePath="+url.QueryEscape(remotePath)+"&localPath="+url.QueryEscape(localPath), &successResult{}, url.Values{}) + return testSetup.makeApiRequest("GET", "bfs/downloadFile?remotePath="+url.QueryEscape(remotePath)+"&localPath="+url.QueryEscape(localPath), &successResult{Success: true}, url.Values{}) } // DeleteFile deletes a file from the default BucketFS bucket. func (testSetup TestSetupAbstraction) DeleteFile(path string) error { - return testSetup.makeApiRequest("DELETE", "bfs/deleteFile", &successResult{}, url.Values{ + return testSetup.makeApiRequest("DELETE", "bfs/deleteFile", &successResult{Success: true}, url.Values{ "path": {path}, }) } // ListFiles lists files in the default BucketFS bucket. func (testSetup TestSetupAbstraction) ListFiles(path string) ([]string, error) { + //nolint:exhaustruct // struct will be filled during unmarshal result := &listResult{} err := testSetup.makeApiRequest("GET", "bfs/listFiles?path="+url.QueryEscape(path), result, url.Values{ "path": {path}, diff --git a/go-client/download.go b/go-client/download.go index b9c71f4..f392729 100644 --- a/go-client/download.go +++ b/go-client/download.go @@ -10,6 +10,7 @@ import ( func downloadFile(url, localPath string) error { log.Printf("Downloading %q to local path %q...", url, localPath) + //nolint:gosec,noctx // HTTP request with variable URL is wanted here, omitting context is ok here resp, err := http.Get(url) if err != nil { return fmt.Errorf("download failed: %w", err) diff --git a/go-client/project_version_test.go b/go-client/project_version_test.go index 9f7c022..6164d8d 100644 --- a/go-client/project_version_test.go +++ b/go-client/project_version_test.go @@ -37,6 +37,7 @@ func readProjectKeeperConf(t *testing.T) *projectKeeperConfig { if err != nil { t.Fatalf("failed to read project keeper file: %v", err) } + //nolint:exhaustruct // struct will be filled during unmarshal config := &projectKeeperConfig{} err = yaml.Unmarshal(yamlFile, config) if err != nil { diff --git a/go-client/server.go b/go-client/server.go index 678e2c3..0539d2d 100644 --- a/go-client/server.go +++ b/go-client/server.go @@ -21,14 +21,14 @@ type serverProcess struct { errorStream *bytes.Buffer } -// startServer starts the server in the given version and with the given config file +// startServer starts the server in the given version and with the given config file. func startServer(serverVersion string, config Builder) (*serverProcess, error) { serverPath, err := downloadServerIfNotPresent() if err != nil { return nil, err } args := getServerProcessArguments(serverPath, config) - log.Printf("Starting server with arguments %v", args) + log.Printf("Starting server version %s with arguments %v", serverVersion, args) process := exec.Command("java", args...) var outputStream, errorStream bytes.Buffer process.Stdout = &outputStream From 557ea1b05e45625ecf364565295c26f57af1baf5 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 18 Oct 2023 16:56:40 +0200 Subject: [PATCH 11/15] Add test with too short timeout --- go-client/Builder_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/go-client/Builder_test.go b/go-client/Builder_test.go index 80a5558..890c968 100644 --- a/go-client/Builder_test.go +++ b/go-client/Builder_test.go @@ -4,6 +4,7 @@ import ( "os" "path" "testing" + "time" "github.com/stretchr/testify/suite" ) @@ -48,11 +49,18 @@ func (suite *BuilderSuite) TestCustomMissingConfigFile() { func (suite *BuilderSuite) TestConfigFileWithInvalidContent() { var err error suite.setup, err = New().CloudSetupConfigFilePath(suite.writeTempFile("invalid json content")).Start() - suite.ErrorContains(err, "failed to start server. Server did not print a port number") + suite.ErrorContains(err, "server stopped after") suite.ErrorContains(err, "E-ETSAS-7: Failed to start server: 'Unexpected char 105 at") suite.Nil(suite.setup) } +func (suite *BuilderSuite) TestTimeoutTooShort() { + var err error + suite.setup, err = New().StartupTimeout(time.Second * 1).Start() + suite.ErrorContains(err, "failed to start server. Server did not print a port number after") + suite.Nil(suite.setup) +} + func (suite *BuilderSuite) TestCustomExasolVersion() { var err error suite.setup, err = New().DockerDbVersion(NON_DEFAULT_EXASOL_VERSION).Start() From 261b8fba7aa41b8ff96a3ee059ba9ffa5d015293 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 18 Oct 2023 17:13:48 +0200 Subject: [PATCH 12/15] Add changelog entry --- README.md | 6 +++++- doc/changes/changes_0.3.4.md | 8 +++++--- go-client/Builder.go | 4 ++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cf2d148..9b209ca 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,11 @@ package test import testSetupAbstraction "github.com/exasol/exasol-test-setup-abstraction-server/go-client" func myTest() { - exasol, err := testSetupAbstraction.New().CloudSetupConfigFilePath("myConfig.json").DockerDbVersion("7.1.23").Start() + exasol, err := testSetupAbstraction.New(). + CloudSetupConfigFilePath("myConfig.json"). + DockerDbVersion("7.1.23"). + StartupTimeout(time.Minute * 10). + Start() if err != nil { panic("failed to start test setup") } diff --git a/doc/changes/changes_0.3.4.md b/doc/changes/changes_0.3.4.md index f43b355..c804ce7 100644 --- a/doc/changes/changes_0.3.4.md +++ b/doc/changes/changes_0.3.4.md @@ -1,9 +1,11 @@ -# Exasol Test Setup Abstraction Server 0.3.4, released 2023-??-?? +# Exasol Test Setup Abstraction Server 0.3.4, released 2023-10-19 -Code name: +Code name: Configure startup timeout ## Summary +This release allows configuring the server startup timeout for the Go client. This is useful when the default of 10 minutes is not long enough, e.g. on slow GitHub runners. + The release also upgrades the default Exasol version to 7.1.23. **Note**: This release contains the following third party libraries with vulnerabilities: @@ -14,7 +16,7 @@ We assume that these vulnerabilities are not exploitable. ## Features -* ISSUE_NUMBER: description +* #41: Added configuration for server startup timeout ## Dependency Updates diff --git a/go-client/Builder.go b/go-client/Builder.go index d6b12d6..ac44782 100644 --- a/go-client/Builder.go +++ b/go-client/Builder.go @@ -13,7 +13,7 @@ func New() Builder { return Builder{ configFilePath: "", dockerDbVersion: "", - startupTimeout: time.Minute * 6, + startupTimeout: time.Minute * 10, } } @@ -33,7 +33,7 @@ func (c Builder) DockerDbVersion(dockerDbVersion string) Builder { } // StartupTimeout sets the timeout for starting the Exasol test setup. -// This defaults to 6 minutes. +// This defaults to 10 minutes. func (c Builder) StartupTimeout(timeout time.Duration) Builder { c.startupTimeout = timeout return c From a0cd2541fdc8cf14139963c8493d5112d2a58d96 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Wed, 18 Oct 2023 17:15:24 +0200 Subject: [PATCH 13/15] Mark eclipse config files as generated --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index 0f292c3..c6d9be7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,3 +10,6 @@ server/versionsMavenPluginRules.xml linguist-gene dependencies.md linguist-generated=true doc/changes/changelog.md linguist-generated=true go-client/go.sum linguist-generated=true + +server/.settings/org.eclipse.jdt.core.prefs linguist-generated=true +server/.settings/org.eclipse.jdt.ui.prefs linguist-generated=true From f2f0134c451101066c53c58487c8315a916d4a8f Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Thu, 19 Oct 2023 08:09:45 +0200 Subject: [PATCH 14/15] Free up disk space --- .github/workflows/ci-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 344c78c..c116424 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -13,6 +13,10 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true steps: + - name: Free Disk Space + run: | + sudo rm -rf /usr/local/lib/android + sudo rm -rf /usr/share/dotnet - name: Checkout the repository uses: actions/checkout@v4 with: From c4aa903277095c4c761399dcac679c0a16073843 Mon Sep 17 00:00:00 2001 From: Christoph Pirkl Date: Thu, 19 Oct 2023 11:53:13 +0200 Subject: [PATCH 15/15] Update release notes --- doc/changes/changes_0.3.4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes/changes_0.3.4.md b/doc/changes/changes_0.3.4.md index c804ce7..e385f8e 100644 --- a/doc/changes/changes_0.3.4.md +++ b/doc/changes/changes_0.3.4.md @@ -4,7 +4,7 @@ Code name: Configure startup timeout ## Summary -This release allows configuring the server startup timeout for the Go client. This is useful when the default of 10 minutes is not long enough, e.g. on slow GitHub runners. +This release increases the timeout for starting the server using the Go client from 500s to 10 minutes. This might be necessary in case of a slow machine. The release also allows configuring the timeout. The release also upgrades the default Exasol version to 7.1.23.