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

[Extensions] Handle Deprecated and Replaced Routes in Extension Rest Handlers #7064

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

dbwiddis
Copy link
Member

@dbwiddis dbwiddis commented Apr 9, 2023

Companion PR on SDK: opensearch-project/opensearch-sdk-java#666

Description

Adds the ability to handle Deprecated and Replaced Routes to the ExtensionRestHandler. This will permit (nearly) identical syntax for plugin migration, and provide backwards compatibility to extension users.

  • Routes were already registered.
  • Deprecated routes are just a wrapper around Routes, which add a log message.
  • Replaced routes are a fancy user interface to simultaneously register Routes and Deprecated Routes.

The OpenSearch integration adds a new list to the existing registration request. In addition to the method and path sent for routes, deprecated routes have a deprecationMessage included. This is included in a separate list where the message immediately follows the method/path.

Issues Resolved

Fixes SDK #665

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.

Signed-off-by: Daniel Widdis <widdis@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented Apr 9, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.indices.replication.SegmentReplicationIT.testScrollWithOngoingSegmentReplication
      1 org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testIndexCreateBlockIsRemovedWhenAnyNodesNotExceedHighWatermarkWithAutoReleaseEnabled

@codecov-commenter
Copy link

Codecov Report

Merging #7064 (94623f9) into main (0db20d9) will decrease coverage by 0.14%.
The diff coverage is 81.48%.

📣 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    #7064      +/-   ##
============================================
- Coverage     70.74%   70.61%   -0.14%     
+ Complexity    59329    59281      -48     
============================================
  Files          4825     4825              
  Lines        284369   284390      +21     
  Branches      41021    41024       +3     
============================================
- Hits         201177   200808     -369     
- Misses        66665    67059     +394     
+ Partials      16527    16523       -4     
Impacted Files Coverage Δ
...ch/extensions/rest/RegisterRestActionsRequest.java 69.23% <54.54%> (-0.77%) ⬇️
...rch/extensions/rest/RestSendToExtensionAction.java 41.50% <100.00%> (+9.64%) ⬆️

... and 503 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.

@vibrantvarun
Copy link
Member

LGTM

@ryanbogan ryanbogan merged commit ec92b4b into opensearch-project:main Apr 13, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 13, 2023
Signed-off-by: Daniel Widdis <widdis@gmail.com>
(cherry picked from commit ec92b4b)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@dbwiddis dbwiddis deleted the replaced-routes branch April 13, 2023 05:47
ryanbogan pushed a commit that referenced this pull request Apr 13, 2023
…) (#7140)

(cherry picked from commit ec92b4b)

Signed-off-by: Daniel Widdis <widdis@gmail.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>
austintlee pushed a commit to austintlee/OpenSearch that referenced this pull request Apr 28, 2023
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.

[FEATURE] Add deprecated and replaced route handling
5 participants