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

Add initial server route; add core & route services #27

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

ohltyler
Copy link
Member

Description

This PR sets up more of the server-side infrastructure, and adds an initial OpenSearch route to search an index. This also sets up the client-side APIs to the server, and sets up a RouteService which can be used in components. This service is bootstrapped in the plugin's setup() lifecycle and exposed as a service to be used in downstream React components.

This PR also removes the CoreServicesContext approach to expose core services; instead, we set CoreStart as an exposed service just like RouteService, and then fetch any core services when needed via getCore() call. This follows the strategy used by existing core OSD plugins, and is a clean way to determine the required plugin dependencies and a consistent way to access them.

Testing:

  • confirmed route works and returns 200s
  • confirmed core services work as expected (breadcrumbs, notifications, etc.)
  • no unit tests added yet

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
  • Commits are signed per the DCO using --signoff

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: Tyler Ohlsen <ohltyler@amazon.com>
@ohltyler ohltyler merged commit 9991af8 into opensearch-project:main Sep 12, 2023
7 checks passed
@ohltyler ohltyler deleted the server-config branch September 12, 2023 20:09
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 12, 2023
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
(cherry picked from commit 9991af8)
ohltyler added a commit that referenced this pull request Sep 12, 2023
Signed-off-by: Tyler Ohlsen <ohltyler@amazon.com>
(cherry picked from commit 9991af8)

Co-authored-by: Tyler Ohlsen <ohltyler@amazon.com>
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