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

Bug fix for data-sources page #1830

Merged
merged 7 commits into from
May 23, 2024

Conversation

sumukhswamy
Copy link
Collaborator

Description

  • data-source page de-serialization of object
  • change of path for fetch with job-id as undefined was being passed
  • removal of console logs

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Comment on lines 520 to 521
handleRefresh?: () => void,
dataSourceMDSId?: string
Copy link
Member

Choose a reason for hiding this comment

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

This order change might need a change in workbench? How do we know this is not causing a new regression, do we have test setup for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes same instance with the fix has it

Copy link
Member

Choose a reason for hiding this comment

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

I meant some cypress tests or jest tests, to catch any regression in workbench. For example in workbench we are passing the params to this function: https://github.com/opensearch-project/dashboards-query-workbench/blob/888a8fe83b5e0a732866aaddb7a229eabed0f150/public/components/SQLPage/SQLPage.tsx#L71 Since, we do not have named params the MDSId will be mapped to databaseName now.

Copy link
Collaborator

@mengweieric mengweieric left a comment

Choose a reason for hiding this comment

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

Please address all comments

Copy link
Contributor

@amsiglan amsiglan May 21, 2024

Choose a reason for hiding this comment

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

Not a blocker: The type for cacheLoadingHooks: any; or it's properties shouldn't be any, it does not tell you the signature of the parameters you should be passing and hence we see such major bugs creeping in.
Can we please add correct type annotations here?

Copy link

codecov bot commented May 21, 2024

Codecov Report

Attention: Patch coverage is 13.04348% with 20 lines in your changes are missing coverage. Please review.

Project coverage is 57.85%. Comparing base (64c71c9) to head (6d0aa66).
Report is 1 commits behind head on main.

Files Patch % Lines
...iated_objects/modules/associated_objects_table.tsx 0.00% 6 Missing ⚠️
...nage/associated_objects/associated_objects_tab.tsx 0.00% 4 Missing ⚠️
...flyout/selectors/selector_helpers/load_objects.tsx 0.00% 2 Missing ⚠️
...ated_objects/associated_objects_details_flyout.tsx 33.33% 2 Missing ⚠️
...onents/manage/accelerations/acceleration_table.tsx 50.00% 1 Missing ⚠️
...yout/selectors/selector_helpers/load_databases.tsx 0.00% 1 Missing ⚠️
.../manage/accelerations/utils/acceleration_utils.tsx 0.00% 1 Missing ⚠️
.../datasources/components/manage/data_connection.tsx 0.00% 1 Missing ⚠️
...omponents/manage/manage_data_connections_table.tsx 0.00% 1 Missing ⚠️
public/services/requests/sql.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1830      +/-   ##
==========================================
+ Coverage   57.46%   57.85%   +0.38%     
==========================================
  Files         370      372       +2     
  Lines       14051    14082      +31     
  Branches     3702     3712      +10     
==========================================
+ Hits         8075     8147      +72     
+ Misses       5911     5871      -40     
+ Partials       65       64       -1     
Flag Coverage Δ
dashboards-observability 57.85% <13.04%> (+0.38%) ⬆️

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.

@ps48
Copy link
Member

ps48 commented May 23, 2024

@sumukhswamy As mentioned for the workbench PR can we please create and track an issue for adding mock cypress before 2.15 release. This will be crucial as we'll have more changes coming to these plugins in future releases.

@sumukhswamy sumukhswamy merged commit 59f0d57 into opensearch-project:main May 23, 2024
15 of 22 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/dashboards-observability/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-observability/backport-2.x
# Create a new branch
git switch --create backport/backport-1830-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 59f0d57e05ae64382b0cd71e0686b03f58c6059c
# Push it to GitHub
git push --set-upstream origin backport/backport-1830-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-observability/backport-2.x

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

sumukhswamy added a commit to sumukhswamy/dashboards-observability that referenced this pull request May 23, 2024
* added fix for failing data-sources page

Signed-off-by: sumukhswamy <[email protected]>

* added change for job with the id

Signed-off-by: sumukhswamy <[email protected]>

* addressed pr comments

Signed-off-by: sumukhswamy <[email protected]>

* added fix for flyput

Signed-off-by: sumukhswamy <[email protected]>

* added fix for flyout

Signed-off-by: sumukhswamy <[email protected]>

* refactored the flyout objects with an interface

Signed-off-by: sumukhswamy <[email protected]>

---------

Signed-off-by: sumukhswamy <[email protected]>
sumukhswamy added a commit that referenced this pull request May 24, 2024
* added fix for failing data-sources page



* added change for job with the id



* addressed pr comments



* added fix for flyput



* added fix for flyout



* refactored the flyout objects with an interface



---------

Signed-off-by: sumukhswamy <[email protected]>
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.

6 participants