-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding multi-tenancy + sdk client related changes to model, model group and connector update #3399
Conversation
25a0a94
to
cb76c34
Compare
UT failed? |
Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
} | ||
|
||
@Test | ||
public void serialization_withOlderVersion_Success() throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about adding a test for mixed versions for bwc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added.
Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* @param excludes fields excluded | ||
* @param listener action listener | ||
*/ | ||
public void getModel(String modelId, String tenantId, String[] includes, String[] excludes, ActionListener<MLModel> listener) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arjunkumargiri check this method
if (source.get(FUNCTION_NAME_FIELD) != null) { | ||
algorithmName = source.get(FUNCTION_NAME_FIELD).toString(); | ||
} else if (source.get(ALGORITHM_FIELD) != null) { | ||
algorithmName = source.get(ALGORITHM_FIELD).toString(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am confused about these two fields FUNCTION_NAME_FIELD
and ALGORITHM_FIELD
, looks like they are both to set algorithm name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is same what we had before:
if (getResponse.getSource() != null && getResponse.getSource().get(ALGORITHM_FIELD) != null) {
algorithmName = getResponse.getSource().get(ALGORITHM_FIELD).toString();
}
if (!TenantAwareHelper | ||
.validateTenantResource(mlFeatureEnabledSetting, tenantId, mlModel.getTenantId(), actionListener)) { | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tenanId
is included in the getDataObjectRequest
, may we not need this validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have this validation to make sure, one tenant is not accessing other tenant's resources.
RestStatus.BAD_REQUEST | ||
) | ||
); | ||
if (isModelNotDeployed(mlModelState)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be else if () to replace the above else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't clearly follow you here.
…up and connector update (#3399) * adding multi-tenancy + sdk client related changes to model, model group and connector update Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * addressed comments Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * addressed more comments + refactored few codes Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> --------- Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> (cherry picked from commit f63b961)
…up and connector update (opensearch-project#3399) * adding multi-tenancy + sdk client related changes to model, model group and connector update Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * addressed comments Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * addressed more comments + refactored few codes Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> --------- Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
…up and connector update (opensearch-project#3399) * adding multi-tenancy + sdk client related changes to model, model group and connector update Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * addressed comments Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * addressed more comments + refactored few codes Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> --------- Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
…up and connector update (opensearch-project#3399) * adding multi-tenancy + sdk client related changes to model, model group and connector update Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * addressed comments Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> * addressed more comments + refactored few codes Signed-off-by: Dhrubo Saha <dhrubo@amazon.com> --------- Signed-off-by: Dhrubo Saha <dhrubo@amazon.com>
Description
[adding multi-tenancy + sdk client related changes to model, model group and connector update]
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.