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

[Backport 2.x] [MDS] Add Vega support for importing saved objects #6214

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

Backport de978d4 from #6123.

* Add MDS support for Vega

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Refactor field to data_source_id

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add to CHANGELOG.md

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Added test cases and renamed field to use data_source_name

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add prefix datasource name test case and add example in default hjson

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Move CHANGELOG to appropriate section

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Increased test coverage of search() method

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add test cases for util function

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add util function to modify Vega Spec

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add method to verify Vega saved object type

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add import saved object support for Vega

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add unit tests for Vega objects in create and conflict modes

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Refactored utils test file

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add to CHANGELOG

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Use bulkget instead of single get

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add datasource references to the specs

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Fix bootstrap errors

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add edge case where title is potentially undefined

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Address PR comments

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add more test coverage for checking conflict

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Fix unit test

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

---------

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
(cherry picked from commit de978d4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

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

Project coverage is 67.26%. Comparing base (05ede47) to head (8aefa3a).

Files Patch % Lines
...erver/saved_objects/import/create_saved_objects.ts 68.88% 10 Missing and 4 partials ⚠️
src/core/server/saved_objects/import/utils.ts 90.24% 2 Missing and 2 partials ⚠️
...d_objects/import/check_conflict_for_data_source.ts 80.00% 0 Missing and 2 partials ⚠️
src/plugins/vis_type_vega/server/utils.ts 95.23% 1 Missing and 1 partial ⚠️
...e_vega/server/vega_visualization_client_wrapper.ts 93.33% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              2.x    #6214      +/-   ##
==========================================
+ Coverage   67.20%   67.26%   +0.05%     
==========================================
  Files        3332     3335       +3     
  Lines       64448    64579     +131     
  Branches    10293    10326      +33     
==========================================
+ Hits        43313    43438     +125     
- Misses      18635    18636       +1     
- Partials     2500     2505       +5     
Flag Coverage Δ
Linux_1 31.30% <44.04%> (-3.81%) ⬇️
Linux_2 55.39% <79.16%> (+0.10%) ⬆️
Linux_3 44.69% <6.25%> (-0.07%) ⬇️
Linux_4 35.31% <6.25%> (-0.05%) ⬇️
Windows_1 31.33% <44.04%> (-3.81%) ⬇️
Windows_2 55.35% <79.16%> (+0.10%) ⬆️
Windows_3 44.70% <6.25%> (-0.07%) ⬇️
Windows_4 35.31% <6.25%> (-0.05%) ⬇️

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.

@Flyingliuhub Flyingliuhub merged commit d144637 into 2.x Mar 20, 2024
65 of 66 checks passed
@github-actions github-actions bot deleted the backport/backport-6123-to-2.x branch March 20, 2024 01:33
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 20, 2024
* Add MDS support for Vega

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Refactor field to data_source_id

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add to CHANGELOG.md

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Added test cases and renamed field to use data_source_name

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add prefix datasource name test case and add example in default hjson

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Move CHANGELOG to appropriate section

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Increased test coverage of search() method

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add test cases for util function

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add util function to modify Vega Spec

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add method to verify Vega saved object type

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add import saved object support for Vega

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add unit tests for Vega objects in create and conflict modes

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Refactored utils test file

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add to CHANGELOG

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Use bulkget instead of single get

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add datasource references to the specs

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Fix bootstrap errors

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add edge case where title is potentially undefined

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Address PR comments

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Add more test coverage for checking conflict

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

* Fix unit test

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>

---------

Signed-off-by: Huy Nguyen <73027756+huyaboo@users.noreply.github.com>
(cherry picked from commit de978d4)
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>
Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com>
(cherry picked from commit d144637)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
BionIT pushed a commit that referenced this pull request Mar 20, 2024
…6222)

* Add MDS support for Vega



* Refactor field to data_source_id



* Add to CHANGELOG.md



* Added test cases and renamed field to use data_source_name



* Add prefix datasource name test case and add example in default hjson



* Move CHANGELOG to appropriate section



* Increased test coverage of search() method



* Add test cases for util function



* Add util function to modify Vega Spec



* Add method to verify Vega saved object type



* Add import saved object support for Vega



* Add unit tests for Vega objects in create and conflict modes



* Refactored utils test file



* Add to CHANGELOG



* Use bulkget instead of single get



* Add datasource references to the specs



* Fix bootstrap errors



* Add edge case where title is potentially undefined



* Address PR comments



* Add more test coverage for checking conflict



* Fix unit test



---------


(cherry picked from commit de978d4)


# Conflicts:
#	CHANGELOG.md



(cherry picked from commit d144637)

Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Ashwin P Chandran <ashwinpc@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autocut Skip the changelog verification check on backports backport 2.13 first-time-contributor multiple datasource multiple datasource project v2.13.0
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants