Skip to content
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

Merge the existing parameters when updating connectors #2784

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

Zhangxunmt
Copy link
Collaborator

@Zhangxunmt Zhangxunmt commented Jul 29, 2024

Description

This PR fixes the issue reported in #2502. This is not a bug since the issue was an expected behavior based on the initial design of the Update Connector API. However, over time we think that, in the Update APIs, it's a better CX experience to merge the updated parameters with the existing ones.

Also, some details of the sagemaker model for batch inference is added in this PR.

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@b4sjoo b4sjoo added v2.16.0 Issues targeting release v2.16.0 backport 2.16 backport 2.x labels Jul 30, 2024
@@ -287,7 +287,7 @@ public void update(MLCreateConnectorInput updateContent, Function<String, String
this.protocol = updateContent.getProtocol();
}
if (updateContent.getParameters() != null && updateContent.getParameters().size() > 0) {
this.parameters = updateContent.getParameters();
getParameters().putAll(updateContent.getParameters());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add UT and integ test? Seems this logic is not tested, otherwise the change of the behavior should break existing tests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, thanks for the fix

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do in the next PR.

@Zhangxunmt Zhangxunmt merged commit e16f38a into opensearch-project:main Jul 30, 2024
8 of 9 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 30, 2024
* merge the existing parameters when updating connectors

Signed-off-by: Xun Zhang <[email protected]>

* add more details in sagemaker model for batch inference

Signed-off-by: Xun Zhang <[email protected]>

---------

Signed-off-by: Xun Zhang <[email protected]>
(cherry picked from commit e16f38a)
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 30, 2024
* merge the existing parameters when updating connectors

Signed-off-by: Xun Zhang <[email protected]>

* add more details in sagemaker model for batch inference

Signed-off-by: Xun Zhang <[email protected]>

---------

Signed-off-by: Xun Zhang <[email protected]>
(cherry picked from commit e16f38a)
b4sjoo pushed a commit that referenced this pull request Jul 30, 2024
* merge the existing parameters when updating connectors

Signed-off-by: Xun Zhang <[email protected]>

* add more details in sagemaker model for batch inference

Signed-off-by: Xun Zhang <[email protected]>

---------

Signed-off-by: Xun Zhang <[email protected]>
(cherry picked from commit e16f38a)

Co-authored-by: Xun Zhang <[email protected]>
Zhangxunmt added a commit that referenced this pull request Jul 30, 2024
* merge the existing parameters when updating connectors

Signed-off-by: Xun Zhang <[email protected]>

* add more details in sagemaker model for batch inference

Signed-off-by: Xun Zhang <[email protected]>

---------

Signed-off-by: Xun Zhang <[email protected]>
(cherry picked from commit e16f38a)

Co-authored-by: Xun Zhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport 2.16 v2.16.0 Issues targeting release v2.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants