-
Notifications
You must be signed in to change notification settings - Fork 885
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
[Discover] Data selector enhancement #6571
[Discover] Data selector enhancement #6571
Conversation
ℹ️ Manual Changeset Creation ReminderPlease ensure manual commit for changeset file 6571.yml under folder changelogs/fragments to complete this PR. If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link. For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool. |
❌ Changeset File Not Added YetPlease ensure manual commit for changeset file 6571.yml under folder changelogs/fragments to complete this PR. File still missing. |
535f64d
to
9045b7a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6571 +/- ##
=======================================
Coverage 67.73% 67.74%
=======================================
Files 3415 3417 +2
Lines 66851 66887 +36
Branches 10874 10878 +4
=======================================
+ Hits 45282 45312 +30
- Misses 18923 18926 +3
- Partials 2646 2649 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
9045b7a
to
03fae8b
Compare
src/plugins/data/public/data_sources/register_default_datasource.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
03fae8b
to
9005834
Compare
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric Wei <menwe@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link is not failing because of this PR. All good to me
Signed-off-by: Eric <menwe@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you outline in the PR description what exactly this change is about? Currently it looks like this addresses all the feedback from the previous PR and closes the Data Sources issue. However i see in here that S3 and Spark data sources are still hard coded and the registration function is still not generic enough to handle future data sources.
import { i18n } from '@osd/i18n'; | ||
import { DataSourceUIGroupType } from './datasource/types'; | ||
|
||
export const S3_GLUE_DATA_SOURCE_DISPLAY_NAME = 'Amazon S3'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we still hard coding these? Is there a plan to remove them?
src/plugins/data/public/data_sources/datasource_services/datasource_service.ts
Outdated
Show resolved
Hide resolved
data: T; | ||
} | ||
|
||
export enum DataSourceUIGroupType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, do we have a plan on getting away from hardcoding datasource types in this service? These should be generic enough to allow different groups of datasources.
Signed-off-by: Eric <menwe@amazon.com>
Signed-off-by: Eric <menwe@amazon.com>
Thanks for the review. The removal of hardcoding in this PR is to remove previous hardcoded type-to-display-name mapping and instead reading from data source metadata. The s3 data sources are backend data sources where it doesn't have any UI specific definitions. Ideally these front end specific definitions should be retrieving from settings or front end data sources separated from backend data sources where user can configure them. Does this align with the direction you are pointing to? As for registration function, are you point to the registerDataSources in data source service or the way data source owner register the data source? |
Signed-off-by: Eric <menwe@amazon.com>
I think @ashwin-pc is saying the next iteration of this where if I am a cluster admin, I can install a plugin that adds the new data source. For example, if I want a S3 connection type I install a S3 connection plugin that wires that up. Or better yet, some type of catalogue. |
Yea understood that we will want this in future iterations, this PR addressed the step one mapping (updated the description), eventually we will not want those to be defined in code. |
* datasource and service refactoring Signed-off-by: Eric <menwe@amazon.com> * datasource enhancement and refactoring Signed-off-by: Eric <menwe@amazon.com> * datasource selectable consolidation and refactoring Signed-off-by: Eric <menwe@amazon.com> * add in memory cache with refresh Signed-off-by: Eric <menwe@amazon.com> * move refresh to right side Signed-off-by: Eric <menwe@amazon.com> * renaming Signed-off-by: Eric <menwe@amazon.com> * update default datasource tests Signed-off-by: Eric <menwe@amazon.com> * added more tests for default datasource Signed-off-by: Eric <menwe@amazon.com> * update selector tests Signed-off-by: Eric <menwe@amazon.com> * update changelog Signed-off-by: Eric <menwe@amazon.com> * fix data source service tests Signed-off-by: Eric <menwe@amazon.com> * add and update tests for datasource service Signed-off-by: Eric <menwe@amazon.com> * add more data source service tests Signed-off-by: Eric <menwe@amazon.com> * fix sidebar tests Signed-off-by: Eric <menwe@amazon.com> * add to change log yml Signed-off-by: Eric <menwe@amazon.com> * address comments along with more tests Signed-off-by: Eric <menwe@amazon.com> * add test subject Signed-off-by: Eric <menwe@amazon.com> * reference from correct type path Signed-off-by: Eric <menwe@amazon.com> * correct text Signed-off-by: Eric <menwe@amazon.com> * minor change - remove yet used displayOrder Signed-off-by: Eric <menwe@amazon.com> * remove from changelog as having fragments already Signed-off-by: Eric <menwe@amazon.com> * use expanded name Signed-off-by: Eric <menwe@amazon.com> * fix one test Signed-off-by: Eric <menwe@amazon.com> --------- Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Eric Wei <menwe@amazon.com> (cherry picked from commit 42166d0) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@mengweieric yes my goal is to have no service specific names hardcoded in the framework. If any other company wanted to extend the datasources to support their version of the service like Azure for example. They should not need to make a code change in OSD to show up as a new Datasource as long as they adhere to the schema. e.g.
today, if i wanted to add postgress or any other datasource type to this list, i will need to make a code change in OSD to show up as an option in the DataSources menu. That should not be necessary. That should all be abstracted away in the API. |
* datasource and service refactoring * datasource enhancement and refactoring * datasource selectable consolidation and refactoring * add in memory cache with refresh * move refresh to right side * renaming * update default datasource tests * added more tests for default datasource * update selector tests * update changelog * fix data source service tests * add and update tests for datasource service * add more data source service tests * fix sidebar tests * add to change log yml * address comments along with more tests * add test subject * reference from correct type path * correct text * minor change - remove yet used displayOrder * remove from changelog as having fragments already * use expanded name * fix one test --------- (cherry picked from commit 42166d0) Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Eric Wei <menwe@amazon.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>
* datasource and service refactoring * datasource enhancement and refactoring * datasource selectable consolidation and refactoring * add in memory cache with refresh * move refresh to right side * renaming * update default datasource tests * added more tests for default datasource * update selector tests * update changelog * fix data source service tests * add and update tests for datasource service * add more data source service tests * fix sidebar tests * add to change log yml * address comments along with more tests * add test subject * reference from correct type path * correct text * minor change - remove yet used displayOrder * remove from changelog as having fragments already * use expanded name * fix one test --------- (cherry picked from commit 42166d0) Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Eric Wei <menwe@amazon.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> (cherry picked from commit 4d14b60) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* datasource and service refactoring * datasource enhancement and refactoring * datasource selectable consolidation and refactoring * add in memory cache with refresh * move refresh to right side * renaming * update default datasource tests * added more tests for default datasource * update selector tests * update changelog * fix data source service tests * add and update tests for datasource service * add more data source service tests * fix sidebar tests * add to change log yml * address comments along with more tests * add test subject * reference from correct type path * correct text * minor change - remove yet used displayOrder * remove from changelog as having fragments already * use expanded name * fix one test --------- (cherry picked from commit 42166d0) (cherry picked from commit 4d14b60) Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Eric Wei <menwe@amazon.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>
…earch-project#6691) (opensearch-project#6692) * datasource and service refactoring * datasource enhancement and refactoring * datasource selectable consolidation and refactoring * add in memory cache with refresh * move refresh to right side * renaming * update default datasource tests * added more tests for default datasource * update selector tests * update changelog * fix data source service tests * add and update tests for datasource service * add more data source service tests * fix sidebar tests * add to change log yml * address comments along with more tests * add test subject * reference from correct type path * correct text * minor change - remove yet used displayOrder * remove from changelog as having fragments already * use expanded name * fix one test --------- (cherry picked from commit 42166d0) (cherry picked from commit 4d14b60) Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Eric Wei <menwe@amazon.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>
* datasource and service refactoring Signed-off-by: Eric <menwe@amazon.com> * datasource enhancement and refactoring Signed-off-by: Eric <menwe@amazon.com> * datasource selectable consolidation and refactoring Signed-off-by: Eric <menwe@amazon.com> * add in memory cache with refresh Signed-off-by: Eric <menwe@amazon.com> * move refresh to right side Signed-off-by: Eric <menwe@amazon.com> * renaming Signed-off-by: Eric <menwe@amazon.com> * update default datasource tests Signed-off-by: Eric <menwe@amazon.com> * added more tests for default datasource Signed-off-by: Eric <menwe@amazon.com> * update selector tests Signed-off-by: Eric <menwe@amazon.com> * update changelog Signed-off-by: Eric <menwe@amazon.com> * fix data source service tests Signed-off-by: Eric <menwe@amazon.com> * add and update tests for datasource service Signed-off-by: Eric <menwe@amazon.com> * add more data source service tests Signed-off-by: Eric <menwe@amazon.com> * fix sidebar tests Signed-off-by: Eric <menwe@amazon.com> * add to change log yml Signed-off-by: Eric <menwe@amazon.com> * address comments along with more tests Signed-off-by: Eric <menwe@amazon.com> * add test subject Signed-off-by: Eric <menwe@amazon.com> * reference from correct type path Signed-off-by: Eric <menwe@amazon.com> * correct text Signed-off-by: Eric <menwe@amazon.com> * minor change - remove yet used displayOrder Signed-off-by: Eric <menwe@amazon.com> * remove from changelog as having fragments already Signed-off-by: Eric <menwe@amazon.com> * use expanded name Signed-off-by: Eric <menwe@amazon.com> * fix one test Signed-off-by: Eric <menwe@amazon.com> --------- Signed-off-by: Eric <menwe@amazon.com> Signed-off-by: Eric Wei <menwe@amazon.com>
Description
Discover data selector enhancements includes:
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration