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

[Multiple Datasource] Export DataSourcePluginRequestContext at top level for plugins to use #6108

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

BionIT
Copy link
Collaborator

@BionIT BionIT commented Mar 11, 2024

Description

This change export DataSourcePluginRequestContext at top level for external plugins to consume

Issues Resolved

Fixes #6045

Screenshot

type.mp4

Testing the changes

The following were performed in the recording:

  1. add dataSource with type exported from data source plugin into external plugin
  2. go to the handler, should not see compiler error, and then go to the reference will route to the current type

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

Signed-off-by: Lu Yu <nluyu@amazon.com>
BionIT added 2 commits March 11, 2024 16:47
Signed-off-by: Lu Yu <nluyu@amazon.com>
Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.15%. Comparing base (735424b) to head (1264362).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6108      +/-   ##
==========================================
+ Coverage   67.13%   67.15%   +0.01%     
==========================================
  Files        3324     3324              
  Lines       64318    64318              
  Branches    10344    10344              
==========================================
+ Hits        43178    43190      +12     
+ Misses      18617    18605      -12     
  Partials     2523     2523              
Flag Coverage Δ
Linux_1 31.66% <ø> (ø)
Linux_2 55.23% <ø> (ø)
Linux_3 44.70% <ø> (+0.01%) ⬆️
Linux_4 35.08% <ø> (ø)
Windows_1 31.71% <ø> (+0.02%) ⬆️
Windows_2 55.20% <ø> (ø)
Windows_3 44.70% <ø> (ø)
Windows_4 35.08% <ø> (ø)

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.

@@ -20,4 +20,8 @@ export function plugin(initializerContext: PluginInitializerContext) {
return new DataSourcePlugin(initializerContext);
}

export { DataSourcePluginSetup, DataSourcePluginStart } from './types';
export {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the only location need to add requestcontext? Thanks

@BionIT BionIT merged commit ead2947 into opensearch-project:main Mar 11, 2024
76 of 77 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 11, 2024
…vel for plugins to use (#6108)

* export context as top level

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add changelog

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
(cherry picked from commit ead2947)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
BionIT pushed a commit that referenced this pull request Mar 11, 2024
…vel for plugins to use (#6108) (#6111)

* export context as top level

Signed-off-by: Lu Yu <nluyu@amazon.com>

* add changelog

Signed-off-by: Lu Yu <nluyu@amazon.com>

---------

Signed-off-by: Lu Yu <nluyu@amazon.com>
(cherry picked from commit ead2947)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.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.

Export correct types for RequestHandlerContext.dataSource for plugins
4 participants