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

Adjust ListTool response format #1887

Merged
merged 2 commits into from
Jan 22, 2024

Conversation

jackiehanyang
Copy link
Collaborator

@jackiehanyang jackiehanyang commented Jan 18, 2024

Description

Adjust ListTool response format to fix Request failed to get to the server (status code: 502) error when calling ListTool API

Also, adjust exception type for GetTool when there's no such tool. Now it returns 404 when no tool found

{
	"error": {
		"root_cause": [
			{
				"type": "status_exception",
				"reason": "Failed to find tool information with the provided tool name: CatIndexTo"
			}
		],
		"type": "status_exception",
		"reason": "Failed to find tool information with the provided tool name: CatIndexTo"
	},
	"status": 404
}

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.

Copy link

codecov bot commented Jan 18, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (38b51f2) 82.63% compared to head (21070c9) 82.63%.
Report is 1 commits behind head on main.

❗ Current head 21070c9 differs from pull request most recent head 682166d. Consider uploading reports for the commit 682166d to get more accurate results

Files Patch % Lines
...rg/opensearch/ml/tools/GetToolTransportAction.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1887      +/-   ##
============================================
- Coverage     82.63%   82.63%   -0.01%     
  Complexity     5391     5391              
============================================
  Files           521      521              
  Lines         21724    21727       +3     
  Branches       2211     2212       +1     
============================================
+ Hits          17952    17954       +2     
- Misses         2873     2874       +1     
  Partials        899      899              
Flag Coverage Δ
ml-commons 82.63% <75.00%> (-0.01%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Jackie Han <[email protected]>
@jackiehanyang jackiehanyang merged commit 54c788a into opensearch-project:main Jan 22, 2024
6 of 10 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 24, 2024
* Adjust ListTool response format

Signed-off-by: Jackie Han <[email protected]>

* cleanup

Signed-off-by: Jackie Han <[email protected]>

---------

Signed-off-by: Jackie Han <[email protected]>
(cherry picked from commit 54c788a)
ylwu-amzn pushed a commit that referenced this pull request Jan 29, 2024
* Adjust ListTool response format

Signed-off-by: Jackie Han <[email protected]>

* cleanup

Signed-off-by: Jackie Han <[email protected]>

---------

Signed-off-by: Jackie Han <[email protected]>
(cherry picked from commit 54c788a)

Co-authored-by: Jackie Han <[email protected]>
austintlee pushed a commit to austintlee/ml-commons that referenced this pull request Mar 19, 2024
* Adjust ListTool response format

Signed-off-by: Jackie Han <[email protected]>

* cleanup

Signed-off-by: Jackie Han <[email protected]>

---------

Signed-off-by: Jackie Han <[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.

3 participants