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

display direct query connections of local cluster in data sources page #8059

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

weiwang118
Copy link
Contributor

@weiwang118 weiwang118 commented Sep 6, 2024

Description

This pr implement displaying direct query connections of local cluster in different scenarios:

  • Display direct query connections when multiple data source is disabled.
  • Display direct query connections when multiple data source is enabled.

Also solve a small bug when directing to direct query data source details page.

Issues Resolved

Screenshot

Data Source Enabled

  • The local cluster can not be selected and deleted, it's read-only and un-clickable. However, the direct query connections under local cluster can be clicked.
Screenshot 2024-09-06 at 09 43 59 Screenshot 2024-09-06 at 09 50 44 Data Source Disabled Screenshot 2024-09-06 at 09 49 07 Screenshot 2024-09-06 at 09 47 05

Testing the changes

Changelog

  • skip

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

@kgcreative
Copy link
Member

LGTM! 🚀

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 55.26316% with 17 lines in your changes missing coverage. Please review.

Project coverage is 60.58%. Comparing base (569b70d) to head (9bf545d).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../data_source_management/public/components/utils.ts 20.00% 6 Missing and 2 partials ⚠️
...ion/manage_direct_query_data_connections_table.tsx 53.33% 2 Missing and 5 partials ⚠️
.../data_source_home_panel/data_source_home_panel.tsx 85.71% 1 Missing ⚠️
...data_source_home_panel/data_source_page_header.tsx 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8059      +/-   ##
==========================================
- Coverage   60.59%   60.58%   -0.01%     
==========================================
  Files        3738     3738              
  Lines       88636    88662      +26     
  Branches    13763    13780      +17     
==========================================
+ Hits        53711    53719       +8     
- Misses      31649    31659      +10     
- Partials     3276     3284       +8     
Flag Coverage Δ
Linux_1 28.76% <18.18%> (-0.01%) ⬇️
Linux_2 56.27% <ø> (ø)
Linux_3 37.50% <55.26%> (-0.01%) ⬇️
Linux_4 29.61% <18.18%> (-0.01%) ⬇️
Windows_1 28.78% <18.18%> (-0.01%) ⬇️
Windows_2 56.22% <ø> (ø)
Windows_3 37.51% <55.26%> (+<0.01%) ⬆️
Windows_4 29.61% <18.18%> (-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.

BionIT
BionIT previously approved these changes Sep 6, 2024
@BionIT
Copy link
Collaborator

BionIT commented Sep 6, 2024

Just checked with @RyanL1997 , we should not show local cluster when data_source.hideLocalCluster: true, but it is not @weiwang118 @kgcreative We should avoid regression

@RyanL1997
Copy link
Contributor

RyanL1997 commented Sep 6, 2024

Just checked with @RyanL1997 , we should not show local cluster when data_source.hideLocalCluster: true, but it is not @weiwang118 @kgcreative We should avoid regression

I think the similar implementation for doing that can be found here: #7497

@weiwang118
Copy link
Contributor Author

Just checked with @RyanL1997 , we should not show local cluster when data_source.hideLocalCluster: true, but it is not @weiwang118 @kgcreative We should avoid regression

Already updated the commit.
Use data_source.hideLocalCluster to decide if show local cluster connections when mds is enabled.

  • MDS Enabled, hideLocalCluster Enabled
Screenshot 2024-09-06 at 12 38 33 - MDS Enabled, hideLocalCluster Disabled Screenshot 2024-09-06 at 12 39 41 - MDS Disabled, do not rely on hideLocalCluster Screenshot 2024-09-06 at 12 40 46 - MDS Enabled, hideLocalCluster Enabled Screenshot 2024-09-06 at 12 42 40 - MDS Enabled, hideLocalCluster Disabled. Screenshot 2024-09-06 at 12 43 24

Copy link
Contributor

@RyanL1997 RyanL1997 left a comment

Choose a reason for hiding this comment

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

LGTM!

@zengyan-amazon zengyan-amazon merged commit e621422 into opensearch-project:main Sep 6, 2024
59 of 62 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 6, 2024
#8059)

Signed-off-by: Wei Wang <weiwsde@gmail.com>
(cherry picked from commit e621422)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.17 failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/OpenSearch-Dashboards/backport-2.17 2.17
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.17
# Create a new branch
git switch --create backport/backport-8059-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e62142256484ca56382ca46b6394ed874b5a10e9
# Push it to GitHub
git push --set-upstream origin backport/backport-8059-to-2.17
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.17

Then, create a pull request where the base branch is 2.17 and the compare/head branch is backport/backport-8059-to-2.17.

weiwang118 added a commit to weiwang118/OpenSearch-Dashboards that referenced this pull request Sep 6, 2024
opensearch-project#8059)

Signed-off-by: Wei Wang <weiwsde@gmail.com>
(cherry picked from commit e621422)
zengyan-amazon pushed a commit that referenced this pull request Sep 6, 2024
#8059) (#8068)

Signed-off-by: Wei Wang <weiwsde@gmail.com>
(cherry picked from commit e621422)
ZilongX added a commit that referenced this pull request Sep 7, 2024
#8059) (#8065)

(cherry picked from commit e621422)

Signed-off-by: Wei Wang <weiwsde@gmail.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: ZilongX <99905560+ZilongX@users.noreply.github.com>
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Sep 8, 2024
SuZhou-Joe pushed a commit to SuZhou-Joe/OpenSearch-Dashboards that referenced this pull request Sep 10, 2024
@AMoo-Miki
Copy link
Collaborator

Manually backported to 2.17 with #8068

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport 2.17 repeat-contributor Skip-Changelog PRs that are too trivial to warrant a changelog or release notes entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants