-
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
[Workspace]Optional workspaces params in repository #5162
[Workspace]Optional workspaces params in repository #5162
Conversation
Signed-off-by: gaobinlong <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
…oject#189) * feat: optimize logic when checkConflict and bulkCreate Signed-off-by: SuZhou-Joe <[email protected]> * feat: add options.workspace check Signed-off-by: SuZhou-Joe <[email protected]> * feat: throw error when workspace check error in repository create Signed-off-by: SuZhou-Joe <[email protected]> * feat: modify judgement Signed-off-by: SuZhou-Joe <[email protected]> * feat: always get objects from DB when create-with-override Signed-off-by: SuZhou-Joe <[email protected]> --------- Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
bf93497
to
f4b86f0
Compare
Codecov Report
@@ Coverage Diff @@
## main #5162 +/- ##
==========================================
+ Coverage 66.79% 66.87% +0.08%
==========================================
Files 3286 2576 -710
Lines 63129 48473 -14656
Branches 10053 8706 -1347
==========================================
- Hits 42164 32418 -9746
+ Misses 18490 13928 -4562
+ Partials 2475 2127 -348
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…tory Signed-off-by: SuZhou-Joe <[email protected]>
Just a heads up @SuZhou-Joe, modified the PR description. if it reads Not a big deal, can always re-open the issue if it does close. |
Thanks @kavilla , modified the PR description. |
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
…tory Signed-off-by: SuZhou-Joe <[email protected]>
@@ -121,6 +127,7 @@ async function fetchObjectsToExport({ | |||
search, | |||
perPage: exportSizeLimit, | |||
namespaces: namespace ? [namespace] : undefined, | |||
...(workspaces ? { workspaces } : {}), |
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.
are we passing an object instead of an array?
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.
Workspaces is an array, in here if workspaces is null, ...({})
will have no impact on the params that passed to find, if we use workspaces: workspaces ? workspaces : undefined
, there will be an extra { ...., workspaces: undefined }
in find params.
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.
for all these workspace operations, can we do it with interceptors like savedObjectClientWrapper
instead of making surgical changes the repository deeply?
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
You mean the preflightCheck on conflict with workspace right? That's a good advice and I haven't think about it. The changes made to repository.ts can be divided into two parts:
For part 2, I think it is doable and has much benefit in the long term, will try to make the refact. |
Signed-off-by: SuZhou-Joe <[email protected]>
@zengyan-amazon I did the refactor and you can find the changes in SuZhou-Joe#8 , please take a look to see if it is what you want, if so I will merge the refactor to this branch. wrapper side change: https://github.com/SuZhou-Joe/OpenSearch-Dashboards/pull/8/files#diff-a2da6f3004def70510d19526890955d7480de07b173b72af04bcfa2f574d943e |
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Closed because of #5949. |
Description
As workspace will be a new concept to organize saved objects, this PR add a new field
workspaces
to indicate which workspaces the objects belong to and consume the field in related methods.Issues Resolved
Partial #4944
Screenshot
N/A
Testing the changes
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr