Skip to content

Commit

Permalink
Addressed comments
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun kumar Giri <[email protected]>
  • Loading branch information
arjunkumargiri committed Jul 10, 2024
1 parent 0c5df38 commit 58ca7b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public Builder id(String id) {
return this;
}

/**
/**
* Add a tenant ID to this builder
* @param tenantId the tenant id
* @return the updated builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,8 @@ public MachineLearningPlugin(Settings settings) {

@Override
public Collection<Module> createGuiceModules() {
// TODO: SDKClientModule is initialized both in createGuiceModules and createComponents. Unify these
// approaches to prevent multiple instances of SDKClient.
return List.of(new SdkClientModule(null, null));
}

Expand Down Expand Up @@ -464,6 +466,7 @@ public Collection<Object> createComponents(
Settings settings = environment.settings();
Path dataPath = environment.dataFiles()[0];
Path configFile = environment.configFile();
// TODO: Rather than recreating SDKClientModule reuse module created as part of createGuiceModules
ModulesBuilder modules = new ModulesBuilder();
modules.add(new SdkClientModule(client, xContentRegistry));
Injector injector = modules.createInjector();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@

package org.opensearch.ml.action.controller;

import static org.mockito.ArgumentMatchers.*;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.ArgumentMatchers.isA;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.verify;
Expand Down

0 comments on commit 58ca7b6

Please sign in to comment.