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

Remove AOSS options from the data source selector #2016

Closed
wants to merge 5 commits into from

Conversation

derek-ho
Copy link
Collaborator

Description

This change removes AOSS data sources from the data source selector. Security is not supported for these data sources, so they should not be shown in the security plugin.

Category

Enhancement

Why these changes are required?

Fix: #2011

What is the old behavior before changes and new behavior after changes?

AOSS data sources used to show up in the selector, now they don't.

Issues Resolved

Fix: #2011

Testing

[Please provide details of testing done: unit testing, integration testing and manual testing]

Check List

  • New functionality includes testing
  • 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.

@derek-ho derek-ho added the backport 2.x backport to 2.x branch label Jun 21, 2024
Copy link

codecov bot commented Jun 21, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.58%. Comparing base (757f4ce) to head (25bdd36).

Files Patch % Lines
public/apps/configuration/top-nav-menu.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2016      +/-   ##
==========================================
- Coverage   70.61%   70.58%   -0.03%     
==========================================
  Files          97       97              
  Lines        2600     2601       +1     
  Branches      380      387       +7     
==========================================
  Hits         1836     1836              
- Misses        668      669       +1     
  Partials       96       96              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@derek-ho
Copy link
Collaborator Author

derek-ho commented Jul 2, 2024

@derek-ho derek-ho marked this pull request as ready for review July 11, 2024 17:54
@@ -59,6 +59,7 @@ export const SecurityPluginTopNavMenu = React.memo(
: undefined,
onSelectedDataSources: wrapSetDataSourceWithUpdateUrl,
fullWidth: true,
dataSourceFilter: (ds) => ds.attributes.auth.credentials?.service !== 'aoss',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

What are the possible values for service?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The values are 'aoss', or 'es', but good call out here. I pulled it from core as a constant since it is available. https://github.com/opensearch-project/OpenSearch-Dashboards/blob/a2ee3629040c71bcf1d5d02a0c110703b4e5ca44/src/plugins/data_source/common/data_sources/types.ts#L50

Copy link
Member

Choose a reason for hiding this comment

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

Should we flip this around and only show datasource that is OpenSearch? Will there be other types of datasources in the future?

@RyanL1997 perhaps you know if other datasource types will be added in a future release?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We actually cannot import the constant as core does not export it. I will create an issue to do that, but reverted the change for now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes ideally we will add more types of datasources in the future. (cc @derek-ho @cwperks )

@derek-ho
Copy link
Collaborator Author

This PR is blocked on: opensearch-project/OpenSearch-Dashboards#7261

@derek-ho
Copy link
Collaborator Author

Closing for now until core supports it

@derek-ho derek-ho closed this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Remove AOSS data sources from the data source picker
4 participants