Skip to content

Fix DelegatingRestHandlerTests#4434

Merged
reta merged 1 commit into
opensearch-project:mainfrom
reta:fix.rest.handler
Jun 11, 2024
Merged

Fix DelegatingRestHandlerTests#4434
reta merged 1 commit into
opensearch-project:mainfrom
reta:fix.rest.handler

Conversation

@reta
Copy link
Copy Markdown
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
Copy Markdown
Collaborator Author

reta commented Jun 11, 2024

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

@codecov
Copy link
Copy Markdown

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
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
Copy Markdown
Member

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

@reta
Copy link
Copy Markdown
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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants