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

Make verifier return type as ActionResponse #7167

Merged
merged 1 commit into from
May 1, 2023

Conversation

heemin32
Copy link
Contributor

Description

According to the comment, verifier should return either a subclass of ActionResponse or null. With previous signature, it can only return null. This commit allows the verifier to return a subclass of ActionResponse so that test case can return a desired ActionResponse.

Issues Resolved

N/A

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
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

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.

@heemin32
Copy link
Contributor Author

A change in test code. CHANGELOG update is not required.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@dblock
Copy link
Member

dblock commented Apr 18, 2023

@heemin32 please look at gradle check changes?

@heemin32
Copy link
Contributor Author

Test failed with com.amazonaws.SdkClientException: Unable to execute HTTP request: Read timed out. Seems like transient issue. Let me rebase the code and see if it pass.

Signed-off-by: Heemin Kim <heemin@amazon.com>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@codecov-commenter
Copy link

Codecov Report

Merging #7167 (0da7b32) into main (c1026e3) will decrease coverage by 0.03%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff              @@
##               main    #7167      +/-   ##
============================================
- Coverage     70.63%   70.60%   -0.03%     
- Complexity    59480    59482       +2     
============================================
  Files          4859     4859              
  Lines        285492   285492              
  Branches      41143    41143              
============================================
- Hits         201645   201564      -81     
- Misses        67270    67344      +74     
- Partials      16577    16584       +7     
Impacted Files Coverage Δ
...a/org/opensearch/test/rest/RestActionTestCase.java 79.31% <ø> (ø)

... and 469 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@heemin32
Copy link
Contributor Author

@dblock Could you review?

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

Are you going to use this in a future PR or another repo? Seems innocent enough so we can merge, but maybe next time also bring the new usage in in the same place.

@dblock dblock merged commit 8386d10 into opensearch-project:main May 1, 2023
@dblock dblock added the backport 2.x Backport to 2.x branch label May 1, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 1, 2023
Signed-off-by: Heemin Kim <heemin@amazon.com>
(cherry picked from commit 8386d10)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@heemin32
Copy link
Contributor Author

heemin32 commented May 1, 2023

One example where return value is needed. https://github.com/opensearch-project/geospatial/pull/271/files#diff-f8b944446745642b4f5a7cb15be03faa0045246ee03fb3b99f006b941d04049aR214

Without return value, cannot test the code in listener unless we extract that part as a separate method and make it as visible for testing.

@heemin32 heemin32 deleted the bug-fix branch May 1, 2023 15:53
dblock pushed a commit that referenced this pull request May 1, 2023
(cherry picked from commit 8386d10)

Signed-off-by: Heemin Kim <heemin@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@dblock
Copy link
Member

dblock commented May 1, 2023

Thanks @heemin32. If you think it's useful, consider adding something in this repo so that we don't break it in the future.

shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
Signed-off-by: Heemin Kim <heemin@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants