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] Add installedPlugins list to data source saved … #6348

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

ZilongX
Copy link
Collaborator

@ZilongX ZilongX commented Apr 4, 2024

Description

  • This change is the second step per RFC [RFC] Plugins Version Decoupling #5877 aiming at decouple the strict version constrains between OSD Core and Plugins

  • This change adds new attribute installedPlugins into the data-source saved object, which then will be leveraged by each plugin/component to filter out supported data sources based on individual plugin dependency

Issues Resolved

#6349

Screenshot

  • New data-source saved object , with installedPlugins added
"attributes": {
      "dataSourceVersion": {
        "S": "2.11.0"
      },
      "description": {
        "S": ""
      },
      "endpoint": {
        "S": "https://search-goodboy-211-5zcmfildjglhyfjzyro2oevmze.us-east-1.es.amazonaws.com"
      },
      "installedPlugins": {
        "L": [
          {
            "S": "analysis-icu"
          },
          {
            "S": "opensearch-jetty"
          },
          {
            "S": "opensearch-job-scheduler"
          },
          {
            "S": "opensearch-knn"
          },
          {
            "S": "opensearch-ml"
          },
          {
            "S": "opensearch-neural-search"
          },
          {
            "S": "opensearch-notifications"
          },
          {
            "S": "opensearch-notifications-core"
          },
          {
            "S": "opensearch-observability"
          },
          {
            "S": "opensearch-reports-scheduler"
          },
          {
            "S": "opensearch-security"
          },
          {
            "S": "opensearch-security-analytics"
          },
          {
            "S": "opensearch-sql"
          },
          {
            "S": "performance-analyzer"
          },
          {
            "S": "repository-s3"
          },
          {
            "S": "telemetry-otel"
          }
        ]
      },
      "title": {
        "S": "test003"
      }
    }
  },

Testing the changes

All related test cases passed as

image

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 Apr 4, 2024

Codecov Report

Attention: Patch coverage is 83.33333% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 67.53%. Comparing base (726fb0e) to head (937926d).

Files Patch % Lines
.../server/routes/data_source_connection_validator.ts 80.00% 1 Missing and 1 partial ⚠️
.../data_source_management/public/components/utils.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6348      +/-   ##
==========================================
+ Coverage   67.51%   67.53%   +0.01%     
==========================================
  Files        3377     3377              
  Lines       65843    65854      +11     
  Branches    10649    10650       +1     
==========================================
+ Hits        44455    44474      +19     
+ Misses      18804    18794      -10     
- Partials     2584     2586       +2     
Flag Coverage Δ
Linux_1 32.60% <ø> (ø)
Linux_2 55.61% <ø> (ø)
Linux_3 44.90% <83.33%> (+<0.01%) ⬆️
Linux_4 34.99% <0.00%> (ø)
Windows_1 32.65% <ø> (+0.02%) ⬆️
Windows_2 55.58% <ø> (ø)
Windows_3 44.91% <83.33%> (+0.01%) ⬆️
Windows_4 34.99% <0.00%> (ø)

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.

@@ -141,6 +141,7 @@ export interface DataSourceAttributes extends SavedObjectAttributes {
description?: string;
endpoint?: string;
dataSourceVersion?: string;
installedPlugins?: string[];
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we need to expose getters for the installed plugins and version fields for plugins to use so that they don't need to know implementation details

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep, will wrap the field in getters in next one, this one will be focusing on adding the installedPlugins first ~

@ZilongX ZilongX merged commit 7406205 into opensearch-project:main Apr 5, 2024
72 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 5, 2024
#6348)

* [Multiple Datasource] Add installedPlugins list to data source saved object

Signed-off-by: Zilong Xia <[email protected]>

* [Multiple Datasource] Fix create data source wizard test

Signed-off-by: Zilong Xia <[email protected]>

---------

Signed-off-by: Zilong Xia <[email protected]>
(cherry picked from commit 7406205)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
ZilongX pushed a commit that referenced this pull request Apr 5, 2024
#6348) (#6351)

* [Multiple Datasource] Add installedPlugins list to data source saved object

Signed-off-by: Zilong Xia <[email protected]>

* [Multiple Datasource] Fix create data source wizard test

Signed-off-by: Zilong Xia <[email protected]>

---------

Signed-off-by: Zilong Xia <[email protected]>
(cherry picked from commit 7406205)
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
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants