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

Fix DelegatingRestHandlerTests #4434

Merged
merged 1 commit into from
Jun 11, 2024
Merged

Conversation

reta
Copy link
Collaborator

@reta reta commented Jun 11, 2024

Description

Fix DelegatingRestHandlerTests

Issues Resolved

Caused by opensearch-project/OpenSearch#13772

Is this a backport? If so, please add backport PR # and/or commits #

Testing

N/A

Check List

  • New functionality includes testing
  • New functionality has been documented
  • 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.

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
@reta
Copy link
Collaborator Author

reta commented Jun 11, 2024

Come up in #4432 (comment) , thanks to @nibix

Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.44%. Comparing base (0aed8f9) to head (1fd98c6).
Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4434      +/-   ##
==========================================
+ Coverage   65.42%   65.44%   +0.02%     
==========================================
  Files         310      312       +2     
  Lines       22013    22042      +29     
  Branches     3556     3559       +3     
==========================================
+ Hits        14401    14426      +25     
- Misses       5841     5843       +2     
- Partials     1771     1773       +2     
Files Coverage Δ
...nsearch/security/filter/DelegatingRestHandler.java 93.33% <100.00%> (+0.47%) ⬆️

... and 2 files with indirect coverage changes

@reta reta merged commit 8c722f6 into opensearch-project:main Jun 11, 2024
83 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 11, 2024
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
(cherry picked from commit 8c722f6)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@peternied
Copy link
Member

What do you think about moving the delegating handler into core so this is avoided in future iterations?

@reta
Copy link
Collaborator Author

reta commented Jun 11, 2024

What do you think about moving the delegating handler into core so this is avoided in future iterations?

@peternied core has nothing to do with this change: in core the change is non-breaking and adds default method to RestHandler. The security plugin uses own DelegatingRestHandler and reflection APIs to check all RestHandler methods are "intercepted", the alternative here would be to use generated proxy (instead of hardcoded DelegatingRestHandler) in the security plugin.

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants