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

[MDS] Fix showing DQS sources list in workspaces #8838

Merged
merged 16 commits into from
Dec 19, 2024

Conversation

jowg-amazon
Copy link
Contributor

@jowg-amazon jowg-amazon commented Nov 9, 2024

Description

  • Fixes showing the list of dqs sources in workspaces
Screenshot 2024-11-09 at 2 10 59 PM

Issues Resolved

Screenshot

Testing the changes

Changelog

  • fix: [MDS] Fix showing DQS sources list in workspaces

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

Signed-off-by: jowg-amazon <jowg@amazon.com>
Copy link
Contributor

github-actions bot commented Nov 9, 2024

ℹ️ Manual Changeset Creation Reminder

Please ensure manual commit for changeset file 8838.yml under folder changelogs/fragments to complete this PR.

If you want to use the available OpenSearch Changeset Bot App to avoid manual creation of changeset file you can install it in your forked repository following this link.

For more information about formatting of changeset files, please visit OpenSearch Auto Changeset and Release Notes Tool.

Signed-off-by: jowg-amazon <jowg@amazon.com>
Copy link

codecov bot commented Nov 9, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 60.86%. Comparing base (c61c7cd) to head (58f2fad).

Files with missing lines Patch % Lines
...ion/manage_direct_query_data_connections_table.tsx 77.27% 2 Missing and 3 partials ⚠️
.../data_source_management/public/components/utils.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8838   +/-   ##
=======================================
  Coverage   60.85%   60.86%           
=======================================
  Files        3808     3808           
  Lines       91159    91175   +16     
  Branches    14393    14396    +3     
=======================================
+ Hits        55478    55493   +15     
- Misses      32139    32141    +2     
+ Partials     3542     3541    -1     
Flag Coverage Δ
Linux_1 28.99% <0.00%> (-0.01%) ⬇️
Linux_2 56.38% <ø> (ø)
Linux_3 ?
Linux_4 29.01% <0.00%> (-0.01%) ⬇️
Windows_1 29.00% <0.00%> (-0.01%) ⬇️
Windows_2 56.34% <ø> (ø)
Windows_3 37.95% <75.00%> (+0.01%) ⬆️
Windows_4 29.01% <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.

Comment on lines +151 to +155
type:
{
S3GLUE: DatasourceTypeToDisplayName.S3GLUE,
PROMETHEUS: DatasourceTypeToDisplayName.PROMETHEUS,
}[dataConnection.connector] || dataConnection.connector,
Copy link
Collaborator

Choose a reason for hiding this comment

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

While I understand this part of the code is barely being changed in this PR, pushing for higher maintainability standards would be to ask for these to be moved to a proper definition of their own as known connectors. This is especially important because this object is used in multiple places.

AMoo-Miki
AMoo-Miki previously approved these changes Dec 18, 2024
setData([...openSearchConnections, ...directQueryConnections]);
} catch (error) {
// eslint-disable-next-line no-console
console.log('Error fetching OpenSearch and Direct Query Connections', error);
Copy link
Collaborator

@amsiglan amsiglan Dec 18, 2024

Choose a reason for hiding this comment

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

Nit: Should we remove this? The user won't benefit from this. Do we want to show the notification toast instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added notification toast

) {
// TODO: link to details page for security lake and cloudwatch
return <span style={indentStyle}> {name}</span>;
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Don't need else here since we only return

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the else

@amsiglan
Copy link
Collaborator

Approving with minor comments

amsiglan
amsiglan previously approved these changes Dec 18, 2024
@jowg-amazon jowg-amazon dismissed stale reviews from AMoo-Miki and amsiglan via 58f2fad December 19, 2024 17:30
@AMoo-Miki AMoo-Miki merged commit f85cd6d into opensearch-project:main Dec 19, 2024
70 of 71 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Dec 19, 2024
* Fix showing DQS sources list in workspaces

Signed-off-by: jowg-amazon <jowg@amazon.com>

* add changelog

Signed-off-by: jowg-amazon <jowg@amazon.com>

* Changeset file for PR #8838 created/updated

* respond to comments

Signed-off-by: Joanne Wang <jowg@amazon.com>

* change to use DatasourceTypeToDisplayName

Signed-off-by: Joanne Wang <jowg@amazon.com>

* update tests

Signed-off-by: Joanne Wang <jowg@amazon.com>

* respond to comments

Signed-off-by: Joanne Wang <jowg@amazon.com>

---------

Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: Joanne Wang <jowg@amazon.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
(cherry picked from commit f85cd6d)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Hailong-am pushed a commit that referenced this pull request Jan 15, 2025
* Fix showing DQS sources list in workspaces



* add changelog



* Changeset file for PR #8838 created/updated

* respond to comments



* change to use DatasourceTypeToDisplayName



* update tests



* respond to comments



---------




(cherry picked from commit f85cd6d)

Signed-off-by: jowg-amazon <jowg@amazon.com>
Signed-off-by: Joanne Wang <jowg@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.

6 participants