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 framework to show related indexed views inside dataset selector and show banner in the Discover canvas for the selected dataset #8701

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

amsiglan
Copy link
Collaborator

@amsiglan amsiglan commented Oct 24, 2024

Description

In this PR we add support for

  1. Selecting indexed view inside dataset selector. The indexed view is an Opensearch index which can be created for an external source like S3. When user selects an indexed view, we use this index for querying the data
  2. Showing a banner at the top of Discover results canvas. This banner can be used to show actions related to the selected dataset. The first use we will add for this banner would be to show a callout to create an indexed view while searching an external source, or when an indexed view is selected, we can show an entry point to select other indexed view

Issues Resolved

New feature

Screenshot

Note: Below screenshots were produced by making changes to the S3 type config for testing and are not part of this PR since this PR is only adding the framework.

  • Callout for creating indexed view
image
  • Action from callout can open the create flyout (this is all handled by the type config provider and not in this PR's code)
image
  • Create indexed view banner:
image

Testing the changes

Set up workspace with query enhancements enabled

  • For the banner in Discover canvas
  1. [For testing only]: Update the S3 config type to return the banner props based on the fetch status
  2. Discover will render the banner based on provided props
  • For showing indexed views in dataset selector
  1. Update the S3 config type to return implemented instance of IndexedViewsService
  2. Dataset selector will show the indexed views in the second step

Changelog

  • feat: Add framework to show banner at the top in discover results canvas
  • feat: Show indexed views in dataset selector

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

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 48 lines in your changes missing coverage. Please review.

Project coverage is 60.75%. Comparing base (affd265) to head (db13dee).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...s/data/public/ui/dataset_selector/configurator.tsx 0.00% 26 Missing ⚠️
...ublic/application/view_components/canvas/index.tsx 0.00% 21 Missing ⚠️
...ic/application/view_components/utils/use_search.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8701      +/-   ##
==========================================
- Coverage   60.75%   60.75%   -0.01%     
==========================================
  Files        3798     3798              
  Lines       90690    90729      +39     
  Branches    14277    14286       +9     
==========================================
+ Hits        55101    55123      +22     
- Misses      32090    32108      +18     
+ Partials     3499     3498       -1     
Flag Coverage Δ
Linux_1 29.04% <0.00%> (-0.02%) ⬇️
Linux_2 56.39% <ø> (ø)
Linux_3 37.61% <0.00%> (+<0.01%) ⬆️
Linux_4 29.81% <0.00%> (-0.01%) ⬇️
Windows_1 29.05% <0.00%> (-0.02%) ⬇️
Windows_2 56.34% <ø> (ø)
Windows_3 37.62% <0.00%> (+0.01%) ⬆️
Windows_4 29.81% <0.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.

Copy link
Collaborator

@virajsanghvi virajsanghvi left a comment

Choose a reason for hiding this comment

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

Is there a plan for unit tests?

Also, can you double check ci failures? One I think is a known issue but the other i'm not sure about

@amsiglan
Copy link
Collaborator Author

Is there a plan for unit tests?

Also, can you double check ci failures? One I think is a known issue but the other i'm not sure about

For now all changes are behind a flag, unit tests will be added as fast follow next week

amsiglan pushed a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Oct 29, 2024
opensearch-changeset-bot bot added a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Oct 30, 2024
@ananzh ananzh added the v2.18.0 label Oct 30, 2024
@ananzh ananzh added v2.19.0 and removed v2.18.0 labels Oct 31, 2024
@kavilla kavilla added discover for discover reinvent discover-next labels Nov 1, 2024
Signed-off-by: Amardeepsingh Siglani <[email protected]>
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.

5 participants