Skip to content

Fix index pattern data source reference not updated in sample data #6851

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

Conversation

wanglam
Copy link
Collaborator

@wanglam wanglam commented May 29, 2024

Description

This PR is for fixing #6850 , there are two changes in this PR.

  1. Add back references update for index pattern saved objects when import sample data
  2. Add unit tests to verify references has been updated when generate sample data by data source method

Issues Resolved

#6850

Screenshot

image
Now data source connection will be exists in index patterns list after sample data imported.

Testing the changes

  1. Checkout the branch code and run yarn osd bootstrap
  2. Add data_source.enabled: true to config/opensearch_dashboards.yml
  3. Run yarn start --no-base-path start OSD server
  4. Add some data source in the data source management page
  5. Go to import sample data page select new added data source
    image
  6. Click first "Add data" button and wait for sample data been imported.
  7. Go to the index patterns page, the index patterns will show selected data source like below image
    image

Changelog

  • fix: Update index pattern references with data source when import sample data

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
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

1 similar comment
Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

@wanglam wanglam force-pushed the fix-sample-data-index-pattern-data-source branch from d355b3c to 45e3c18 Compare May 29, 2024 02:17
Copy link
Contributor

❌ Changelog Entry Missing Hyphen

Changelog entries must begin with a hyphen (-).

Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.38%. Comparing base (8d50974) to head (958cf74).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6851   +/-   ##
=======================================
  Coverage   67.38%   67.38%           
=======================================
  Files        3443     3443           
  Lines       67795    67797    +2     
  Branches    11032    11033    +1     
=======================================
+ Hits        45683    45688    +5     
- Misses      19440    19486   +46     
+ Partials     2672     2623   -49     
Flag Coverage Δ
Linux_1 33.07% <ø> (ø)
Linux_2 55.12% <ø> (ø)
Linux_3 45.17% <ø> (ø)
Linux_4 34.82% <100.00%> (+0.01%) ⬆️
Windows_1 33.09% <ø> (ø)
Windows_2 55.09% <ø> (ø)
Windows_3 45.19% <ø> (ø)
Windows_4 34.82% <100.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.

@wanglam wanglam requested a review from mengweieric as a code owner May 29, 2024 03:01
@BionIT BionIT merged commit eb3efa8 into opensearch-project:main May 29, 2024
64 of 66 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 29, 2024
…6851)

* Fix index pattern data source reference not updated in sample data

Signed-off-by: Lin Wang <[email protected]>

* Changeset file for PR #6851 created/updated

---------

Signed-off-by: Lin Wang <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit eb3efa8)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
BionIT pushed a commit that referenced this pull request May 29, 2024
…6851) (#6853)

* Fix index pattern data source reference not updated in sample data



* Changeset file for PR #6851 created/updated

---------



(cherry picked from commit eb3efa8)

Signed-off-by: Lin Wang <[email protected]>
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: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
LDrago27 pushed a commit to LDrago27/OpenSearch-Dashboards that referenced this pull request Jun 3, 2024
…pensearch-project#6851)

* Fix index pattern data source reference not updated in sample data

Signed-off-by: Lin Wang <[email protected]>

* Changeset file for PR opensearch-project#6851 created/updated

---------

Signed-off-by: Lin Wang <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
@zhongnansu zhongnansu added the bug Something isn't working label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x bug Something isn't working multiple datasource multiple datasource project v2.15.0 valued-contributor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants