-
Notifications
You must be signed in to change notification settings - Fork 915
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
Support multi data source in Region map #6654
Conversation
ℹ️ Manual Changeset Creation ReminderPlease ensure manual commit for changeset file 6654.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: Junqiu Lei <[email protected]>
a022dfe
to
a9bf162
Compare
❌ Changeset File Not Added YetPlease ensure manual commit for changeset file 6654.yml under folder changelogs/fragments to complete this PR. File still missing. |
1 similar comment
❌ Changeset File Not Added YetPlease ensure manual commit for changeset file 6654.yml under folder changelogs/fragments to complete this PR. File still missing. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6654 +/- ##
==========================================
- Coverage 67.79% 67.77% -0.03%
==========================================
Files 3413 3413
Lines 66755 66755
Branches 10861 10861
==========================================
- Hits 45256 45240 -16
- Misses 18856 18871 +15
- Partials 2643 2644 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Do we have unit/integ tests for the changes?
Will add integ tests in functional test repo. |
Signed-off-by: Junqiu Lei <[email protected]> (cherry picked from commit fea8202) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
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.
left some comments
@@ -14,20 +14,28 @@ export function registerGeospatialRoutes(router: IRouter) { | |||
body: schema.object({ | |||
index: schema.string(), | |||
}), | |||
query: schema.maybe(schema.object({}, { unknowns: 'allow' })), |
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.
why we use { unknowns: 'allow' }
here? isn't dataSourceId the only parameter allowed?
if (!req.query.dataSourceId) { | ||
client = context.core.opensearch.client.asCurrentUser; | ||
} else { | ||
// @ts-ignore | ||
client = await context.dataSource.opensearch.getClient(req.query.dataSourceId); | ||
} |
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.
can we extract this to be a util function for reuse? I saw 3 places are uses this
Signed-off-by: Junqiu Lei <[email protected]> (cherry picked from commit fea8202) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Junqiu Lei <[email protected]>
Description
This PR adds the ability to use multi data source in Region maps. In API level, this PR contains updates for:
Issues Resolved
Part of opensearch-project/dashboards-maps#584
Screenshot
Screen.Recording.2024-04-26.at.8.14.06.AM.mov
Testing the changes
Tests will be added in functional test repo in another PR
Changelog
Check List
yarn test:jest
yarn test:jest_integration