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

Expose method to register search strategy routes in query enhancement #8245

Conversation

amsiglan
Copy link
Collaborator

@amsiglan amsiglan commented Sep 19, 2024

Description

If a new search strategy is registered, we need a way to setup its routes for the search interceptor to call. This PR exposes a setup method to be able to define the routes for the provided strategy

Changelog

  • fix: Expose method to register search strategy routes in query enhancement

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

Copy link
Contributor

❌ Invalid Changelog Heading

The '## Changelog' heading in your PR description is either missing or malformed. Please make sure that your PR description includes a '## Changelog' heading with proper spelling, capitalization, spacing, and Markdown syntax.

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.14%. Comparing base (2f36eaf) to head (ab59866).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8245   +/-   ##
=======================================
  Coverage   64.14%   64.14%           
=======================================
  Files        3743     3743           
  Lines       88833    88833           
  Branches    13852    13852           
=======================================
+ Hits        56979    56980    +1     
+ Misses      31239    31238    -1     
  Partials      615      615           
Flag Coverage Δ
Linux_1 30.07% <ø> (ø)
Linux_2 58.86% <ø> (ø)
Linux_3 40.36% <ø> (?)
Linux_4 31.58% <ø> (ø)
Windows_1 30.08% <ø> (ø)
Windows_2 58.81% <ø> (ø)
Windows_3 40.36% <ø> (ø)
Windows_4 31.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

opensearch-changeset-bot bot added a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Sep 19, 2024
Copy link
Contributor

❌ Invalid Changelog Heading

The '## Changelog' heading in your PR description is either missing or malformed. Please make sure that your PR description includes a '## Changelog' heading with proper spelling, capitalization, spacing, and Markdown syntax.

amsiglan pushed a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Sep 20, 2024
@amsiglan amsiglan force-pushed the expose-method-to-register-routes-for-new-search-strategies branch from 96b3ccc to dc34749 Compare September 20, 2024 17:01
@ashwin-pc
Copy link
Member

We merged #8226. Can you rebase on top of the latest changes in main?

@amsiglan amsiglan force-pushed the expose-method-to-register-routes-for-new-search-strategies branch from 513b764 to dc34749 Compare September 20, 2024 23:43
@amsiglan amsiglan force-pushed the expose-method-to-register-routes-for-new-search-strategies branch from dc34749 to 4b96e3c Compare September 20, 2024 23:43
kavilla
kavilla previously approved these changes Sep 21, 2024
Signed-off-by: Amardeepsingh Siglani <[email protected]>
amsiglan pushed a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Sep 21, 2024
amsiglan added a commit that referenced this pull request Sep 21, 2024
…ery enhancement (#8282)

* exposed method to register search strategy routes

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* Changeset file for PR #8245 created/updated

* addressed comment

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* fix linter error

Signed-off-by: Amardeepsingh Siglani <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
@amsiglan amsiglan merged commit f6924a7 into opensearch-project:main Sep 21, 2024
67 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-8245-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f6924a73d0c1ba257e9febfd650bd1f93350401f
# Push it to GitHub
git push --set-upstream origin backport/backport-8245-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

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

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.17 failed:

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

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.17
# Create a new branch
git switch --create backport/backport-8245-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 f6924a73d0c1ba257e9febfd650bd1f93350401f
# Push it to GitHub
git push --set-upstream origin backport/backport-8245-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.17

Then, create a pull request where the base branch is 2.17 and the compare/head branch is backport/backport-8245-to-2.17.

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.

3 participants