Skip to content

Conversation

@tsullivan
Copy link
Member

Backports the following commits to 7.11:

* [Reporting] set viewport to include clip area

* remove getViewport

* fix tests

* simpler

* fix 1

* revert

* hacks

* scope the logging variables

* polish

* hacky fix

* quieter logging

* make less hacky

* fix functional test

* revert lowering log level of browser console messages

* revise comments

* setViewport only to happen once

* fix snapshot of layout type tests

* fix comment text

* Revert "setViewport only to happen once"

This reverts commit 15977f9.

* fix disgusting bug

* use x/y ordering for width/height

* fix fn test snapshots

Co-authored-by: Kibana Machine <[email protected]>
@tsullivan tsullivan added the backport This PR is a backport of another PR label Jan 6, 2021
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

X-Pack API Integration Tests.x-pack/test/api_integration/apis/ml/saved_objects/status·ts.apis Machine Learning saved objects GET saved_objects/status should list jobs and saved objects

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:06:50]           └-: Machine Learning
[00:06:50]             └-> "before all" hook
[00:06:50]             └-> "before all" hook
[00:06:50]               │ debg creating role ft_ml_source
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_ml_source]
[00:06:50]               │ debg creating role ft_ml_source_readonly
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_ml_source_readonly]
[00:06:50]               │ debg creating role ft_ml_dest
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_ml_dest]
[00:06:50]               │ debg creating role ft_ml_dest_readonly
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_ml_dest_readonly]
[00:06:50]               │ debg creating role ft_ml_ui_extras
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_ml_ui_extras]
[00:06:50]               │ debg creating role ft_default_space_ml_all
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_default_space_ml_all]
[00:06:50]               │ debg creating role ft_default_space1_ml_all
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_default_space1_ml_all]
[00:06:50]               │ debg creating role ft_all_spaces_ml_all
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_all_spaces_ml_all]
[00:06:50]               │ debg creating role ft_default_space_ml_read
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_default_space_ml_read]
[00:06:50]               │ debg creating role ft_default_space1_ml_read
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_default_space1_ml_read]
[00:06:50]               │ debg creating role ft_all_spaces_ml_read
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_all_spaces_ml_read]
[00:06:50]               │ debg creating role ft_default_space_ml_none
[00:06:50]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added role [ft_default_space_ml_none]
[00:06:50]               │ debg creating user ft_ml_poweruser
[00:06:50]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_poweruser]
[00:06:50]               │ debg created user ft_ml_poweruser
[00:06:50]               │ debg creating user ft_ml_poweruser_spaces
[00:06:51]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_poweruser_spaces]
[00:06:51]               │ debg created user ft_ml_poweruser_spaces
[00:06:51]               │ debg creating user ft_ml_poweruser_space1
[00:06:51]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_poweruser_space1]
[00:06:51]               │ debg created user ft_ml_poweruser_space1
[00:06:51]               │ debg creating user ft_ml_poweruser_all_spaces
[00:06:51]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_poweruser_all_spaces]
[00:06:51]               │ debg created user ft_ml_poweruser_all_spaces
[00:06:51]               │ debg creating user ft_ml_viewer
[00:06:51]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_viewer]
[00:06:51]               │ debg created user ft_ml_viewer
[00:06:51]               │ debg creating user ft_ml_viewer_spaces
[00:06:51]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_viewer_spaces]
[00:06:51]               │ debg created user ft_ml_viewer_spaces
[00:06:51]               │ debg creating user ft_ml_viewer_space1
[00:06:51]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_viewer_space1]
[00:06:51]               │ debg created user ft_ml_viewer_space1
[00:06:51]               │ debg creating user ft_ml_viewer_all_spaces
[00:06:51]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_viewer_all_spaces]
[00:06:51]               │ debg created user ft_ml_viewer_all_spaces
[00:06:51]               │ debg creating user ft_ml_unauthorized
[00:06:51]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_unauthorized]
[00:06:51]               │ debg created user ft_ml_unauthorized
[00:06:51]               │ debg creating user ft_ml_unauthorized_spaces
[00:06:51]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] added user [ft_ml_unauthorized_spaces]
[00:06:51]               │ debg created user ft_ml_unauthorized_spaces
[00:14:36]             └-: saved objects
[00:14:36]               └-> "before all" hook
[00:15:27]               └-: GET saved_objects/status
[00:15:27]                 └-> "before all" hook
[00:15:27]                 └-> "before all" hook
[00:15:27]                   │ info [ml/ihp_outlier] Loading "mappings.json"
[00:15:27]                   │ info [ml/ihp_outlier] Loading "data.json.gz"
[00:15:27]                   │ info [ml/ihp_outlier] Skipped restore for existing index "ft_ihp_outlier"
[00:15:27]                   │ debg creating space
[00:15:28]                   │ debg created space
[00:15:28]                   │ debg creating space
[00:15:29]                   │ debg created space
[00:15:29]                   │ debg Creating anomaly detection job with id 'fq_single_space1' in space 'space1' ...
[00:15:29]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] [.ml-anomalies-shared] creating index, cause [api], templates [.ml-anomalies-], shards [1]/[1]
[00:15:29]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] updating number_of_replicas to [0] for indices [.ml-anomalies-shared]
[00:15:29]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] [.ml-annotations-6] creating index, cause [api], templates [], shards [1]/[1]
[00:15:29]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] updating number_of_replicas to [0] for indices [.ml-annotations-6]
[00:15:30]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] [.ml-config] creating index, cause [auto(bulk api)], templates [.ml-config], shards [1]/[1]
[00:15:30]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] updating number_of_replicas to [0] for indices [.ml-config]
[00:15:30]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] [.ml-notifications-000001] creating index, cause [auto(bulk api)], templates [.ml-notifications-000001], shards [1]/[1]
[00:15:30]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] updating number_of_replicas to [0] for indices [.ml-notifications-000001]
[00:15:30]                   │ debg Waiting up to 5000ms for 'fq_single_space1' to exist...
[00:15:30]                   │ debg > AD job created.
[00:15:30]                   │ debg Creating anomaly detection job with id 'fq_single_space2' in space 'space2' ...
[00:15:31]                   │ debg Waiting up to 5000ms for 'fq_single_space2' to exist...
[00:15:31]                   │ debg > AD job created.
[00:15:31]                   │ debg Creating data frame analytic job with id 'ihp_od_space1' in space 'space1' ...
[00:15:31]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1609972334990701459] [.ml-config/2fdoBB5dTlq-VGo16xzKLw] update_mapping [_doc]
[00:15:32]                   │ debg Waiting up to 5000ms for 'ihp_od_space1' to exist...
[00:15:32]                   │ debg Fetching data frame analytics job 'ihp_od_space1'...
[00:15:32]                   │ debg > DFA job fetched.
[00:15:32]                   │ debg > DFA job created.
[00:15:32]                   │ debg Creating data frame analytic job with id 'ihp_od_space2' in space 'space2' ...
[00:15:33]                   │ debg Waiting up to 5000ms for 'ihp_od_space2' to exist...
[00:15:33]                   │ debg Fetching data frame analytics job 'ihp_od_space2'...
[00:15:33]                   │ debg > DFA job fetched.
[00:15:33]                   │ debg > DFA job created.
[00:15:33]                   │ debg applying update to kibana config: {"dateFormat:tz":"UTC"}
[00:15:34]                 └-> should list jobs and saved objects
[00:15:34]                   └-> "before each" hook: global before each
[00:15:34]                   └- ✖ fail: apis Machine Learning saved objects GET saved_objects/status should list jobs and saved objects
[00:15:34]                   │       Error: expected [ { jobId: 'fq_single_space2',
[00:15:34]                   │     type: 'anomaly-detector',
[00:15:34]                   │     datafeedId: null,
[00:15:34]                   │     namespaces: [ 'space2' ],
[00:15:34]                   │     checks: { jobExists: true, datafeedExists: false } },
[00:15:34]                   │   { jobId: 'fq_single_space1',
[00:15:34]                   │     type: 'anomaly-detector',
[00:15:34]                   │     datafeedId: null,
[00:15:34]                   │     namespaces: [ 'space1' ],
[00:15:34]                   │     checks: { jobExists: true, datafeedExists: false } } ] to sort of equal [ { checks: { datafeedExists: false, jobExists: true },
[00:15:34]                   │     datafeedId: null,
[00:15:34]                   │     jobId: 'fq_single_space1',
[00:15:34]                   │     namespaces: [ 'space1' ],
[00:15:34]                   │     type: 'anomaly-detector' },
[00:15:34]                   │   { checks: { datafeedExists: false, jobExists: true },
[00:15:34]                   │     datafeedId: null,
[00:15:34]                   │     jobId: 'fq_single_space2',
[00:15:34]                   │     namespaces: [ 'space2' ],
[00:15:34]                   │     type: 'anomaly-detector' } ]
[00:15:34]                   │       + expected - actual
[00:15:34]                   │ 
[00:15:34]                   │              "datafeedExists": false
[00:15:34]                   │              "jobExists": true
[00:15:34]                   │            }
[00:15:34]                   │            "datafeedId": [null]
[00:15:34]                   │       -    "jobId": "fq_single_space2"
[00:15:34]                   │       +    "jobId": "fq_single_space1"
[00:15:34]                   │            "namespaces": [
[00:15:34]                   │       -      "space2"
[00:15:34]                   │       +      "space1"
[00:15:34]                   │            ]
[00:15:34]                   │            "type": "anomaly-detector"
[00:15:34]                   │          }
[00:15:34]                   │          {
[00:15:34]                   │ --
[00:15:34]                   │              "datafeedExists": false
[00:15:34]                   │              "jobExists": true
[00:15:34]                   │            }
[00:15:34]                   │            "datafeedId": [null]
[00:15:34]                   │       -    "jobId": "fq_single_space1"
[00:15:34]                   │       +    "jobId": "fq_single_space2"
[00:15:34]                   │            "namespaces": [
[00:15:34]                   │       -      "space1"
[00:15:34]                   │       +      "space2"
[00:15:34]                   │            ]
[00:15:34]                   │            "type": "anomaly-detector"
[00:15:34]                   │          }
[00:15:34]                   │        ]
[00:15:34]                   │       
[00:15:34]                   │       at Assertion.assert (/dev/shm/workspace/parallel/12/kibana/packages/kbn-expect/expect.js:100:11)
[00:15:34]                   │       at Assertion.eql (/dev/shm/workspace/parallel/12/kibana/packages/kbn-expect/expect.js:244:8)
[00:15:34]                   │       at Context.<anonymous> (test/api_integration/apis/ml/saved_objects/status.ts:110:56)
[00:15:34]                   │       at Object.apply (/dev/shm/workspace/parallel/12/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)
[00:15:34]                   │ 
[00:15:34]                   │ 

Stack Trace

Error: expected [ { jobId: 'fq_single_space2',
    type: 'anomaly-detector',
    datafeedId: null,
    namespaces: [ 'space2' ],
    checks: { jobExists: true, datafeedExists: false } },
  { jobId: 'fq_single_space1',
    type: 'anomaly-detector',
    datafeedId: null,
    namespaces: [ 'space1' ],
    checks: { jobExists: true, datafeedExists: false } } ] to sort of equal [ { checks: { datafeedExists: false, jobExists: true },
    datafeedId: null,
    jobId: 'fq_single_space1',
    namespaces: [ 'space1' ],
    type: 'anomaly-detector' },
  { checks: { datafeedExists: false, jobExists: true },
    datafeedId: null,
    jobId: 'fq_single_space2',
    namespaces: [ 'space2' ],
    type: 'anomaly-detector' } ]
    at Assertion.assert (/dev/shm/workspace/parallel/12/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/12/kibana/packages/kbn-expect/expect.js:244:8)
    at Context.<anonymous> (test/api_integration/apis/ml/saved_objects/status.ts:110:56)
    at Object.apply (/dev/shm/workspace/parallel/12/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16) {
  actual: '[\n' +
    '  {\n' +
    '    "checks": {\n' +
    '      "datafeedExists": false\n' +
    '      "jobExists": true\n' +
    '    }\n' +
    '    "datafeedId": [null]\n' +
    '    "jobId": "fq_single_space2"\n' +
    '    "namespaces": [\n' +
    '      "space2"\n' +
    '    ]\n' +
    '    "type": "anomaly-detector"\n' +
    '  }\n' +
    '  {\n' +
    '    "checks": {\n' +
    '      "datafeedExists": false\n' +
    '      "jobExists": true\n' +
    '    }\n' +
    '    "datafeedId": [null]\n' +
    '    "jobId": "fq_single_space1"\n' +
    '    "namespaces": [\n' +
    '      "space1"\n' +
    '    ]\n' +
    '    "type": "anomaly-detector"\n' +
    '  }\n' +
    ']',
  expected: '[\n' +
    '  {\n' +
    '    "checks": {\n' +
    '      "datafeedExists": false\n' +
    '      "jobExists": true\n' +
    '    }\n' +
    '    "datafeedId": [null]\n' +
    '    "jobId": "fq_single_space1"\n' +
    '    "namespaces": [\n' +
    '      "space1"\n' +
    '    ]\n' +
    '    "type": "anomaly-detector"\n' +
    '  }\n' +
    '  {\n' +
    '    "checks": {\n' +
    '      "datafeedExists": false\n' +
    '      "jobExists": true\n' +
    '    }\n' +
    '    "datafeedId": [null]\n' +
    '    "jobId": "fq_single_space2"\n' +
    '    "namespaces": [\n' +
    '      "space2"\n' +
    '    ]\n' +
    '    "type": "anomaly-detector"\n' +
    '  }\n' +
    ']',
  showDiff: true
}

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
triggersActionsUi 1.5MB 1.5MB -26.9KB

Distributable file count

id before after diff
default 47642 48408 +766

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
triggersActionsUi 162.0KB 162.1KB +102.0B
Unknown metric groups

async chunk count

id before after diff
triggersActionsUi 31 32 +1

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

@tsullivan tsullivan merged commit 9f87398 into elastic:7.11 Jan 7, 2021
@tsullivan tsullivan deleted the backport/7.11/pr-87253 branch January 7, 2021 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants