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] Clean up enhanced search API #8226

Merged

Conversation

kavilla
Copy link
Member

@kavilla kavilla commented Sep 18, 2024

Description

  • Deletes the connections service.
  • Removes dataframe object being passed into request
  • Deletes unused APIs
  • Error handling

Issues Resolved

n/a

Screenshot

Screenshot 2024-09-18 at 2 17 17 PM

Testing the changes

locally

Changelog

  • fix: Remove unused enhancements APIs, clean up, and error handling

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

* Deletes the connections service.
* Removes dataframe object being passed into request
* Deletes unused APIs

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

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 30.00000% with 7 lines in your changes missing coverage. Please review.

Project coverage is 64.07%. Comparing base (b826df8) to head (d2992b2).
Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
...gins/query_enhancements/public/datasets/s3_type.ts 33.33% 5 Missing and 1 partial ⚠️
...on/search/search_source/fetch/get_search_params.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8226      +/-   ##
==========================================
+ Coverage   64.05%   64.07%   +0.02%     
==========================================
  Files        3741     3740       -1     
  Lines       88629    88604      -25     
  Branches    13801    13804       +3     
==========================================
+ Hits        56771    56777       +6     
+ Misses      31260    31228      -32     
- Partials      598      599       +1     
Flag Coverage Δ
Linux_1 30.07% <0.00%> (+<0.01%) ⬆️
Linux_2 58.84% <0.00%> (+<0.01%) ⬆️
Linux_3 40.38% <0.00%> (+<0.01%) ⬆️
Linux_4 31.48% <30.00%> (+0.01%) ⬆️
Windows_1 30.08% <0.00%> (+<0.01%) ⬆️
Windows_2 58.78% <0.00%> (+<0.01%) ⬆️
Windows_3 40.38% <0.00%> (+<0.01%) ⬆️
Windows_4 31.48% <30.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.

@@ -44,7 +44,7 @@ export const DEFAULT_DATA = {
} as DataStructure,
LOCAL_DATASOURCE: {
id: '',
title: 'Local Cluster',
title: 'Default Cluster',
Copy link
Member

Choose a reason for hiding this comment

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

I dont think this is correct. This should only show if there is a local cluster. The default cluster will be returned as a part of the datasources API

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah that makes sense i was worried making too big of a change in the case of no local cluster.

should we create an issue for this?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the expected behaviour is that this option only shows up when you have a local cluster. If MDS is off the index list should be shown directly.

const query = (dataSource.meta as DataStructureCustomMeta).query;
const response = await http.fetch(`../../api/enhancements/datasource/external`, {
query,
const abortController = new AbortController();
Copy link
Member

Choose a reason for hiding this comment

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

What do we do with this abort controller?

Copy link
Member Author

Choose a reason for hiding this comment

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

need to verify if using it correctly yet. but in the case of the user selecting a connection accidentally and then selecting another connection immediately aborting the previous call

@ashwin-pc ashwin-pc merged commit 6296b4e into opensearch-project:main Sep 20, 2024
80 of 81 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 20, 2024
* Clean up enhanced search API

* Deletes the connections service.
* Removes dataframe object being passed into request
* Deletes unused APIs

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

* Changeset file for PR #8226 created/updated

---------

Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 6296b4e)
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-8226-to-2.17
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6296b4ed35f20995cad79e009b836cb2a6b279c4
# Push it to GitHub
git push --set-upstream origin backport/backport-8226-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-8226-to-2.17.

amsiglan pushed a commit to amsiglan/OpenSearch-Dashboards that referenced this pull request Sep 20, 2024
* Clean up enhanced search API

* Deletes the connections service.
* Removes dataframe object being passed into request
* Deletes unused APIs

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

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

---------

Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
ashwin-pc pushed a commit that referenced this pull request Sep 21, 2024
* Clean up enhanced search API

* Deletes the connections service.
* Removes dataframe object being passed into request
* Deletes unused APIs



* Changeset file for PR #8226 created/updated

---------



(cherry picked from commit 6296b4e)

Signed-off-by: Kawika Avilla <[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>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Sep 21, 2024
* Clean up enhanced search API

* Deletes the connections service.
* Removes dataframe object being passed into request
* Deletes unused APIs

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

* Changeset file for PR #8226 created/updated

---------

Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit 6296b4e)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ashwin-pc pushed a commit that referenced this pull request Sep 21, 2024
* Clean up enhanced search API

* Deletes the connections service.
* Removes dataframe object being passed into request
* Deletes unused APIs



* Changeset file for PR #8226 created/updated

---------



(cherry picked from commit 6296b4e)

Signed-off-by: Kawika Avilla <[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>
virajsanghvi pushed a commit to virajsanghvi/OpenSearch-Dashboards that referenced this pull request Sep 24, 2024
* Clean up enhanced search API

* Deletes the connections service.
* Removes dataframe object being passed into request
* Deletes unused APIs

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

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

---------

Signed-off-by: Kawika Avilla <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
abbyhu2000 added a commit to abbyhu2000/OpenSearch-Dashboards that referenced this pull request Sep 24, 2024
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