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

Discover Flint datasource selector implementation #6833

Conversation

paulstn
Copy link
Contributor

@paulstn paulstn commented May 24, 2024

Description

Issues Resolved

Screenshot

Testing the changes

Changelog

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

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link

codecov bot commented May 24, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 67.04%. Comparing base (016e0f2) to head (3e8fc6a).

Files Patch % Lines
.../data_explorer/public/components/sidebar/index.tsx 0.00% 4 Missing ⚠️
...on/search/search_source/fetch/get_search_params.ts 0.00% 1 Missing ⚠️
...er/public/utils/state_management/metadata_slice.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                    @@
##           feature/discover-next    #6833      +/-   ##
=========================================================
- Coverage                  67.05%   67.04%   -0.01%     
=========================================================
  Files                       3451     3451              
  Lines                      68216    68208       -8     
  Branches                   11140    11139       -1     
=========================================================
- Hits                       45740    45731       -9     
- Misses                     19856    19857       +1     
  Partials                    2620     2620              
Flag Coverage Δ
Linux_4 34.81% <50.00%> (-0.01%) ⬇️
Windows_1 33.09% <50.00%> (-0.01%) ⬇️
Windows_2 55.08% <0.00%> (-0.01%) ⬇️
Windows_3 44.80% <25.00%> (-0.02%) ⬇️
Windows_4 34.81% <50.00%> (-0.01%) ⬇️

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.

@kavilla kavilla marked this pull request as draft May 24, 2024 18:24
@paulstn paulstn force-pushed the discover-flint-datasource-selector branch 2 times, most recently from ab40e0e to a155fe5 Compare June 3, 2024 23:35
src/plugins/data/public/data_sources/datasource/types.ts Outdated Show resolved Hide resolved
@@ -51,6 +51,7 @@ export interface IDataSourceSettings<T extends IDataSourceMetadata = IDataSource
id: string;
type: string;
name: string;
connectionType: 'os' | 'flint';
metadata: T;
Copy link
Member

Choose a reason for hiding this comment

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

do we know what is apart of the metadata field?

@BionIT
Copy link
Collaborator

BionIT commented Jun 5, 2024

Hi @paulstn , is this PR targeting 2.15 or 2.16?

@paulstn
Copy link
Contributor Author

paulstn commented Jun 5, 2024

Hi @paulstn , is this PR targeting 2.15 or 2.16?

2.15

Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
…ch params

Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
@paulstn paulstn force-pushed the discover-flint-datasource-selector branch from e095c56 to 09e1b9e Compare June 5, 2024 18:30
@@ -72,7 +72,7 @@ export const useSearch = (services: DiscoverViewServices) => {
const [savedSearch, setSavedSearch] = useState<SavedSearch | undefined>(undefined);
const { savedSearch: savedSearchId, sort, interval } = useSelector((state) => state.discover);
const { data, filterManager, getSavedSearchById, core, toastNotifications, chrome } = services;
const indexPattern = useIndexPattern(services);
const { indexPattern, dataSource } = useIndexPattern(services);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kavilla I was using the index pattern hook to pass along the data source information as a temporary solution, should I create another hook for datasource or generalize this index pattern hook?

@paulstn paulstn requested a review from kavilla June 5, 2024 18:38
@BionIT
Copy link
Collaborator

BionIT commented Jun 5, 2024

@paulstn is the PR ready for review?

@BionIT BionIT added the v2.15.0 label Jun 5, 2024
@paulstn paulstn marked this pull request as ready for review June 5, 2024 20:38
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
Signed-off-by: Paul Sebastian <paulstn@amazon.com>
export const S3_GLUE_DATA_SOURCE_DISPLAY_NAME = 'Amazon S3';
export const S3_GLUE_DATA_SOURCE_TYPE = 's3glue';
export const DEFAULT_DATA_SOURCE_TYPE = 'DEFAULT_INDEX_PATTERNS';
export const DEFAULT_DATA_SOURCE_TYPE = 'default';
Copy link
Member

Choose a reason for hiding this comment

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

does this have functional purposes outside of redirecting?

Copy link
Member

@kavilla kavilla left a comment

Choose a reason for hiding this comment

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

merging as is! working for sean's stuff. ty!

@kavilla kavilla merged commit 7eeecf9 into opensearch-project:feature/discover-next Jun 6, 2024
40 of 66 checks passed
@BionIT BionIT removed the v2.15.0 label Jun 6, 2024
joshuali925 added a commit to joshuali925/OpenSearch-Dashboards that referenced this pull request Jun 14, 2024
SearchBar extensions depend on the currently selected dataSource, which
depends on
opensearch-project#6833 to
be ported to main

Signed-off-by: Joshua Li <joshuali925@gmail.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.

4 participants