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

remote inference: add unit test for create connector request/response #1067

Merged
merged 3 commits into from
Jul 11, 2023

Conversation

ylwu-amzn
Copy link
Collaborator

Description

[Describe what this change achieves]

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --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.

@ylwu-amzn ylwu-amzn requested a review from Zhangxunmt July 11, 2023 01:06
Signed-off-by: Yaliang Wu <[email protected]>
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Merging #1067 (1d23685) into 2.x (9095c44) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##                2.x    #1067   +/-   ##
=========================================
  Coverage     77.34%   77.34%           
  Complexity     2054     2054           
=========================================
  Files           167      167           
  Lines          8532     8532           
  Branches        846      846           
=========================================
  Hits           6599     6599           
  Misses         1555     1555           
  Partials        378      378           
Flag Coverage Δ
ml-commons 77.34% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tion/connector/TransportCreateConnectorAction.java 78.12% <100.00%> (ø)
.../action/register/TransportRegisterModelAction.java 96.22% <100.00%> (ø)

Signed-off-by: Yaliang Wu <[email protected]>
@@ -133,12 +149,15 @@ public static MLCreateConnectorInput parse(XContentParser parser) throws IOExcep
case ACCESS_MODE_FIELD:
access = AccessMode.from(parser.text());
break;
case DRY_RUN_FIELD:
dryRun = parser.booleanValue();
Copy link
Collaborator

Choose a reason for hiding this comment

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

dryRun is mandatory in request?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not mandatory, its default value is false, so it's ok to not use optional method.

@ylwu-amzn ylwu-amzn merged commit 1602aea into opensearch-project:2.x Jul 11, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 12, 2023
…#1067)

* remote inference: add unit test for create connector request/response

Signed-off-by: Yaliang Wu <[email protected]>

* fix failed UT

Signed-off-by: Yaliang Wu <[email protected]>

* fix failed UT

Signed-off-by: Yaliang Wu <[email protected]>

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit 1602aea)
rbhavna pushed a commit that referenced this pull request Jul 12, 2023
…#1067) (#1082)

* remote inference: add unit test for create connector request/response

Signed-off-by: Yaliang Wu <[email protected]>

* fix failed UT

Signed-off-by: Yaliang Wu <[email protected]>

* fix failed UT

Signed-off-by: Yaliang Wu <[email protected]>

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit 1602aea)

Co-authored-by: Yaliang Wu <[email protected]>
zane-neo pushed a commit to zane-neo/ml-commons that referenced this pull request Sep 1, 2023
…opensearch-project#1067)

* remote inference: add unit test for create connector request/response

Signed-off-by: Yaliang Wu <[email protected]>

* fix failed UT

Signed-off-by: Yaliang Wu <[email protected]>

* fix failed UT

Signed-off-by: Yaliang Wu <[email protected]>

---------

Signed-off-by: Yaliang Wu <[email protected]>
zane-neo pushed a commit that referenced this pull request Sep 1, 2023
…#1067)

* remote inference: add unit test for create connector request/response

Signed-off-by: Yaliang Wu <[email protected]>

* fix failed UT

Signed-off-by: Yaliang Wu <[email protected]>

* fix failed UT

Signed-off-by: Yaliang Wu <[email protected]>

---------

Signed-off-by: Yaliang Wu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants