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

Match Rest Path registry with RestController using SDKMethodHandlers #658

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

dbwiddis
Copy link
Member

@dbwiddis dbwiddis commented Apr 7, 2023

Description

Changes the ExtensionRestPathRegistry to store paths in the trie in exactly the same way as the RestController. While the previous behavior probably accomplished that goal, this method removes any doubt.

Issues Resolved

Attempted to address #654 but revealed that the bug was in failure to use replaced routes; that will be addressed in #355.

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.

@codecov-commenter
Copy link

codecov-commenter commented Apr 7, 2023

Codecov Report

Merging #658 (45839d1) into main (a7a8164) will increase coverage by 0.00%.
The diff coverage is 73.68%.

📣 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     #658   +/-   ##
=========================================
  Coverage     64.17%   64.17%           
- Complexity      269      274    +5     
=========================================
  Files            54       55    +1     
  Lines          1150     1164   +14     
  Branches         35       38    +3     
=========================================
+ Hits            738      747    +9     
- Misses          401      404    +3     
- Partials         11       13    +2     
Impacted Files Coverage Δ
...main/java/org/opensearch/sdk/ExtensionsRunner.java 77.22% <ø> (ø)
...rch/sdk/handlers/ExtensionsRestRequestHandler.java 40.00% <ø> (ø)
...ava/org/opensearch/sdk/rest/SDKMethodHandlers.java 69.23% <69.23%> (ø)
...opensearch/sdk/rest/ExtensionRestPathRegistry.java 90.90% <83.33%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@dbwiddis dbwiddis force-pushed the method-handlers branch 2 times, most recently from 8261537 to aa275ee Compare April 7, 2023 16:56
@owaiskazi19 owaiskazi19 merged commit 94618e0 into opensearch-project:main Apr 7, 2023
@opensearch-trigger-bot
Copy link

The backport to 1.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-1.x 1.x
# Navigate to the new working tree
pushd ../.worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-658-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 94618e06c5dde526f009f11d43a0d61259be2626
# Push it to GitHub
git push --set-upstream origin backport/backport-658-to-1.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-1.x

Then, create a pull request where the base branch is 1.x and the compare/head branch is backport/backport-658-to-1.x.

@opensearch-trigger-bot
Copy link

The backport to 1.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/backport-1.x 1.x
# Navigate to the new working tree
pushd ../.worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-658-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 94618e06c5dde526f009f11d43a0d61259be2626
# Push it to GitHub
git push --set-upstream origin backport/backport-658-to-1.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/backport-1.x

Then, create a pull request where the base branch is 1.x and the compare/head branch is backport/backport-658-to-1.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants