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

[7.x] chore(NA): add async import into infra plugin to reduce apm bundle size (#63292) #64721

Closed
wants to merge 1 commit into from

Conversation

mistic
Copy link
Member

@mistic mistic commented Apr 29, 2020

Backports the following commits to 7.x:

…ze (elastic#63292)

* chore(NA): async import on infra plugin in order to avoid infra plugin on apm

* chore(NA): add async import into infra plugin to reduce apm bundle size

* docs(NA): including small note

* fix(NA): pass pluginsSetup as an argument

* chore(NA): fix missing type

* chore(NA): split register in two functions

* chore(NA): only register once

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / Plugin Functional Tests.x-pack/test/plugin_api_integration/test_suites/event_log/public_api_integration·ts.event_log Event Log public API should support pagination for events

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: event_log
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: Event Log public API
[00:00:00]             └-> "before all" hook
[00:00:00]             └-> should allow querying for events by Saved Object
[00:00:00]               └-> "before each" hook: global before each
[00:00:00]               │ debg Logging Event for Saved Object 5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23
[00:00:00]               │ proc [kibana]   log   [01:37:28.277] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23"}]},"message":"test 2020-04-29T01:37:28.204Z"}
[00:00:00]               │ proc [kibana]   log   [01:37:28.315] [info][eventLogFixture][event_log_fixture][plugins][plugins] log event error: Error: Saved object [event_log_test/5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23] not found
[00:00:00]               │ proc [kibana]   log   [01:37:28.648] [info][eventLogFixture][event_log_fixture][plugins][plugins] created saved object
[00:00:00]               │ proc [kibana]   log   [01:37:28.650] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:00]               │ debg Logging Event for Saved Object 5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23
[00:00:00]               │ proc [kibana]   log   [01:37:28.652] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:28.204Z","@timestamp":"2020-04-29T01:37:28.649Z","ecs":{"version":"1.5.0"}}
[00:00:00]               │ proc [kibana]   log   [01:37:28.716] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23"}]},"message":"test 2020-04-29T01:37:28.204Z"}
[00:00:00]               │ proc [kibana]   log   [01:37:28.745] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:00]               │ proc [kibana]   log   [01:37:28.746] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:00]               │ debg calling /api/event_log/event_log_test/5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23/_find
[00:00:00]               │ proc [kibana]   log   [01:37:28.747] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:28.204Z","@timestamp":"2020-04-29T01:37:28.745Z","ecs":{"version":"1.5.0"}}
[00:00:00]               │ debg --- retry.try error: expected 0 to equal 2
[00:00:01]               │ debg calling /api/event_log/event_log_test/5b3e8373-dd40-4ab0-b8e3-c5f45c3e4c23/_find
[00:00:01]               └- ✓ pass  (1.3s) "event_log Event Log public API should allow querying for events by Saved Object"
[00:00:01]             └-> should support pagination for events
[00:00:01]               └-> "before each" hook: global before each
[00:00:01]               │ debg Logging Event for Saved Object 6372faae-8ee2-4a7c-b958-7c6605e20db3
[00:00:01]               │ proc [kibana]   log   [01:37:29.585] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 6372faae-8ee2-4a7c-b958-7c6605e20db3 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}]},"message":"test 2020-04-29T01:37:29.498Z"}
[00:00:01]               │ proc [kibana]   log   [01:37:29.611] [info][eventLogFixture][event_log_fixture][plugins][plugins] log event error: Error: Saved object [event_log_test/6372faae-8ee2-4a7c-b958-7c6605e20db3] not found
[00:00:01]               │ proc [kibana]   log   [01:37:29.668] [info][eventLogFixture][event_log_fixture][plugins][plugins] created saved object
[00:00:01]               │ proc [kibana]   log   [01:37:29.670] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ debg Logging Event for Saved Object 6372faae-8ee2-4a7c-b958-7c6605e20db3
[00:00:01]               │ debg Logging Event for Saved Object 6372faae-8ee2-4a7c-b958-7c6605e20db3
[00:00:01]               │ debg Logging Event for Saved Object 6372faae-8ee2-4a7c-b958-7c6605e20db3
[00:00:01]               │ debg Logging Event for Saved Object 6372faae-8ee2-4a7c-b958-7c6605e20db3
[00:00:01]               │ debg Logging Event for Saved Object 6372faae-8ee2-4a7c-b958-7c6605e20db3
[00:00:01]               │ proc [kibana]   log   [01:37:29.672] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:29.498Z","@timestamp":"2020-04-29T01:37:29.669Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [01:37:29.902] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 6372faae-8ee2-4a7c-b958-7c6605e20db3 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}]},"message":"test 2020-04-29T01:37:29.498Z"}
[00:00:01]               │ proc [kibana]   log   [01:37:29.926] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 6372faae-8ee2-4a7c-b958-7c6605e20db3 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}]},"message":"test 2020-04-29T01:37:29.499Z"}
[00:00:01]               │ proc [kibana]   log   [01:37:29.939] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 6372faae-8ee2-4a7c-b958-7c6605e20db3 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}]},"message":"test 2020-04-29T01:37:29.498Z"}
[00:00:01]               │ proc [kibana]   log   [01:37:29.956] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 6372faae-8ee2-4a7c-b958-7c6605e20db3 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}]},"message":"test 2020-04-29T01:37:29.498Z"}
[00:00:01]               │ proc [kibana]   log   [01:37:29.983] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 6372faae-8ee2-4a7c-b958-7c6605e20db3 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}]},"message":"test 2020-04-29T01:37:29.499Z"}
[00:00:01]               │ proc [kibana]   log   [01:37:29.988] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [01:37:29.989] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ proc [kibana]   log   [01:37:29.997] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [01:37:30.001] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ proc [kibana]   log   [01:37:30.003] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:29.498Z","@timestamp":"2020-04-29T01:37:29.988Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [01:37:30.004] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:29.499Z","@timestamp":"2020-04-29T01:37:29.997Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [01:37:30.007] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [01:37:30.008] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ proc [kibana]   log   [01:37:30.011] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [01:37:30.012] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ proc [kibana]   log   [01:37:30.015] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:29.498Z","@timestamp":"2020-04-29T01:37:30.007Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [01:37:30.016] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:29.498Z","@timestamp":"2020-04-29T01:37:30.011Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [01:37:30.033] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [01:37:30.035] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ debg calling /api/event_log/event_log_test/6372faae-8ee2-4a7c-b958-7c6605e20db3/_find
[00:00:01]               │ proc [kibana]   log   [01:37:30.037] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:29.499Z","@timestamp":"2020-04-29T01:37:30.034Z","ecs":{"version":"1.5.0"}}
[00:00:02]               │ debg --- retry.try error: expected 1 to equal 6
[00:00:02]               │ debg calling /api/event_log/event_log_test/6372faae-8ee2-4a7c-b958-7c6605e20db3/_find
[00:00:02]               │ debg --- retry.try failed again with the same message...
[00:00:03]               │ debg calling /api/event_log/event_log_test/6372faae-8ee2-4a7c-b958-7c6605e20db3/_find
[00:00:03]               │ debg calling /api/event_log/event_log_test/6372faae-8ee2-4a7c-b958-7c6605e20db3/_find?per_page=3
[00:00:03]               │ debg failed to match {"foundEvents":[{"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:29.498Z","@timestamp":"2020-04-29T01:37:29.669Z","ecs":{"version":"1.5.0"}},{"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:29.498Z","@timestamp":"2020-04-29T01:37:29.988Z","ecs":{"version":"1.5.0"}},{"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-04-29T01:37:29.499Z","@timestamp":"2020-04-29T01:37:29.997Z","ecs":{"version":"1.5.0"}}],"expectedEvents":[{"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}]},"message":"test 2020-04-29T01:37:29.498Z"},{"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}]},"message":"test 2020-04-29T01:37:29.498Z"},{"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"namespace":"default","type":"event_log_test","id":"6372faae-8ee2-4a7c-b958-7c6605e20db3"}]},"message":"test 2020-04-29T01:37:29.498Z"}]}
[00:00:03]               └- ✖ fail: "event_log Event Log public API should support pagination for events"
[00:00:03]               │

Stack Trace

{ Error: expected 'test 2020-04-29T01:37:29.499Z' to sort of equal 'test 2020-04-29T01:37:29.498Z'
    at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:244:8)
    at forEach (test/plugin_api_integration/test_suites/event_log/public_api_integration.ts:179:40)
    at Array.forEach (<anonymous>)
    at assertEventsFromApiMatchCreatedEvents (test/plugin_api_integration/test_suites/event_log/public_api_integration.ts:176:19)
    at Context.it (test/plugin_api_integration/test_suites/event_log/public_api_integration.ts:70:7)
  actual: 'test 2020-04-29T01:37:29.499Z',
  expected: 'test 2020-04-29T01:37:29.498Z',
  showDiff: true }

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

@mistic
Copy link
Member Author

mistic commented Apr 29, 2020

Closing as the original PR was reverted

@mistic mistic closed this Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants