-
Notifications
You must be signed in to change notification settings - Fork 894
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: jowg-amazon <[email protected]>
ℹ️ Manual Changeset Creation ReminderPlease 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 <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8838 +/- ##
=======================================
Coverage 60.93% 60.94%
=======================================
Files 3800 3800
Lines 90878 90892 +14
Branches 14324 14326 +2
=======================================
+ Hits 55377 55390 +13
- Misses 31971 31972 +1
Partials 3530 3530
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
❌ Empty Changelog SectionThe 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. |
❌ Changelog Entry Missing HyphenChangelog entries must begin with a hyphen (-). |
❌ Entry Too LongEntry is 130 characters long, which is 30 characters longer than the maximum allowed length of 100 characters. Please revise your entry to be within the maximum length. |
{ | ||
S3GLUE: 'Amazon S3', | ||
PROMETHEUS: 'Prometheus', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plz use DatasourceTypeToDisplayName
const fetchDirectQueryConnections = async (): Promise<DataSourceTableItem[]> => { | ||
try { | ||
const dataConnectionSavedObjects = await getDataConnections(savedObjects.client); | ||
return dataConnectionSavedObjects.map((obj) => ({ | ||
id: obj.id, | ||
title: obj.attributes.connectionId, | ||
type: obj.attributes.type, | ||
})); | ||
} catch (error: any) { | ||
return []; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make sure this is covered as its new functionality
if ( | ||
record.type === DataConnectionType.SecurityLake || | ||
record.type === DataConnectionType.CloudWatch | ||
) { | ||
// TODO: link to details page for security lake and cloudwatch | ||
return <span style={indentStyle}> {name}</span>; | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should make sure this is covered as its new functionality
@@ -181,6 +182,17 @@ export async function getDataSources(savedObjectsClient: SavedObjectsClientContr | |||
); | |||
} | |||
|
|||
export async function getDataConnections(savedObjectsClient: SavedObjectsClientContract) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we type response?
return savedObjectsClient | ||
.find<DataConnectionSavedObjectAttributes>({ | ||
type: 'data-connection', | ||
perPage: 10000, | ||
}) | ||
.then((response) => { | ||
return response?.savedObjects; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given this is new, can we cover with tests?
Description
Issues Resolved
Screenshot
Testing the changes
Changelog
Check List
yarn test:jest
yarn test:jest_integration