-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[CCI] [Extensions] Added the ExtensionActionUtil class #6969
Conversation
Gradle Check (Jenkins) Run Completed with:
|
Needs tests please. |
@dbwiddis why when I want to run Junit test I get an error: Caused by: java.io.EOFException: tried to read: 101 bytes but this stream is limited to: 7
and as I understood that the error occurs when comparing the length of a new byte array and the unicode of the first byte
here is a test version of the test that throws an error:
|
I solved it by adding this code to test:
with this code I set the length for the byte array: |
server/src/main/java/org/opensearch/extensions/action/ExtensionActionUtil.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/extensions/action/ExtensionActionUtil.java
Outdated
Show resolved
Hide resolved
server/src/main/java/org/opensearch/extensions/action/ExtensionActionUtil.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com>
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com>
Gradle Check (Jenkins) Run Completed with:
|
@owaiskazi19 , @ryanbogan can you check this PR |
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
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Gradle check failure is a bwc bug since fixed. Please rebase to main to get gradle check to pass. |
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
@@ Coverage Diff @@
## main #6969 +/- ##
============================================
- Coverage 70.93% 70.76% -0.18%
+ Complexity 56636 56534 -102
============================================
Files 4719 4720 +1
Lines 267559 267590 +31
Branches 39206 39208 +2
============================================
- Hits 189805 189350 -455
- Misses 61714 62243 +529
+ Partials 16040 15997 -43
|
* add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * added new name to tests Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test class renaming Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> --------- Signed-off-by: Kuanysh <kuanysh4646@gmail.com> Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> (cherry picked from commit 2d9a88c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…oject#6969) * add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * added new name to tests Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test class renaming Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> --------- Signed-off-by: Kuanysh <kuanysh4646@gmail.com> Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com>
…oject#6969) * add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * added new name to tests Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test class renaming Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> --------- Signed-off-by: Kuanysh <kuanysh4646@gmail.com> Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> Signed-off-by: Rishab Nahata <rnnahata@amazon.com>
* add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * added new name to tests Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test class renaming Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> --------- Signed-off-by: Kuanysh <kuanysh4646@gmail.com> Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> (cherry picked from commit 2d9a88c) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…oject#6969) * add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtill class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add ExtensionActionUtilTest class Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * add method convertParamsToBytes Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * refactoring Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * added new name to tests Signed-off-by: Kuanysh <kuanysh4646@gmail.com> * code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test code refactoring Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> * test class renaming Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> --------- Signed-off-by: Kuanysh <kuanysh4646@gmail.com> Signed-off-by: Kuanysh <90975457+Kuanysh-kst@users.noreply.github.com> Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Description
In this PR, I add methods to the ExtensionActionUtil class to reduce code repetition
Issues Resolved
opensearch-project/opensearch-sdk-java#607
Check List
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.