From b9cfbd22d61cacbf3765bb75bd8cdb6a224d3260 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 12:19:20 +0000 Subject: [PATCH 1/2] Bump softprops/action-gh-release from 2.0.4 to 2.0.5 Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.4 to 2.0.5. - [Release notes](https://github.com/softprops/action-gh-release/releases) - [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md) - [Commits](https://github.com/softprops/action-gh-release/compare/v2.0.4...v2.0.5) --- updated-dependencies: - dependency-name: softprops/action-gh-release dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/preview.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index a1a923350..deb04aaa5 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -141,7 +141,7 @@ jobs: # https://github.com/softprops/action-gh-release - name: create github release - uses: softprops/action-gh-release@v2.0.4 + uses: softprops/action-gh-release@v2.0.5 if: startsWith(github.ref, 'refs/tags/') with: # body: ${{ steps.prepare_summary.outputs.release_summary }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2eef099fa..5f4257d07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -126,7 +126,7 @@ jobs: # https://github.com/softprops/action-gh-release - name: create github release - uses: softprops/action-gh-release@v2.0.4 + uses: softprops/action-gh-release@v2.0.5 if: startsWith(github.ref, 'refs/tags/') with: # body: ${{ steps.prepare_summary.outputs.release_summary }} From ded4a7a32cac0ea6e3c195fdd49622d95a3775dd Mon Sep 17 00:00:00 2001 From: Jonathan Shook Date: Wed, 5 Jun 2024 13:31:09 -0500 Subject: [PATCH 2/2] minor adjustments to milvus adapter --- mvn-defaults/pom.xml | 16 ++++++++++- nb-adapters/adapter-milvus/pom.xml | 17 +++++++++++ .../adapter/milvus/MilvusSpace.java | 28 ++++++++++--------- .../adapter/qdrant/QdrantSpace.java | 2 +- 4 files changed, 48 insertions(+), 15 deletions(-) diff --git a/mvn-defaults/pom.xml b/mvn-defaults/pom.xml index 9ff9eb0e6..4a3e01b5b 100644 --- a/mvn-defaults/pom.xml +++ b/mvn-defaults/pom.xml @@ -392,6 +392,13 @@ 1.0-1 + + org.apache.logging.log4j + log4j-slf4j-impl + 2.23.1 + + + @@ -405,15 +412,22 @@ 2.23.1 + + org.apache.logging.log4j + log4j-api + 2.23.1 + + org.apache.logging.log4j log4j-core 2.23.1 + org.apache.logging.log4j log4j-slf4j-impl - 2.23.1 + diff --git a/nb-adapters/adapter-milvus/pom.xml b/nb-adapters/adapter-milvus/pom.xml index a2b9b7909..cde4ea169 100644 --- a/nb-adapters/adapter-milvus/pom.xml +++ b/nb-adapters/adapter-milvus/pom.xml @@ -52,11 +52,28 @@ protobuf-java-util 3.25.3 + + + + + + + io.milvus milvus-sdk-java 2.4.1 + + log4j + log4j + 1.2.17 + + + org.apache.logging.log4j + log4j-slf4j-impl + + diff --git a/nb-adapters/adapter-milvus/src/main/java/io/nosqlbench/adapter/milvus/MilvusSpace.java b/nb-adapters/adapter-milvus/src/main/java/io/nosqlbench/adapter/milvus/MilvusSpace.java index d212c495e..2353e244c 100644 --- a/nb-adapters/adapter-milvus/src/main/java/io/nosqlbench/adapter/milvus/MilvusSpace.java +++ b/nb-adapters/adapter-milvus/src/main/java/io/nosqlbench/adapter/milvus/MilvusSpace.java @@ -31,6 +31,7 @@ import java.nio.file.Paths; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Optional; /** * The MilvusSpace class is a context object which stores all stateful contextual information needed to interact @@ -51,8 +52,10 @@ public class MilvusSpace implements AutoCloseable { * Create a new MilvusSpace Object which stores all stateful contextual information needed to interact * with the Milvus/Zilliz database instance. * - * @param name The name of this space - * @param cfg The configuration ({@link NBConfiguration}) for this nb run + * @param name + * The name of this space + * @param cfg + * The configuration ({@link NBConfiguration}) for this nb run */ public MilvusSpace(String name, NBConfiguration cfg) { this.name = name; @@ -72,7 +75,7 @@ public class MilvusSpace implements AutoCloseable { cfg.getOptional("database_name").ifPresent(builder::withDatabaseName); cfg.getOptional("database").ifPresent(builder::withDatabaseName); - var requiredToken = cfg.getOptional("token_file") + cfg.getOptional("token_file") .map(Paths::get) .map( tokenFilePath -> { @@ -84,16 +87,15 @@ public class MilvusSpace implements AutoCloseable { throw new RuntimeException(e); } } - ).orElseGet( - () -> cfg.getOptional("token") - .orElseThrow(() -> new RuntimeException("You must provide either a token_file or a token to " + - "configure a Milvus/Zilliz client")) - ); - builder = builder.withToken(requiredToken); + ).or(() -> cfg.getOptional("token")) + .ifPresent(builder::withToken); +// builder = builder.withToken(optionalToken); ConnectParam connectParams = builder.build(); + String tokenSummary = Optional.ofNullable(builder.getToken()) + .map(MilvusAdapterUtils::maskDigits).orElse("[none]"); logger.info("{}: Creating new Milvus/Zilliz Client with (masked) token [{}], uri/endpoint [{}]", - this.name, MilvusAdapterUtils.maskDigits(builder.getToken()), builder.getUri()); + this.name, tokenSummary, builder.getUri()); return new MilvusServiceClient(connectParams); } @@ -101,11 +103,11 @@ public class MilvusSpace implements AutoCloseable { return ConfigModel.of(MilvusSpace.class) .add( - Param.optional("token_file", String.class, "the file to load the token from") + Param.optional("token_file", String.class, "the file to load the token from (try root:Milvus within)") ) .add( - Param.defaultTo("token", "root:Milvus") - .setDescription("the Milvus/Zilliz token to use to connect to the database") + Param.optional("token") + .setDescription("the Milvus/Zilliz token to use to connect to the database (try root:Milvus)") ) .add( Param.defaultTo("uri", "127.0.0.1:19530") diff --git a/nb-adapters/adapter-qdrant/src/main/java/io/nosqlbench/adapter/qdrant/QdrantSpace.java b/nb-adapters/adapter-qdrant/src/main/java/io/nosqlbench/adapter/qdrant/QdrantSpace.java index 0cf30bcfd..e9bff9856 100644 --- a/nb-adapters/adapter-qdrant/src/main/java/io/nosqlbench/adapter/qdrant/QdrantSpace.java +++ b/nb-adapters/adapter-qdrant/src/main/java/io/nosqlbench/adapter/qdrant/QdrantSpace.java @@ -72,7 +72,7 @@ public class QdrantSpace implements AutoCloseable { boolean useTls = cfg.getOptional("use_tls").map(Boolean::parseBoolean).orElse(true); var builder = QdrantGrpcClient.newBuilder(uri, grpcPort, useTls); - var requiredToken = cfg.getOptional("token_file") + var Optional = cfg.getOptional("token_file") .map(Paths::get) .map( tokenFilePath -> {