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

Fix web log sample visualization & vis-builder not rendering with data source issue #6948

Merged
merged 2 commits into from
Jun 6, 2024

Conversation

zhongnansu
Copy link
Member

@zhongnansu zhongnansu commented Jun 6, 2024

Description

Currently visual consistency sample dashboard is failing, see future playground

This PR fixes the issue by

  • refactor the static sample visualizations objects of web log Visual Consistency dashboards to support data source
  • Add handling for visbuilder type to support data source by updating references

iShot_2024-06-06_10 55 00

Issues Resolved

#6857
#6938

Screenshot

Testing the changes

Changelog

  • fix: Fix web log sample visualization & vis-builder not rendering with data source issue

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

github-actions bot commented Jun 6, 2024

❌ 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.

@zhongnansu zhongnansu changed the title Fix web log sample visualization & vis-builder not rendering issue Fix web log sample visualization & vis-builder not rendering with data source issue Jun 6, 2024
Copy link
Contributor

github-actions bot commented Jun 6, 2024

❌ 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.

opensearch-changeset-bot bot added a commit to zhongnansu/OpenSearch-Dashboards that referenced this pull request Jun 6, 2024
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.43%. Comparing base (9674147) to head (58d49ca).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6948      +/-   ##
==========================================
- Coverage   67.45%   67.43%   -0.02%     
==========================================
  Files        3443     3443              
  Lines       67815    67815              
  Branches    11033    11033              
==========================================
- Hits        45742    45730      -12     
- Misses      19406    19418      +12     
  Partials     2667     2667              
Flag Coverage Δ
Linux_1 33.09% <ø> (ø)
Linux_2 55.06% <ø> (ø)
Linux_3 45.21% <ø> (+0.01%) ⬆️
Linux_4 34.89% <100.00%> (ø)
Windows_1 33.11% <ø> (-0.03%) ⬇️
Windows_2 55.01% <ø> (ø)
Windows_3 45.22% <ø> (ø)
Windows_4 34.89% <100.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.

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
@@ -398,7 +398,7 @@ export const getSavedObjects = (): SavedObject[] => [
description: '',
kibanaSavedObjectMeta: {
searchSourceJSON:
'{"query":{"query":"","language":"kuery"},"filter":[],"indexRefName":"kibanaSavedObjectMeta.searchSourceJSON.index"}',
'{"index":"90943e30-9a47-11e8-b64d-95841ca0b247","query":{"query":"","language":"kuery"},"filter":[]}',
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we change from indexRefName":"kibanaSavedObjectMeta.searchSourceJSON.index to doc id?

Copy link
Member Author

Choose a reason for hiding this comment

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

so if you check the other sample visualizations that are working fine, they all following same pattern

  1. define "index" in "searchSourceJson"
  2. define "references" field as empty array.

But visualizations in this file are not following the pattern, that's why only them will fail our logic to add reference to data source, and fail to render with data source.

@zhongnansu zhongnansu requested a review from zhyuanqi June 6, 2024 20:47
@zhongnansu zhongnansu merged commit 9a6b1bb into opensearch-project:main Jun 6, 2024
75 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 6, 2024
…a source issue (#6948)

* Fix web log sample visualization & visbuilder not rendering issue

Signed-off-by: Zhongnan Su <szhongna@amazon.com>

* Changeset file for PR #6948 created/updated

---------

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 9a6b1bb)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ananzh pushed a commit that referenced this pull request Jun 7, 2024
…a source issue (#6948) (#6958)

* Fix web log sample visualization & visbuilder not rendering issue
* Changeset file for PR #6948 created/updated

---------



(cherry picked from commit 9a6b1bb)

Signed-off-by: Zhongnan Su <szhongna@amazon.com>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants