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] [Fleet] Fix display of local_metadata (#65260) #65295

Merged
merged 1 commit into from
May 5, 2020

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented May 5, 2020

Backports the following commits to 7.x:

@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 failed 2 times on tracked branches: https://github.com/elastic/kibana/issues/64812

[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 3632038a-56f9-4c3c-8be9-c1d40f2ff3eb
[00:00:00]               │ proc [kibana]   log   [17:16:37.386] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 3632038a-56f9-4c3c-8be9-c1d40f2ff3eb {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"3632038a-56f9-4c3c-8be9-c1d40f2ff3eb"}]},"message":"test 2020-05-05T17:16:37.316Z"}
[00:00:00]               │ proc [kibana]   log   [17:16:37.417] [info][eventLogFixture][event_log_fixture][plugins][plugins] log event error: Error: Saved object [event_log_test/3632038a-56f9-4c3c-8be9-c1d40f2ff3eb] not found
[00:00:00]               │ proc [kibana]   log   [17:16:37.667] [info][eventLogFixture][event_log_fixture][plugins][plugins] created saved object 3632038a-56f9-4c3c-8be9-c1d40f2ff3eb
[00:00:00]               │ proc [kibana]   log   [17:16:37.669] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:00]               │ debg Logging Event for Saved Object 3632038a-56f9-4c3c-8be9-c1d40f2ff3eb
[00:00:00]               │ proc [kibana]   log   [17:16:37.670] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:37.668Z","end":"2020-05-05T17:16:37.668Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"3632038a-56f9-4c3c-8be9-c1d40f2ff3eb"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:37.316Z","@timestamp":"2020-05-05T17:16:37.668Z","ecs":{"version":"1.5.0"}}
[00:00:00]               │ proc [kibana]   log   [17:16:37.749] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 3632038a-56f9-4c3c-8be9-c1d40f2ff3eb {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"3632038a-56f9-4c3c-8be9-c1d40f2ff3eb"}]},"message":"test 2020-05-05T17:16:37.316Z"}
[00:00:00]               │ proc [kibana]   log   [17:16:37.789] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:00]               │ proc [kibana]   log   [17:16:37.791] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:00]               │ debg calling /api/event_log/event_log_test/3632038a-56f9-4c3c-8be9-c1d40f2ff3eb/_find
[00:00:00]               │ proc [kibana]   log   [17:16:37.793] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:37.790Z","end":"2020-05-05T17:16:37.790Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"3632038a-56f9-4c3c-8be9-c1d40f2ff3eb"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:37.316Z","@timestamp":"2020-05-05T17:16:37.790Z","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/3632038a-56f9-4c3c-8be9-c1d40f2ff3eb/_find
[00:00:01]               └- ✓ pass  (1.2s) "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 35c4ffc0-409b-4692-9b77-326e95f11154
[00:00:01]               │ proc [kibana]   log   [17:16:38.601] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 35c4ffc0-409b-4692-9b77-326e95f11154 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}]},"message":"test 2020-05-05T17:16:38.529Z"}
[00:00:01]               │ proc [kibana]   log   [17:16:38.625] [info][eventLogFixture][event_log_fixture][plugins][plugins] log event error: Error: Saved object [event_log_test/35c4ffc0-409b-4692-9b77-326e95f11154] not found
[00:00:01]               │ proc [kibana]   log   [17:16:38.678] [info][eventLogFixture][event_log_fixture][plugins][plugins] created saved object 35c4ffc0-409b-4692-9b77-326e95f11154
[00:00:01]               │ proc [kibana]   log   [17:16:38.680] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ debg Logging Event for Saved Object 35c4ffc0-409b-4692-9b77-326e95f11154
[00:00:01]               │ debg Logging Event for Saved Object 35c4ffc0-409b-4692-9b77-326e95f11154
[00:00:01]               │ debg Logging Event for Saved Object 35c4ffc0-409b-4692-9b77-326e95f11154
[00:00:01]               │ debg Logging Event for Saved Object 35c4ffc0-409b-4692-9b77-326e95f11154
[00:00:01]               │ debg Logging Event for Saved Object 35c4ffc0-409b-4692-9b77-326e95f11154
[00:00:01]               │ proc [kibana]   log   [17:16:38.682] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:38.679Z","end":"2020-05-05T17:16:38.679Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:38.529Z","@timestamp":"2020-05-05T17:16:38.679Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [17:16:38.832] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 35c4ffc0-409b-4692-9b77-326e95f11154 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}]},"message":"test 2020-05-05T17:16:38.529Z"}
[00:00:01]               │ proc [kibana]   log   [17:16:38.843] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 35c4ffc0-409b-4692-9b77-326e95f11154 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}]},"message":"test 2020-05-05T17:16:38.529Z"}
[00:00:01]               │ proc [kibana]   log   [17:16:38.852] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 35c4ffc0-409b-4692-9b77-326e95f11154 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}]},"message":"test 2020-05-05T17:16:38.529Z"}
[00:00:01]               │ proc [kibana]   log   [17:16:38.862] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 35c4ffc0-409b-4692-9b77-326e95f11154 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}]},"message":"test 2020-05-05T17:16:38.529Z"}
[00:00:01]               │ proc [kibana]   log   [17:16:38.886] [info][eventLogFixture][event_log_fixture][plugins][plugins] test fixture: log event: 35c4ffc0-409b-4692-9b77-326e95f11154 {"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}]},"message":"test 2020-05-05T17:16:38.530Z"}
[00:00:01]               │ proc [kibana]   log   [17:16:38.891] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [17:16:38.892] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ proc [kibana]   log   [17:16:38.894] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:38.891Z","end":"2020-05-05T17:16:38.891Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:38.529Z","@timestamp":"2020-05-05T17:16:38.891Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [17:16:38.917] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [17:16:38.918] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ proc [kibana]   log   [17:16:38.920] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [17:16:38.921] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ proc [kibana]   log   [17:16:38.922] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [17:16:38.923] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ proc [kibana]   log   [17:16:38.924] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:38.917Z","end":"2020-05-05T17:16:38.917Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:38.529Z","@timestamp":"2020-05-05T17:16:38.917Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [17:16:38.924] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:38.920Z","end":"2020-05-05T17:16:38.920Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:38.530Z","@timestamp":"2020-05-05T17:16:38.920Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [17:16:38.925] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:38.922Z","end":"2020-05-05T17:16:38.922Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:38.529Z","@timestamp":"2020-05-05T17:16:38.922Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ proc [kibana]   log   [17:16:38.927] [info][eventLogFixture][event_log_fixture][plugins][plugins] found existing saved object
[00:00:01]               │ proc [kibana]   log   [17:16:38.930] [info][eventLogFixture][event_log_fixture][plugins][plugins] logged
[00:00:01]               │ debg calling /api/event_log/event_log_test/35c4ffc0-409b-4692-9b77-326e95f11154/_find
[00:00:01]               │ proc [kibana]   log   [17:16:38.933] [info][eventLog][plugins] event logged: {"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:38.927Z","end":"2020-05-05T17:16:38.927Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:38.529Z","@timestamp":"2020-05-05T17:16:38.927Z","ecs":{"version":"1.5.0"}}
[00:00:01]               │ debg calling /api/event_log/event_log_test/35c4ffc0-409b-4692-9b77-326e95f11154/_find?per_page=3
[00:00:01]               │ debg calling /api/event_log/event_log_test/35c4ffc0-409b-4692-9b77-326e95f11154/_find?per_page=3&page=2
[00:00:01]               │ debg failed to match {"foundEvents":[{"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:38.920Z","end":"2020-05-05T17:16:38.920Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:38.530Z","@timestamp":"2020-05-05T17:16:38.920Z","ecs":{"version":"1.5.0"}},{"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:38.922Z","end":"2020-05-05T17:16:38.922Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:38.529Z","@timestamp":"2020-05-05T17:16:38.922Z","ecs":{"version":"1.5.0"}},{"event":{"provider":"event_log_fixture","action":"test","start":"2020-05-05T17:16:38.927Z","end":"2020-05-05T17:16:38.927Z","duration":0},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}],"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"test 2020-05-05T17:16:38.529Z","@timestamp":"2020-05-05T17:16:38.927Z","ecs":{"version":"1.5.0"}}],"expectedEvents":[{"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}]},"message":"test 2020-05-05T17:16:38.529Z"},{"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}]},"message":"test 2020-05-05T17:16:38.529Z"},{"event":{"provider":"event_log_fixture","action":"test"},"kibana":{"saved_objects":[{"rel":"primary","namespace":"default","type":"event_log_test","id":"35c4ffc0-409b-4692-9b77-326e95f11154"}]},"message":"test 2020-05-05T17:16:38.530Z"}]}
[00:00:01]               └- ✖ fail: "event_log Event Log public API should support pagination for events"
[00:00:01]               │

Stack Trace

{ Error: expected 'test 2020-05-05T17:16:38.530Z' to sort of equal 'test 2020-05-05T17:16:38.529Z'
    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:174:40)
    at Array.forEach (<anonymous>)
    at assertEventsFromApiMatchCreatedEvents (test/plugin_api_integration/test_suites/event_log/public_api_integration.ts:169:19)
    at Context.it (test/plugin_api_integration/test_suites/event_log/public_api_integration.ts:77:7)
  actual: 'test 2020-05-05T17:16:38.530Z',
  expected: 'test 2020-05-05T17:16:38.529Z',
  showDiff: true }

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

@nchaulet nchaulet merged commit 7cb65c5 into elastic:7.x May 5, 2020
@nchaulet nchaulet deleted the backport/7.x/pr-65260 branch May 5, 2020 18:25
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