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

[Enterprise Search] Upgrade Kea to 2.3, update LogicMounter helper w/ props support #94232

Merged
merged 3 commits into from
Mar 10, 2021

Conversation

cee-chen
Copy link
Contributor

@cee-chen cee-chen commented Mar 9, 2021

Summary

The general theme of this PR is setting up Kea to work even better with props. I'll shortly be using this for my upcoming CurationLogic work/PR, as I'll be passing a curationId prop into CurationLogic.

Kea upgrade (a71f142)

The Kea 2.3 upgrade will allow us to use a new BindLogic API: https://kea.js.org/blog/kea-2.3/

// Example
<BindLogic logic={CurationLogic} props={{ curationId: 'cur-123456789' }}>
  <Curation />
</BindLogic>

Which means I can avoid doing useActions(CurationLogic({ curationId: 'cur-123456789' })) within <Curation /> and just do useActions(CurationLogic).

LogicMounter changes (82ae123 & 8a566ec)

This updates our mount test helper to allow passing in props as well as defaults. API looks the same as before, just with an extra param:

const { mount } = new LogicMounter(SomeLogic);

const someDefaults = { hello: 'world' };
const someProps = { lorem: 'ipsum', dolor: 'sit amet' };

// All valid uses
mount();
mount(someDefaults);
mount(someDefaults, someProps);

Checklist

  • 2.3 should not have introduced any breaking changes, but I did a basic QA smoke test of our App Search pages and confirmed they work as before.

  • Unit or functional tests were updated or added to match the most common scenarios

@cee-chen cee-chen added Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.13.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Mar 9, 2021
@cee-chen cee-chen requested review from scottybollinger and a team March 9, 2021 22:51
@@ -110,8 +111,10 @@ export class LogicMounter {
};

// Automatically reset context & mount the logic file
public mount = (values?: object) => {
public mount = (values?: object, props?: object) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just want to quickly note - I'm not a super huge fan of how logic files that don't want defaults and only want props (e.g., AppLogic) now have to either pass undefined or {} as a first param. If I could go back in time I'd probably change this to

  public mount = ({ defaults, props }) => {

and have test files pass in their API like mount({ defaults: { foo: 'bar' } }) or mount({ props: { bar: 'baz' } }). IDK if we feel strongly to make that change in a ton of files at this point so I'm fine leaving it as-is, mostly just thinking out loud

Copy link
Contributor Author

@cee-chen cee-chen Mar 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also for more context, here's the first conversation where I mentioned LogicMounter needing to support props: #92560 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I supposed you could do a mountWithProps, which would not require the empty object, but I am not a huge fan of that.

Copy link
Contributor Author

@cee-chen cee-chen Mar 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ya for sure, to clarify I don't hate this either and I'm fine with shipping it for now - we can definitely come back to this API later if we start using a ton more logic files w/ props!

Copy link
Contributor

@scottybollinger scottybollinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. Thanks for the detailed description!

this.resetContext(values);
if (props) this.logicFile.build(props);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got that from Kea's docs here for context: https://kea.js.org/docs/guide/advanced#mounting-and-unmounting

// build the logic with props (`logic(props)` is short for `logic.build(props)`)

@@ -110,8 +111,10 @@ export class LogicMounter {
};

// Automatically reset context & mount the logic file
public mount = (values?: object) => {
public mount = (values?: object, props?: object) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I supposed you could do a mountWithProps, which would not require the empty object, but I am not a huge fan of that.

Copy link
Contributor

@byronhulcher byronhulcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / X-Pack Alerting API Integration Tests.x-pack/test/alerting_api_integration/security_and_spaces/tests/alerting/rbac_legacy·ts.alerting api integration security and spaces enabled Alerts legacy alerts alerts space_1_all_alerts_none_actions at space1 should schedule actions on legacy alerts

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: alerting api integration security and spaces enabled
[00:00:00]           └-> "before all" hook in "alerting api integration security and spaces enabled"
[00:03:58]           └-: Alerts
[00:03:58]             └-> "before all" hook in "Alerts"
[00:03:58]             └-: legacy alerts
[00:03:58]               └-> "before all" hook in "legacy alerts"
[00:03:58]               └-> "before all" hook in "legacy alerts"
[00:03:58]                 │ debg creating space
[00:03:59]                 │ debg created space
[00:03:59]                 │ debg creating space
[00:04:00]                 │ debg created space
[00:04:00]                 │ debg creating space
[00:04:01]                 │ debg created space
[00:04:01]                 │ debg creating user no_kibana_privileges
[00:04:01]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added user [no_kibana_privileges]
[00:04:01]                 │ debg created user no_kibana_privileges
[00:04:01]                 │ debg creating role no_kibana_privileges
[00:04:01]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added role [no_kibana_privileges]
[00:04:01]                 │ debg creating user superuser
[00:04:01]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added user [superuser]
[00:04:01]                 │ debg created user superuser
[00:04:01]                 │ debg creating user global_read
[00:04:01]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added user [global_read]
[00:04:01]                 │ debg created user global_read
[00:04:01]                 │ debg creating role global_read_role
[00:04:01]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added role [global_read_role]
[00:04:01]                 │ debg creating user space_1_all
[00:04:01]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added user [space_1_all]
[00:04:01]                 │ debg created user space_1_all
[00:04:01]                 │ debg creating role space_1_all_role
[00:04:01]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added role [space_1_all_role]
[00:04:01]                 │ debg creating user space_1_all_with_restricted_fixture
[00:04:01]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added user [space_1_all_with_restricted_fixture]
[00:04:01]                 │ debg created user space_1_all_with_restricted_fixture
[00:04:01]                 │ debg creating role space_1_all_with_restricted_fixture_role
[00:04:01]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added role [space_1_all_with_restricted_fixture_role]
[00:04:01]                 │ debg creating user space_1_all_alerts_none_actions
[00:04:01]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added user [space_1_all_alerts_none_actions]
[00:04:01]                 │ debg created user space_1_all_alerts_none_actions
[00:04:01]                 │ debg creating role space_1_all_alerts_none_actions_role
[00:04:01]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] added role [space_1_all_alerts_none_actions_role]
[00:04:01]               └-: alerts
[00:04:01]                 └-> "before all" hook in "alerts"
[00:04:01]                 └-> "before all" hook in "alerts"
[00:04:01]                   │ info [alerts_legacy] Loading "mappings.json"
[00:04:01]                   │ info [alerts_legacy] Loading "data.json"
[00:04:01]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_task_manager_8.0.0_001/rLMr67ePTw-t16tZDdnjVg] deleting index
[00:04:01]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_8.0.0_001/q_4a37PuQ8aN3TzOHlA1KQ] deleting index
[00:04:02]                   │ info [alerts_legacy] Deleted existing index ".kibana_8.0.0_001"
[00:04:02]                   │ info [alerts_legacy] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:04:02]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_1] creating index, cause [api], templates [], shards [1]/[0]
[00:04:02]                   │ info [alerts_legacy] Created index ".kibana_1"
[00:04:02]                   │ debg [alerts_legacy] ".kibana_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:02]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_task_manager_1] creating index, cause [api], templates [], shards [1]/[0]
[00:04:02]                   │ info [alerts_legacy] Created index ".kibana_task_manager_1"
[00:04:02]                   │ debg [alerts_legacy] ".kibana_task_manager_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:02]                   │ info [alerts_legacy] Indexed 6 docs into ".kibana_1"
[00:04:02]                   │ info [alerts_legacy] Indexed 5 docs into ".kibana_task_manager_1"
[00:04:02]                   │ debg Migrating saved objects
[00:04:02]                   │ proc [kibana]   log   [23:35:39.955] [info][savedobjects-service] [.kibana_task_manager] INIT -> SET_SOURCE_WRITE_BLOCK
[00:04:02]                   │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] adding block write to indices [[.kibana_task_manager_1/rwM_dhZTRPSVK8SVOztQ0Q]]
[00:04:02]                   │ proc [kibana]   log   [23:35:39.966] [info][savedobjects-service] [.kibana] INIT -> SET_SOURCE_WRITE_BLOCK
[00:04:02]                   │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] adding block write to indices [[.kibana_1/SmYSv8B0ReqNa47-IpjWwg]]
[00:04:02]                   │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] completed adding block write to indices [.kibana_task_manager_1]
[00:04:02]                   │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] completed adding block write to indices [.kibana_1]
[00:04:02]                   │ proc [kibana]   log   [23:35:40.019] [info][savedobjects-service] [.kibana_task_manager] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP
[00:04:02]                   │ proc [kibana]   log   [23:35:40.033] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP
[00:04:02]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_task_manager_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:04:02]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_reindex_temp]
[00:04:02]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:04:02]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updating number_of_replicas to [0] for indices [.kibana_8.0.0_reindex_temp]
[00:04:02]                   │ proc [kibana]   log   [23:35:40.113] [info][savedobjects-service] [.kibana_task_manager] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP
[00:04:02]                   │ proc [kibana]   log   [23:35:40.136] [info][savedobjects-service] [.kibana_task_manager] REINDEX_SOURCE_TO_TEMP -> REINDEX_SOURCE_TO_TEMP_WAIT_FOR_TASK
[00:04:02]                   │ proc [kibana]   log   [23:35:40.141] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP
[00:04:02]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_task_manager_8.0.0_reindex_temp/5gob6BBjShehk-MayF65pA] update_mapping [_doc]
[00:04:02]                   │ proc [kibana]   log   [23:35:40.147] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP -> REINDEX_SOURCE_TO_TEMP_WAIT_FOR_TASK
[00:04:02]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_8.0.0_reindex_temp/Qph15uAvQMC1XhwpfTazlQ] update_mapping [_doc]
[00:04:02]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.tasks] creating index, cause [auto(bulk api)], templates [], shards [1]/[1]
[00:04:02]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updating number_of_replicas to [0] for indices [.tasks]
[00:04:02]                   │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] 13515 finished with response BulkByScrollResponse[took=83.3ms,timed_out=false,sliceId=null,updated=0,created=6,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:02]                   │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] 13506 finished with response BulkByScrollResponse[took=50ms,timed_out=false,sliceId=null,updated=0,created=5,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:02]                   │ proc [kibana]   log   [23:35:40.251] [info][savedobjects-service] [.kibana_task_manager] REINDEX_SOURCE_TO_TEMP_WAIT_FOR_TASK -> SET_TEMP_WRITE_BLOCK
[00:04:02]                   │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] adding block write to indices [[.kibana_task_manager_8.0.0_reindex_temp/5gob6BBjShehk-MayF65pA]]
[00:04:02]                   │ proc [kibana]   log   [23:35:40.254] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_WAIT_FOR_TASK -> SET_TEMP_WRITE_BLOCK
[00:04:02]                   │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] adding block write to indices [[.kibana_8.0.0_reindex_temp/Qph15uAvQMC1XhwpfTazlQ]]
[00:04:02]                   │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] completed adding block write to indices [.kibana_task_manager_8.0.0_reindex_temp]
[00:04:02]                   │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] completed adding block write to indices [.kibana_8.0.0_reindex_temp]
[00:04:02]                   │ proc [kibana]   log   [23:35:40.304] [info][savedobjects-service] [.kibana_task_manager] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET
[00:04:02]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] applying create index request using existing index [.kibana_task_manager_8.0.0_reindex_temp] metadata
[00:04:02]                   │ proc [kibana]   log   [23:35:40.318] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET
[00:04:02]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_task_manager_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:04:02]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:04:02]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] applying create index request using existing index [.kibana_8.0.0_reindex_temp] metadata
[00:04:02]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:04:02]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updating number_of_replicas to [0] for indices [.kibana_8.0.0_001]
[00:04:02]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_task_manager_8.0.0_001/GMUohz8qRBChnpk6u_52cQ] create_mapping
[00:04:02]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_8.0.0_001/Nk3vPD4WQnapu3ylzE4E4A] create_mapping
[00:04:02]                   │ proc [kibana]   log   [23:35:40.489] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> OUTDATED_DOCUMENTS_SEARCH
[00:04:02]                   │ proc [kibana]   log   [23:35:40.492] [info][savedobjects-service] [.kibana_task_manager] CLONE_TEMP_TO_TARGET -> OUTDATED_DOCUMENTS_SEARCH
[00:04:02]                   │ proc [kibana]   log   [23:35:40.499] [info][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH -> UPDATE_TARGET_MAPPINGS
[00:04:02]                   │ proc [kibana]   log   [23:35:40.505] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH -> OUTDATED_DOCUMENTS_TRANSFORM
[00:04:02]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_task_manager_8.0.0_001/GMUohz8qRBChnpk6u_52cQ] update_mapping [_doc]
[00:04:02]                   │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] 13605 finished with response BulkByScrollResponse[took=27.3ms,timed_out=false,sliceId=null,updated=5,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:02]                   │ proc [kibana]   log   [23:35:40.589] [info][savedobjects-service] [.kibana_task_manager] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK
[00:04:02]                   │ proc [kibana]   log   [23:35:40.629] [info][savedobjects-service] [.kibana_task_manager] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY
[00:04:02]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_task_manager_8.0.0_reindex_temp/5gob6BBjShehk-MayF65pA] deleting index
[00:04:03]                   │ proc [kibana]   log   [23:35:40.710] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE
[00:04:03]                   │ proc [kibana]   log   [23:35:40.710] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 763ms
[00:04:03]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_8.0.0_001/Nk3vPD4WQnapu3ylzE4E4A] update_mapping [_doc]
[00:04:03]                   │ proc [kibana]   log   [23:35:41.267] [info][eventLog][plugins] event logged: {"@timestamp":"2021-03-09T23:35:41.261Z","event":{"provider":"alerting","action":"execute","start":"2021-03-09T23:35:41.261Z","end":"2021-03-09T23:35:41.266Z","duration":5000000,"reason":"decrypt","outcome":"failure"},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"b384be60-ec53-4b26-857e-0253ee55b277","namespace":"space1"}],"alerting":{"status":"error"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"error":{"message":"Saved object [alert/b384be60-ec53-4b26-857e-0253ee55b277] not found"},"message":"test.always-firing:b384be60-ec53-4b26-857e-0253ee55b277: execution failed","ecs":{"version":"1.6.0"}}
[00:04:03]                   │ proc [kibana]   log   [23:35:41.271] [info][eventLog][plugins] event logged: {"@timestamp":"2021-03-09T23:35:41.261Z","event":{"provider":"alerting","action":"execute","start":"2021-03-09T23:35:41.261Z","end":"2021-03-09T23:35:41.270Z","duration":9000000,"reason":"decrypt","outcome":"failure"},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"5cc59319-74ee-4edc-8646-a79ea91067cd","namespace":"space1"}],"alerting":{"status":"error"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"error":{"message":"Saved object [alert/5cc59319-74ee-4edc-8646-a79ea91067cd] not found"},"message":"test.always-firing:5cc59319-74ee-4edc-8646-a79ea91067cd: execution failed","ecs":{"version":"1.6.0"}}
[00:04:03]                   │ proc [kibana]   log   [23:35:41.273] [info][eventLog][plugins] event logged: {"@timestamp":"2021-03-09T23:35:41.261Z","event":{"provider":"alerting","action":"execute","start":"2021-03-09T23:35:41.261Z","end":"2021-03-09T23:35:41.273Z","duration":12000000,"reason":"decrypt","outcome":"failure"},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"362e362b-a137-4aa2-9434-43e3d0d84a34","namespace":"space1"}],"alerting":{"status":"error"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"error":{"message":"Saved object [alert/362e362b-a137-4aa2-9434-43e3d0d84a34] not found"},"message":"test.always-firing:362e362b-a137-4aa2-9434-43e3d0d84a34: execution failed","ecs":{"version":"1.6.0"}}
[00:04:03]                   │ proc [kibana]   log   [23:35:41.276] [info][eventLog][plugins] event logged: {"@timestamp":"2021-03-09T23:35:41.261Z","event":{"provider":"alerting","action":"execute","start":"2021-03-09T23:35:41.261Z","end":"2021-03-09T23:35:41.275Z","duration":14000000,"reason":"decrypt","outcome":"failure"},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"d41a6abb-b93b-46df-a80a-926221ea847c","namespace":"space1"}],"alerting":{"status":"error"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"error":{"message":"Saved object [alert/d41a6abb-b93b-46df-a80a-926221ea847c] not found"},"message":"test.always-firing:d41a6abb-b93b-46df-a80a-926221ea847c: execution failed","ecs":{"version":"1.6.0"}}
[00:04:03]                   │ proc [kibana]   log   [23:35:41.278] [info][eventLog][plugins] event logged: {"@timestamp":"2021-03-09T23:35:41.261Z","event":{"provider":"alerting","action":"execute","start":"2021-03-09T23:35:41.261Z","end":"2021-03-09T23:35:41.277Z","duration":16000000,"reason":"decrypt","outcome":"failure"},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"6ee9630a-a20e-44af-9465-217a3717d2ab","namespace":"space1"}],"alerting":{"status":"error"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"error":{"message":"Saved object [alert/6ee9630a-a20e-44af-9465-217a3717d2ab] not found"},"message":"test.always-firing:6ee9630a-a20e-44af-9465-217a3717d2ab: execution failed","ecs":{"version":"1.6.0"}}
[00:04:03]                   │ proc [kibana]   log   [23:35:41.280] [error][alerting][alerting][plugins][plugins] error updating alert execution status for test.always-firing:b384be60-ec53-4b26-857e-0253ee55b277 Saved object index alias [.kibana_8.0.0] not found: index_not_found_exception
[00:04:03]                   │ proc [kibana]   log   [23:35:41.281] [error][plugins][taskManager] Task alerting:test.always-firing "e39a02f0-eea4-11ea-a285-352ee3aecffa" failed: Error: Saved object [alert/b384be60-ec53-4b26-857e-0253ee55b277] not found
[00:04:03]                   │ proc [kibana]   log   [23:35:41.282] [error][alerting][alerting][plugins][plugins] error updating alert execution status for test.always-firing:5cc59319-74ee-4edc-8646-a79ea91067cd Saved object index alias [.kibana_8.0.0] not found: index_not_found_exception
[00:04:03]                   │ proc [kibana]   log   [23:35:41.283] [error][plugins][taskManager] Task alerting:test.always-firing "e8885f00-eea4-11ea-a285-352ee3aecffa" failed: Error: Saved object [alert/5cc59319-74ee-4edc-8646-a79ea91067cd] not found
[00:04:03]                   │ proc [kibana]   log   [23:35:41.284] [error][alerting][alerting][plugins][plugins] error updating alert execution status for test.always-firing:362e362b-a137-4aa2-9434-43e3d0d84a34 Saved object index alias [.kibana_8.0.0] not found: index_not_found_exception
[00:04:03]                   │ proc [kibana]   log   [23:35:41.284] [error][plugins][taskManager] Task alerting:test.always-firing "e4df5430-eea4-11ea-a285-352ee3aecffa" failed: Error: Saved object [alert/362e362b-a137-4aa2-9434-43e3d0d84a34] not found
[00:04:03]                   │ proc [kibana]   log   [23:35:41.285] [error][alerting][alerting][plugins][plugins] error updating alert execution status for test.always-firing:d41a6abb-b93b-46df-a80a-926221ea847c Saved object index alias [.kibana_8.0.0] not found: index_not_found_exception
[00:04:03]                   │ proc [kibana]   log   [23:35:41.285] [error][plugins][taskManager] Task alerting:test.always-firing "e616c2c0-eea4-11ea-a285-352ee3aecffa" failed: Error: Saved object [alert/d41a6abb-b93b-46df-a80a-926221ea847c] not found
[00:04:03]                   │ proc [kibana]   log   [23:35:41.286] [error][alerting][alerting][plugins][plugins] error updating alert execution status for test.always-firing:6ee9630a-a20e-44af-9465-217a3717d2ab Saved object index alias [.kibana_8.0.0] not found: index_not_found_exception
[00:04:03]                   │ proc [kibana]   log   [23:35:41.287] [error][plugins][taskManager] Task alerting:test.always-firing "e9c069d0-eea4-11ea-a285-352ee3aecffa" failed: Error: Saved object [alert/6ee9630a-a20e-44af-9465-217a3717d2ab] not found
[00:04:03]                   │ proc [kibana]   log   [23:35:41.405] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_TRANSFORM -> OUTDATED_DOCUMENTS_SEARCH
[00:04:03]                   │ proc [kibana]   log   [23:35:41.418] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH -> UPDATE_TARGET_MAPPINGS
[00:04:03]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_8.0.0_001/Nk3vPD4WQnapu3ylzE4E4A] update_mapping [_doc]
[00:04:03]                   │ proc [kibana]   log   [23:35:41.482] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK
[00:04:03]                   │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] 13686 finished with response BulkByScrollResponse[took=30ms,timed_out=false,sliceId=null,updated=6,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:03]                   │ proc [kibana]   log   [23:35:41.590] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY
[00:04:03]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_8.0.0_reindex_temp/Qph15uAvQMC1XhwpfTazlQ] deleting index
[00:04:03]                   │ proc [kibana]   log   [23:35:41.631] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE
[00:04:03]                   │ proc [kibana]   log   [23:35:41.632] [info][savedobjects-service] [.kibana] Migration completed after 1686ms
[00:04:03]                   │ debg [alerts_legacy] Migrated Kibana index after loading Kibana data
[00:04:03]                   │ debg [alerts_legacy] Ensured that default space exists in .kibana
[00:04:03]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana-alerting-test-data] creating index, cause [api], templates [], shards [1]/[1]
[00:04:04]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana-test-authorization] creating index, cause [api], templates [], shards [1]/[1]
[00:04:04]                   │ debg creating space
[00:04:04]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] [.kibana_8.0.0_001/Nk3vPD4WQnapu3ylzE4E4A] update_mapping [_doc]
[00:04:04]                   │ debg created space
[00:04:04]                   │ debg creating space
[00:04:05]                   │ debg created space
[00:04:05]                   │ debg creating space
[00:04:06]                   │ debg created space
[00:04:06]                   │ debg creating user no_kibana_privileges
[00:04:06]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated user [no_kibana_privileges]
[00:04:06]                   │ debg created user no_kibana_privileges
[00:04:06]                   │ debg creating role no_kibana_privileges
[00:04:06]                   │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated role [no_kibana_privileges]
[00:04:06]                   │ debg creating user superuser
[00:04:06]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated user [superuser]
[00:04:06]                   │ debg created user superuser
[00:04:06]                   │ debg creating user global_read
[00:04:07]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated user [global_read]
[00:04:07]                   │ debg created user global_read
[00:04:07]                   │ debg creating role global_read_role
[00:04:07]                   │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated role [global_read_role]
[00:04:07]                   │ debg creating user space_1_all
[00:04:07]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated user [space_1_all]
[00:04:07]                   │ debg created user space_1_all
[00:04:07]                   │ debg creating role space_1_all_role
[00:04:07]                   │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated role [space_1_all_role]
[00:04:07]                   │ debg creating user space_1_all_with_restricted_fixture
[00:04:07]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated user [space_1_all_with_restricted_fixture]
[00:04:07]                   │ debg created user space_1_all_with_restricted_fixture
[00:04:07]                   │ debg creating role space_1_all_with_restricted_fixture_role
[00:04:07]                   │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated role [space_1_all_with_restricted_fixture_role]
[00:04:07]                   │ debg creating user space_1_all_alerts_none_actions
[00:04:07]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated user [space_1_all_alerts_none_actions]
[00:04:07]                   │ debg created user space_1_all_alerts_none_actions
[00:04:07]                   │ debg creating role space_1_all_alerts_none_actions_role
[00:04:07]                   │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1615330316900038857] updated role [space_1_all_alerts_none_actions_role]
[00:05:01]                 └-: space_1_all_alerts_none_actions at space1
[00:05:01]                   └-> "before all" hook for "should schedule actions on legacy alerts"
[00:05:01]                   └-> "before all" hook for "should schedule actions on legacy alerts"
[00:05:01]                   └-> should schedule actions on legacy alerts
[00:05:01]                     └-> "before each" hook: global before each for "should schedule actions on legacy alerts"
[00:05:01]                     │ proc [kibana]   log   [23:36:39.121] [info][eventLog][plugins] event logged: {"@timestamp":"2021-03-09T23:36:38.250Z","event":{"provider":"alerting","action":"execute","start":"2021-03-09T23:36:38.250Z","outcome":"success","end":"2021-03-09T23:36:39.121Z","duration":871000000},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"362e362b-a137-4aa2-9434-43e3d0d84a34","namespace":"space1"}],"alerting":{"status":"active"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"alert executed: test.always-firing:362e362b-a137-4aa2-9434-43e3d0d84a34: 'Updated Alert'","ecs":{"version":"1.6.0"}}
[00:05:01]                     │ proc [kibana]   log   [23:36:39.126] [info][eventLog][plugins] event logged: {"@timestamp":"2021-03-09T23:36:38.250Z","event":{"provider":"alerting","action":"execute","start":"2021-03-09T23:36:38.250Z","outcome":"success","end":"2021-03-09T23:36:39.125Z","duration":875000000},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"d41a6abb-b93b-46df-a80a-926221ea847c","namespace":"space1"}],"alerting":{"status":"active"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"alert executed: test.always-firing:d41a6abb-b93b-46df-a80a-926221ea847c: 'Updated Alert'","ecs":{"version":"1.6.0"}}
[00:05:01]                     │ proc [kibana]   log   [23:36:39.135] [info][eventLog][plugins] event logged: {"@timestamp":"2021-03-09T23:36:38.250Z","event":{"provider":"alerting","action":"execute","start":"2021-03-09T23:36:38.250Z","outcome":"success","end":"2021-03-09T23:36:39.134Z","duration":884000000},"kibana":{"saved_objects":[{"rel":"primary","type":"alert","id":"5cc59319-74ee-4edc-8646-a79ea91067cd","namespace":"space1"}],"alerting":{"status":"active"},"server_uuid":"5b2de169-2785-441b-ae8c-186a1936b17d"},"message":"alert executed: test.always-firing:5cc59319-74ee-4edc-8646-a79ea91067cd: 'Updated Alert'","ecs":{"version":"1.6.0"}}
[00:05:03]                     │ proc [kibana]   log   [23:36:41.165] [error][http] ResponseError: [task:e9c069d0-eea4-11ea-a285-352ee3aecffa]: version conflict, required seqNo [311], primary term [2]. current document has seqNo [316] and primary term [2]: version_conflict_engine_exception
[00:05:03]                     │ proc [kibana]     at onBody (/dev/shm/workspace/kibana-build-xpack-24/node_modules/@elastic/elasticsearch/lib/Transport.js:333:23)
[00:05:03]                     │ proc [kibana]     at IncomingMessage.onEnd (/dev/shm/workspace/kibana-build-xpack-24/node_modules/@elastic/elasticsearch/lib/Transport.js:260:11)
[00:05:03]                     │ proc [kibana]     at IncomingMessage.emit (events.js:327:22)
[00:05:03]                     │ proc [kibana]     at endReadableNT (internal/streams/readable.js:1327:12)
[00:05:03]                     │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:80:21) {
[00:05:03]                     │ proc [kibana]   meta: {
[00:05:03]                     │ proc [kibana]     body: { error: [Object], status: 409 },
[00:05:03]                     │ proc [kibana]     statusCode: 409,
[00:05:03]                     │ proc [kibana]     headers: {
[00:05:03]                     │ proc [kibana]       'content-type': 'application/json;charset=utf-8',
[00:05:03]                     │ proc [kibana]       'content-length': '645'
[00:05:03]                     │ proc [kibana]     },
[00:05:03]                     │ proc [kibana]     meta: {
[00:05:03]                     │ proc [kibana]       context: null,
[00:05:03]                     │ proc [kibana]       request: [Object],
[00:05:03]                     │ proc [kibana]       name: 'elasticsearch-js',
[00:05:03]                     │ proc [kibana]       connection: [Object],
[00:05:03]                     │ proc [kibana]       attempts: 0,
[00:05:03]                     │ proc [kibana]       aborted: false
[00:05:03]                     │ proc [kibana]     }
[00:05:03]                     │ proc [kibana]   },
[00:05:03]                     │ proc [kibana]   isBoom: true,
[00:05:03]                     │ proc [kibana]   isServer: false,
[00:05:03]                     │ proc [kibana]   data: null,
[00:05:03]                     │ proc [kibana]   output: {
[00:05:03]                     │ proc [kibana]     statusCode: 409,
[00:05:03]                     │ proc [kibana]     payload: {
[00:05:03]                     │ proc [kibana]       message: '[task:e9c069d0-eea4-11ea-a285-352ee3aecffa]: version conflict, required seqNo [311], primary term [2]. current document has seqNo [316] and primary term [2]: version_conflict_engine_exception',
[00:05:03]                     │ proc [kibana]       statusCode: 409,
[00:05:03]                     │ proc [kibana]       error: 'Conflict'
[00:05:03]                     │ proc [kibana]     },
[00:05:03]                     │ proc [kibana]     headers: {}
[00:05:03]                     │ proc [kibana]   },
[00:05:03]                     │ proc [kibana]   [Symbol(SavedObjectsClientErrorCode)]: 'SavedObjectsClient/conflict'
[00:05:03]                     │ proc [kibana] }
[00:05:03]                     └- ✖ fail: alerting api integration security and spaces enabled Alerts legacy alerts alerts space_1_all_alerts_none_actions at space1 should schedule actions on legacy alerts
[00:05:03]                     │      Error: expected 200 "OK", got 500 "Internal Server Error"
[00:05:03]                     │       at Test._assertStatus (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:268:12)
[00:05:03]                     │       at Test._assertFunction (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:283:11)
[00:05:03]                     │       at Test.assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:173:18)
[00:05:03]                     │       at assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:131:12)
[00:05:03]                     │       at /dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:128:5
[00:05:03]                     │       at Test.Request.callback (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:718:3)
[00:05:03]                     │       at /dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
[00:05:03]                     │       at IncomingMessage.<anonymous> (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
[00:05:03]                     │       at endReadableNT (internal/streams/readable.js:1327:12)
[00:05:03]                     │       at processTicksAndRejections (internal/process/task_queues.js:80:21)
[00:05:03]                     │ 
[00:05:03]                     │ 

Stack Trace

Error: expected 200 "OK", got 500 "Internal Server Error"
    at Test._assertStatus (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:268:12)
    at Test._assertFunction (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:283:11)
    at Test.assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:173:18)
    at assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:131:12)
    at /dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:128:5
    at Test.Request.callback (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:718:3)
    at /dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
    at IncomingMessage.<anonymous> (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

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
enterpriseSearch 2.1MB 2.1MB +1.2KB

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

@cee-chen
Copy link
Contributor Author

Thanks for the reviews all! 🎉 I'm merging now to unblock myself from opening more PRs, but don't hesitate to leave more comments / make change requests @JasonStoltz - I'm happy to open up a follow up PR

@cee-chen cee-chen merged commit 89b23c0 into elastic:master Mar 10, 2021
@cee-chen cee-chen deleted the curation-kea-setup branch March 10, 2021 01:10
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 10, 2021
… props support (elastic#94232)

* Enhance our LogicMounter helper to accept and build props

* Update logic tests in AS that require props to now use LogicMounter

* Upgrade Kea to 2.3.0 for future BindLogic use
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.x / #94253

Successful backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Mar 10, 2021
… props support (#94232) (#94253)

* Enhance our LogicMounter helper to accept and build props

* Update logic tests in AS that require props to now use LogicMounter

* Upgrade Kea to 2.3.0 for future BindLogic use

Co-authored-by: Constance <constancecchen@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Plugins release_note:skip Skip the PR/issue when compiling release notes v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants