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

Ensure RestHandler.Wrapper delegates all implementations to the wrapped handler #16154

Merged
merged 4 commits into from
Oct 1, 2024

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Oct 1, 2024

Description

This PR ensures that any instance of RestHandler.Wrapper delegates all implementations to the wrapped handler. This PR also adds a test using reflection to ensure that all methods are delegated to.

There was a recent PR that modified that RestHandler interface without modifying the corresponding RestHandler.Wrapper class so this PR will ensure that tests will fail if RestHandler.Wrapper is not modified as well.

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

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.

…er handler

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks cwperks changed the title Ensure RestHandler.Wrapper delegates all implementations to the wrapper handler Ensure RestHandler.Wrapper delegates all implementations to the wrapped handler Oct 1, 2024
Copy link
Contributor

github-actions bot commented Oct 1, 2024

✅ Gradle check result for 8bde5eb: SUCCESS

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.93%. Comparing base (a767e92) to head (3ec1de4).
Report is 5 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #16154      +/-   ##
============================================
- Coverage     71.98%   71.93%   -0.06%     
+ Complexity    64542    64478      -64     
============================================
  Files          5288     5289       +1     
  Lines        301474   301508      +34     
  Branches      43552    43557       +5     
============================================
- Hits         217024   216882     -142     
- Misses        66657    66845     +188     
+ Partials      17793    17781      -12     

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

@reta reta added backport 2.x Backport to 2.x branch v3.0.0 Issues and PRs related to version 3.0.0 v2.18.0 Issues and PRs related to version 2.18.0 labels Oct 1, 2024
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks
Copy link
Member Author

cwperks commented Oct 1, 2024

Resolved conflicts in CHANGELOG

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Copy link
Contributor

github-actions bot commented Oct 1, 2024

❌ Gradle check result for 3ec1de4: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

github-actions bot commented Oct 1, 2024

✅ Gradle check result for 3ec1de4: SUCCESS

@reta reta merged commit 0b1650d into opensearch-project:main Oct 1, 2024
34 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 1, 2024
…ed handler (#16154)

* Ensure RestHandler.Wrapper delegates all implementations to the wrapper handler

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Fix typo

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 0b1650d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta added a commit that referenced this pull request Oct 2, 2024
…ns to the wrapped handler (#16161)

* Ensure RestHandler.Wrapper delegates all implementations to the wrapped handler (#16154)

* Ensure RestHandler.Wrapper delegates all implementations to the wrapper handler

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Fix typo

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 0b1650d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update RestHandler.java

Signed-off-by: Andriy Redko <andriy.redko@aiven.io>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andriy Redko <andriy.redko@aiven.io>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 16, 2024
…ed handler (opensearch-project#16154)

* Ensure RestHandler.Wrapper delegates all implementations to the wrapper handler

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Fix typo

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 17, 2024
…ed handler (opensearch-project#16154)

* Ensure RestHandler.Wrapper delegates all implementations to the wrapper handler

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Fix typo

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
dk2k pushed a commit to dk2k/OpenSearch that referenced this pull request Oct 21, 2024
…ed handler (opensearch-project#16154)

* Ensure RestHandler.Wrapper delegates all implementations to the wrapper handler

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Fix typo

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@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 v2.18.0 Issues and PRs related to version 2.18.0 v3.0.0 Issues and PRs related to version 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants