-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add workspaces parameter to resolve_import_errors API #133
Conversation
Signed-off-by: gaobinlong <gbinlong@amazon.com>
src/plugins/saved_objects_management/public/lib/resolve_import_errors.ts
Show resolved
Hide resolved
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.
Approved, but can you check @wanglam 's comment before merge the PR?
Codecov Report
@@ Coverage Diff @@
## workspace #133 +/- ##
=============================================
- Coverage 65.76% 65.76% -0.01%
=============================================
Files 3336 3336
Lines 64496 64498 +2
Branches 10267 10268 +1
=============================================
+ Hits 42413 42414 +1
- Misses 19503 19504 +1
Partials 2580 2580
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
I have also added some comments, please take a look, thanks!
src/plugins/saved_objects_management/public/lib/resolve_import_errors.ts
Show resolved
Hide resolved
src/plugins/saved_objects_management/public/lib/resolve_import_errors.ts
Outdated
Show resolved
Hide resolved
Signed-off-by: gaobinlong <gbinlong@amazon.com>
* Add workspaces parameter to resolve_import_errors API Signed-off-by: gaobinlong <gbinlong@amazon.com> * Fix bug Signed-off-by: gaobinlong <gbinlong@amazon.com> * Simplify some code Signed-off-by: gaobinlong <gbinlong@amazon.com> --------- Signed-off-by: gaobinlong <gbinlong@amazon.com> (cherry picked from commit 1250357) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add workspaces parameter to resolve_import_errors API * Fix bug * Simplify some code --------- (cherry picked from commit 1250357) Signed-off-by: gaobinlong <gbinlong@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>
* Add workspaces parameter to resolve_import_errors API Signed-off-by: gaobinlong <gbinlong@amazon.com> * Fix bug Signed-off-by: gaobinlong <gbinlong@amazon.com> * Simplify some code Signed-off-by: gaobinlong <gbinlong@amazon.com> --------- Signed-off-by: gaobinlong <gbinlong@amazon.com>
* Add workspaces parameter to resolve_import_errors API Signed-off-by: gaobinlong <gbinlong@amazon.com> * Fix bug Signed-off-by: gaobinlong <gbinlong@amazon.com> * Simplify some code Signed-off-by: gaobinlong <gbinlong@amazon.com> --------- Signed-off-by: gaobinlong <gbinlong@amazon.com>
Description
When importing saved objects from a nd.json file, if there are some objects have missing references or conflicts, import API will return both the invalid objects and valid object, and do not import anything. In current UI, we call another API
resolve_import_errors
to resolve the errors and then import the saved objects, but we didn't add workspaces parameter to that API currently, so we need to add it so that users can see the imported saved objects in current workspace, if not users cannot see them.Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr