Skip to content
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

Conversation

jportner
Copy link
Contributor

@jportner jportner commented Apr 4, 2020

(Obsolete PR, see #62553 (comment))

@jportner jportner force-pushed the issue-58139-sharing-saved-objects-phase-1.5 branch from e934a1c to f6c0b02 Compare April 16, 2020 15:22
@elastic elastic deleted a comment from kibanamachine Apr 16, 2020
@jportner jportner force-pushed the issue-58139-sharing-saved-objects-phase-1.5 branch 2 times, most recently from dbde53d to 0de4a6c Compare April 17, 2020 18:28
jportner added 13 commits April 20, 2020 15:03
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
Copy link
Contributor Author

Resubmitted changes in a new PR: #75444.

@jportner jportner closed this Aug 19, 2020
@jportner jportner deleted the issue-58139-sharing-saved-objects-phase-1.5 branch August 19, 2020 15:04
@jportner jportner changed the title Sharing saved-objects phase 1.5 Sharing saved-objects phase 1.5 (obsolete) Aug 19, 2020
@kibanamachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / kibana-intake-agent / Jest Integration Tests.packages/kbn-optimizer/src/integration_tests.builds expected bundles, saves bundle counts to metadata

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 45 times on tracked branches: https://github.com/elastic/kibana/issues/70753


Stack Trace

Error: expected optimizer to produce two or three "running" states, states: [ { state:
     { phase: 'initializing',
       compilerStates: [],
       offlineBundles: [],
       onlineBundles: [],
       startTime: 1597854200107,
       durSec: 0 } },
  { event:
     { type: 'bundle not cached',
       reason: 'missing optimizer cache key',
       bundle:
        Bundle {
          type: 'plugin',
          id: 'bar',
          entry: './public/index',
          contextDir:
           '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
          sourceRoot:
           '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
          outputDir:
           '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
          cache:
           BundleCache {
             path:
              '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
             state: {} } } },
    state:
     { phase: 'initializing',
       compilerStates: [],
       offlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       onlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       startTime: 1597854200107,
       durSec: 0.1 } },
  { event:
     { type: 'bundle not cached',
       reason: 'missing optimizer cache key',
       bundle:
        Bundle {
          type: 'plugin',
          id: 'foo',
          entry: './public/index',
          contextDir:
           '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
          sourceRoot:
           '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
          outputDir:
           '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
          cache:
           BundleCache {
             path:
              '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
             state: {} } } },
    state:
     { phase: 'initializing',
       compilerStates: [],
       offlineBundles: [],
       onlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } },
          Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       startTime: 1597854200107,
       durSec: 0.1 } },
  { event: { type: 'optimizer initialized' },
    state:
     { phase: 'initialized',
       compilerStates: [],
       offlineBundles: [],
       onlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } },
          Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       startTime: 1597854200107,
       durSec: 0.1 } },
  { event:
     { type: 'worker started',
       bundles:
        [ Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } },
          Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } } ] },
    state:
     { phase: 'initialized',
       compilerStates: [],
       offlineBundles: [],
       onlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } },
          Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       startTime: 1597854200107,
       durSec: 0.2 } },
  { event: { bundleId: 'foo', type: 'running' },
    state:
     { phase: 'running',
       compilerStates: [ { bundleId: 'foo', type: 'running' } ],
       offlineBundles: [],
       onlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } },
          Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       startTime: 1597854200107,
       durSec: 1.1 } },
  { event: { bundleId: 'bar', type: 'running' },
    state:
     { phase: 'running',
       compilerStates:
        [ { bundleId: 'foo', type: 'running' },
          { bundleId: 'bar', type: 'running' } ],
       offlineBundles: [],
       onlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } },
          Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       startTime: 1597854200107,
       durSec: 1.1 } },
  { event:
     { bundleId: 'foo', type: 'compiler success', moduleCount: 4 },
    state:
     { phase: 'running',
       compilerStates:
        [ { bundleId: 'bar', type: 'running' },
          { bundleId: 'foo', type: 'compiler success', moduleCount: 4 } ],
       offlineBundles: [],
       onlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } },
          Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       startTime: 1597854200107,
       durSec: 2.1 } },
  { event:
     { type: 'worker stdio',
       chunk:
        <Buffer 42 72 6f 77 73 65 72 73 6c 69 73 74 3a 20 63 61 6e 69 75 73 65 2d 6c 69 74 65 20 69 73 20 6f 75 74 64 61 74 65 64 2e 20 50 6c 65 61 73 65 20 72 75 6e ... >,
       stream: 'stderr' },
    state:
     { phase: 'running',
       compilerStates:
        [ { bundleId: 'bar', type: 'running' },
          { bundleId: 'foo', type: 'compiler success', moduleCount: 4 } ],
       offlineBundles: [],
       onlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } },
          Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       startTime: 1597854200107,
       durSec: 2.7 } },
  { event:
     { bundleId: 'bar', type: 'compiler success', moduleCount: 15 },
    state:
     { phase: 'success',
       compilerStates:
        [ { bundleId: 'foo', type: 'compiler success', moduleCount: 4 },
          { bundleId: 'bar', type: 'compiler success', moduleCount: 15 } ],
       offlineBundles: [],
       onlineBundles:
        [ Bundle {
            type: 'plugin',
            id: 'bar',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/bar/target/public/.kbn-optimizer-cache',
               state: {} } },
          Bundle {
            type: 'plugin',
            id: 'foo',
            entry: './public/index',
            contextDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo',
            sourceRoot:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo',
            outputDir:
             '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public',
            cache:
             BundleCache {
               path:
                '/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/__fixtures__/__tmp__/mock_repo/plugins/foo/target/public/.kbn-optimizer-cache',
               state: {} } } ],
       startTime: 1597854200107,
       durSec: 2.9 } } ]
    at assert (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts:77:13)
    at Object.<anonymous>.it (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/packages/kbn-optimizer/src/integration_tests/basic_optimization.test.ts:103:3)
    at process._tickCallback (internal/process/next_tick.js:68:7)

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 dashboard

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `POST /api/saved_objects/_resolve_import_errors retries importing a dashboard 1`

Snapshot: [MockFunction] {
  "calls": Array [
    Array [
      Array [
        Object {
          "attributes": Object {
            "title": "Look at my dashboard",
          },
          "id": "my-dashboard",
          "migrationVersion": Object {},
          "type": "dashboard",
        },
      ],
      Object {
        "namespace": undefined,
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
Received: [MockFunction] {
  "calls": Array [
    Array [
      Array [
        Object {
          "attributes": Object {
            "title": "Look at my dashboard",
          },
          "id": "my-dashboard",
          "migrationVersion": Object {},
          "type": "dashboard",
        },
      ],
      Object {
        "namespace": undefined,
        "overwrite": undefined,
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
    at Object.it (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts:158:43)
    at process._tickCallback (internal/process/next_tick.js:68:7)

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 references

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches


Stack Trace

Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `POST /api/saved_objects/_resolve_import_errors resolves conflicts by replacing the visualization references 1`

Snapshot: [MockFunction] {
  "calls": Array [
    Array [
      Array [
        Object {
          "attributes": Object {
            "title": "Look at my visualization",
          },
          "id": "my-vis",
          "migrationVersion": Object {},
          "references": Array [
            Object {
              "id": "existing",
              "name": "ref_0",
              "type": "index-pattern",
            },
          ],
          "type": "visualization",
        },
      ],
      Object {
        "namespace": undefined,
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
Received: [MockFunction] {
  "calls": Array [
    Array [
      Array [
        Object {
          "attributes": Object {
            "title": "Look at my visualization",
          },
          "id": "my-vis",
          "migrationVersion": Object {},
          "references": Array [
            Object {
              "id": "existing",
              "name": "ref_0",
              "type": "index-pattern",
            },
          ],
          "type": "visualization",
        },
      ],
      Object {
        "namespace": undefined,
        "overwrite": undefined,
      },
    ],
  ],
  "results": Array [
    Object {
      "type": "return",
      "value": Promise {},
    },
  ],
}
    at Object.it (/var/lib/jenkins/workspace/elastic+kibana+pipeline-pull-request/kibana/src/core/server/saved_objects/routes/integration_tests/resolve_import_errors.test.ts:304:43)
    at process._tickCallback (internal/process/next_tick.js:68:7)

and 4 more failures, only showing the first 3.

History

  • 💔 Build #41660 failed 0de4a6c48de270c6f84a89dab55c3e8c54793c47
  • 💔 Build #41620 failed dbde53dcb4b7537e311ce847a5743a913da1842f
  • 💔 Build #41295 failed f6c0b02fae99e50bef8356bc800d401b9d25ba51

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants