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

[Discover 2.0] Updating fetch functions to include local cluster #7542

Merged
merged 2 commits into from
Jul 28, 2024

Conversation

sejli
Copy link
Member

@sejli sejli commented Jul 27, 2024

Description

  • Update datasources fetch function to include local cluster
  • Check for duplicates when fetching external datasources (in the case local cluster is added as a datasource)
  • Clean up types in DataSetNavigator so items are displayed properly

Issues Resolved

Screenshot

image image

Testing the changes

Changelog

  • fix: fix tables not displaying in navigator and add local cluster to datasources

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

codecov bot commented Jul 27, 2024

Codecov Report

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

Project coverage is 63.65%. Comparing base (8441667) to head (1a0ce7c).

Files Patch % Lines
...navigator/lib/utils/fetch_external_data_sources.ts 0.00% 8 Missing ⚠️
.../public/ui/dataset_navigator/dataset_navigator.tsx 0.00% 6 Missing ⚠️
.../dataset_navigator/lib/utils/fetch_data_sources.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7542      +/-   ##
==========================================
- Coverage   63.66%   63.65%   -0.01%     
==========================================
  Files        3629     3629              
  Lines       79499    79509      +10     
  Branches    12597    12599       +2     
==========================================
+ Hits        50610    50612       +2     
- Misses      25823    25832       +9     
+ Partials     3066     3065       -1     
Flag Coverage Δ
Linux_1 30.76% <0.00%> (-0.01%) ⬇️
Linux_2 55.58% <ø> (ø)
Linux_3 40.23% <0.00%> (-0.01%) ⬇️
Linux_4 31.57% <0.00%> (-0.01%) ⬇️
Windows_1 30.78% <0.00%> (-0.01%) ⬇️
Windows_2 55.53% <ø> (ø)
Windows_3 40.24% <0.00%> (-0.01%) ⬇️
Windows_4 31.57% <0.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.

@kavilla kavilla merged commit 7287699 into opensearch-project:main Jul 28, 2024
67 of 69 checks passed
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x 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.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.x
# Create a new branch
git switch --create backport/backport-7542-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 72876991bcfc958d24ea8fcc15fac9b4a83c1bd9
# Push it to GitHub
git push --set-upstream origin backport/backport-7542-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-7542-to-2.x.

@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.16 failed:

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

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.16 2.16
# Navigate to the new working tree
pushd ../.worktrees/OpenSearch-Dashboards/backport-2.16
# Create a new branch
git switch --create backport/backport-7542-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 72876991bcfc958d24ea8fcc15fac9b4a83c1bd9
# Push it to GitHub
git push --set-upstream origin backport/backport-7542-to-2.16
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/OpenSearch-Dashboards/backport-2.16

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

ananzh pushed a commit to ananzh/OpenSearch-Dashboards that referenced this pull request Jul 30, 2024
…nsearch-project#7542)

* Update datasources fetch function to include local cluster
* Check for duplicates when fetching external datasources (in the case local cluster is added as a datasource)
* Clean up types in DataSetNavigator so items are displayed properly


---------

Signed-off-by: Sean Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
ananzh added a commit that referenced this pull request Jul 30, 2024
* [Discover 2.0] Updating fetch functions to include local cluster (#7542)

* Update datasources fetch function to include local cluster
* Check for duplicates when fetching external datasources (in the case local cluster is added as a datasource)
* Clean up types in DataSetNavigator so items are displayed properly


---------

Signed-off-by: Sean Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

* [discover-next][bug] add max height to dataset navigator and use memoization (#7540)

* add max heigh. use memoization

Signed-off-by: Kawika Avilla <[email protected]>

almost working pretty nicely

Signed-off-by: Kawika Avilla <[email protected]>

a  little bit better

Signed-off-by: Kawika Avilla <[email protected]>

its ok

Signed-off-by: Kawika Avilla <[email protected]>

* update mock

Signed-off-by: Kawika Avilla <[email protected]>

* update another mock

Signed-off-by: Kawika Avilla <[email protected]>

* fix mock for extension

Signed-off-by: Kawika Avilla <[email protected]>

* rebase fixes

Signed-off-by: Kawika Avilla <[email protected]>

* update script

Signed-off-by: Kawika Avilla <[email protected]>

* fix initial load

Signed-off-by: Kawika Avilla <[email protected]>

---------

Signed-off-by: Kawika Avilla <[email protected]>

* Fix query assist for query editor (#7552)

After the following PRs:  #7492, #7546, #7540

this commit added skip(1) back to dataset manager observable: fef6156, we need to revert changes done in
fix(query assist): update reading data source id from dataset manager #7464 (comment)

    revert dataset manager observable usage in query assist to support skip(1)
    revert dataset manager tests

[Discover Next] Fixes Discover styles #7546 removed query editor header div, this PR adds it back to enable query editor extensions

Signed-off-by: Joshua Li <[email protected]>

* [Discover next] Fixes dataset navigator menu styling & search error toast (#7566)

Signed-off-by: Ashwin P Chandran <[email protected]>

* [Discover 2.0] Loading fix for databases (#7567)

* add back in useeffect for loading databases

Signed-off-by: Sean Li <[email protected]>

* Changeset file for PR #7567 created/updated

---------

Signed-off-by: Sean Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>

---------

Signed-off-by: Sean Li <[email protected]>
Signed-off-by: Kawika Avilla <[email protected]>
Signed-off-by: Joshua Li <[email protected]>
Signed-off-by: Ashwin P Chandran <[email protected]>
Co-authored-by: Sean Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
Co-authored-by: Kawika Avilla <[email protected]>
Co-authored-by: Joshua Li <[email protected]>
Co-authored-by: Ashwin P Chandran <[email protected]>
Qxisylolo pushed a commit to Qxisylolo/OpenSearch-Dashboards that referenced this pull request Aug 1, 2024
…nsearch-project#7542)

* Update datasources fetch function to include local cluster
* Check for duplicates when fetching external datasources (in the case local cluster is added as a datasource)
* Clean up types in DataSetNavigator so items are displayed properly


---------

Signed-off-by: Sean Li <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
@AMoo-Miki
Copy link
Collaborator

Backported with #7574

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.

4 participants