Skip to content

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.

Signed-off-by: Craig Perkins <[email protected]>
@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
@github-actions
Copy link
Contributor

github-actions bot commented Oct 1, 2024

✅ Gradle check result for 8bde5eb: SUCCESS

@codecov
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
@cwperks
Copy link
Member Author

cwperks commented Oct 1, 2024

Resolved conflicts in CHANGELOG

Signed-off-by: Craig Perkins <[email protected]>
@github-actions
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?

@github-actions
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 <[email protected]>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <[email protected]>

* Fix typo

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
(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 <[email protected]>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <[email protected]>

* Fix typo

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
(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 <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Andriy Redko <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andriy Redko <[email protected]>
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 <[email protected]>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <[email protected]>

* Fix typo

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
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 <[email protected]>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <[email protected]>

* Fix typo

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
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 <[email protected]>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <[email protected]>

* Fix typo

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
akolarkunnu pushed a commit to akolarkunnu/OpenSearch that referenced this pull request Jan 21, 2025
…ed handler (opensearch-project#16154)

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

Signed-off-by: Craig Perkins <[email protected]>

* Add to CHANGELOG

Signed-off-by: Craig Perkins <[email protected]>

* Fix typo

Signed-off-by: Craig Perkins <[email protected]>

---------

Signed-off-by: Craig Perkins <[email protected]>
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