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

[MDS] remove datasourceEnabled in the request #6961

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

Conversation

yujin-emma
Copy link
Contributor

@yujin-emma yujin-emma commented Jun 7, 2024

Description

#6557

Issues Resolved

#6557

Screenshot

non MDS
non_mds_import

MDS

mds_import

Testing the changes

Changelog

  • fix: Remove the dataSourceEnabled from request

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 Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.43%. Comparing base (e7f28f4) to head (2b7e556).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6961   +/-   ##
=======================================
  Coverage   67.43%   67.43%           
=======================================
  Files        3445     3445           
  Lines       67818    67816    -2     
  Branches    11028    11027    -1     
=======================================
+ Hits        45732    45733    +1     
+ Misses      19420    19417    -3     
  Partials     2666     2666           
Flag Coverage Δ
Linux_1 33.08% <0.00%> (+<0.01%) ⬆️
Linux_2 55.07% <100.00%> (+<0.01%) ⬆️
Linux_3 45.21% <0.00%> (-0.02%) ⬇️
Linux_4 34.87% <66.66%> (+<0.01%) ⬆️
Windows_1 33.10% <0.00%> (+<0.01%) ⬆️
Windows_2 55.02% <100.00%> (+<0.01%) ⬆️
Windows_3 45.22% <0.00%> (ø)
Windows_4 34.87% <66.66%> (+<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.

}: SavedObjectsImportOptions): Promise<SavedObjectsImportResponse> {
let errorAccumulator: SavedObjectsImportError[] = [];
const supportedTypes = typeRegistry.getImportableAndExportableTypes().map((type) => type.name);

const dataSourceEnabled = supportedTypes.includes('data-source');
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we get it from config? Not sure if I understand what we try to achieve here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

We are checking a config not a supported type, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, the supported type is from config

Copy link
Collaborator

@BionIT BionIT Jun 7, 2024

Choose a reason for hiding this comment

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

How is supported type configured? How is it related to data source enabled config?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, when constructing the saved object client, it will read config from the raw YAML file, and register it, if data source is enabled, it will support data-source type

Copy link
Collaborator

Choose a reason for hiding this comment

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

So the existing meaning of dataSourceEnabled was that it's a supported type, and now we're just reading it directly?

@LDrago27
Copy link
Collaborator

@yujin-emma Is this still being targeted for 2.16 ?

@BionIT BionIT removed the v2.16.0 label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants