Skip to content

Commit

Permalink
adding tenantId for inline connector in model registration (#3531) (#…
Browse files Browse the repository at this point in the history
…3538)

Signed-off-by: Dhrubo Saha <[email protected]>
(cherry picked from commit d224d7a)

Co-authored-by: Dhrubo Saha <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and dhrubo-os authored Feb 12, 2025
1 parent f9a8a70 commit 5e4f953
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ private void doRegister(MLRegisterModelInput registerModelInput, ActionListener<
log.error(e.getMessage(), e);
listener.onFailure(e);
});
MLCreateConnectorRequest mlCreateConnectorRequest = createDryRunConnectorRequest();
MLCreateConnectorRequest mlCreateConnectorRequest = createDryRunConnectorRequest(registerModelInput.getTenantId());
client.execute(MLCreateConnectorAction.INSTANCE, mlCreateConnectorRequest, dryRunResultListener);
}
} else {
Expand All @@ -339,8 +339,9 @@ private void createModelGroup(MLRegisterModelInput registerModelInput, ActionLis
}
}

private MLCreateConnectorRequest createDryRunConnectorRequest() {
private MLCreateConnectorRequest createDryRunConnectorRequest(final String tenantId) {
MLCreateConnectorInput createConnectorInput = MLCreateConnectorInput.builder().dryRun(true).build();
createConnectorInput.setTenantId(tenantId);
return new MLCreateConnectorRequest(createConnectorInput);
}

Expand Down

0 comments on commit 5e4f953

Please sign in to comment.