-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Sharing saved-objects phase 1.5 (obsolete) #62553
Closed
jportner
wants to merge
13
commits into
elastic:master
from
jportner:issue-58139-sharing-saved-objects-phase-1.5
Closed
Sharing saved-objects phase 1.5 (obsolete) #62553
jportner
wants to merge
13
commits into
elastic:master
from
jportner:issue-58139-sharing-saved-objects-phase-1.5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jportner
force-pushed
the
issue-58139-sharing-saved-objects-phase-1.5
branch
from
April 16, 2020 15:22
e934a1c
to
f6c0b02
Compare
jportner
force-pushed
the
issue-58139-sharing-saved-objects-phase-1.5
branch
2 times, most recently
from
April 17, 2020 18:28
dbde53d
to
0de4a6c
Compare
Action is now "Make a copy" and uses a different icon. Flyout also uses the same icon.
This also adds a separate "shareIntoSpace" UI privilege action, and a "shareSavedObjectsIntoSpace" purpose for the getAllSpaces API. Currently, this has identical behavior to the "Make a copy" action. I will change the behavior in another commit.
SavedObject.error type did not specify the error attribute and did not reflect what is actually returned by SavedObjectsRepository. Updated this for consistency, and updated relevant saved object unit tests to utilize the SavedObjectsErrorHelper functions instead of manually mocking error objects.
Some bulkCreate conflicts can be overwritten, others cannot. This commit updates the SavedObjectsRepository to add metadata to such conflicts, and it updates the relevant Import functions to handle these cases. TODO: update UI and integration tests accordingly
`importSavedObjectsFromStream` and `resolveSavedObjectImportErrors` previously expected an array of supported saved object types. Updated these functions to use the SavedObjectTypeRegistry directly to obtain the list of importable/exportable types. This simplifies logic for other consumers (e.g., Spaces), and it lays the groundwork for regenerating IDs of multi-namespace saved objects upon import.
This is only intended to be set during migration or create operations. It is in place to support future changes for migrating and importing multi-namespace saved objects, so IDs can be regenerated deterministically. This will allow saved objects to be overwritten consistently if they are imported multiple times into a given space.
No saved objects that are created in normal Kibana usage will include the `originId` field. This commit changes the saved object export logic to add the `originId` field for multi-namespace types that do not already have an `originId` set. This will be used in future changes to saved object imports for the purposes of ID regeneration.
`importSavedObjectsFromSteam` and `resolveSavedObjectsImportErrors` now behave differently: 1. If an import object is a multi-namespace type and it has a defined originId, the created object will use that as its id. 2. If bulkCreate fails for one of the aforementioned import objects as an unresolvable conflict, its id is replaced with a "linked id" (generated with uuidv5) and bulkCreate is attempted again. 3. Results from both bulkCreate operations are merged, and result ids are remapped back to that of the import object, so consumers of these APIs will not need to change their behavior.
…flicts" This reverts commit 3a6a7974864a4b57f9322568b81e9abddb7b6027.
This reverts commit cf107b85ac222e860e5516e09d8777c19d3810fe.
bulkCreate now attaches error metadata to indicate when an unresolvable conflict occurred.
Regenerate IDs and retry import for unresolvable conflicts
jportner
force-pushed
the
issue-58139-sharing-saved-objects-phase-1.5
branch
from
April 20, 2020 19:04
1bfa141
to
77ba868
Compare
Resubmitted changes in a new PR: #75444. |
jportner
changed the title
Sharing saved-objects phase 1.5
Sharing saved-objects phase 1.5 (obsolete)
Aug 19, 2020
💔 Build Failed
Failed CI Steps
Test FailuresKibana Pipeline / kibana-intake-agent / Jest Integration Tests.packages/kbn-optimizer/src/integration_tests.builds expected bundles, saves bundle counts to metadataStandard Out
Stack Trace
Kibana Pipeline / kibana-intake-agent / Jest Integration Tests.src/core/server/saved_objects/routes/integration_tests.POST /api/saved_objects/_resolve_import_errors retries importing a dashboardStandard Out
Stack Trace
Kibana Pipeline / kibana-intake-agent / Jest Integration Tests.src/core/server/saved_objects/routes/integration_tests.POST /api/saved_objects/_resolve_import_errors resolves conflicts by replacing the visualization referencesStandard Out
Stack Trace
and 4 more failures, only showing the first 3. History
To update your PR or re-run it, just comment with: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(Obsolete PR, see #62553 (comment))