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

use index patterns and search services for autocomplete #92861

Merged
merged 12 commits into from
Mar 17, 2021

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Feb 25, 2021

Summary

This PR introduces a server side indexPatterns context service and uses it in the autocomplete provider.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@lizozom lizozom self-assigned this Feb 25, 2021
Copy link
Contributor

@mattkime mattkime left a comment

Choose a reason for hiding this comment

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

Overall looks good but I think we might want to swap find with get

const indexPattern = await findIndexPatternById(context.core.savedObjects.client, index);

const field = indexPattern && getFieldByName(fieldName, indexPattern);
const indexPatterns = await context.indexPatterns.find(index, 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you want to use get instead of find. find searches by title, get uses id

Copy link
Contributor Author

Choose a reason for hiding this comment

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

get uses the id fields, and the index here is the title.

@mattkime
Copy link
Contributor

While this doesn't resolve #91036 its still worthwhile for addressing #91715

@lizozom
Copy link
Contributor Author

lizozom commented Mar 1, 2021

@mattkime if so, I think this is not a 7.12 bugfix, but a 7.13 improvement. Would you agree?

@mattkime
Copy link
Contributor

mattkime commented Mar 1, 2021

@lizozom agreed.

@lizozom
Copy link
Contributor Author

lizozom commented Mar 10, 2021

@elasticmachine merge upstream

@lizozom lizozom added Team:AppServices v7.13.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Mar 11, 2021
@lizozom lizozom marked this pull request as ready for review March 11, 2021 12:47
@lizozom lizozom requested review from a team as code owners March 11, 2021 12:47
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

Copy link
Member

@weltenwort weltenwort left a comment

Choose a reason for hiding this comment

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

infra changes LGTM

@lizozom
Copy link
Contributor Author

lizozom commented Mar 17, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / X-Pack Spaces API Integration Tests -- security_and_spaces.x-pack/test/spaces_api_integration/security_and_spaces/apis/delete·ts.spaces api with security delete superuser from the space_1 space should return 204 when referencing the space_1 space explicitly in the URL

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: spaces api with security
[00:00:00]           └-> "before all" hook in "spaces api with security"
[00:00:00]           └-> "before all" hook in "spaces api with security"
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_legacy_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_dual_privileges_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_dual_privileges_dashboard_only_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_dashboard_only_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_default_space_all_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_default_space_read_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_space_1_all_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_space_1_read_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_space_2_all_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_space_2_read_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_space_1_2_all_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_space_1_2_read_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_default_space_saved_objects_all_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_default_space_saved_objects_read_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_space_1_saved_objects_all_user]
[00:00:01]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added role [kibana_rbac_space_1_saved_objects_read_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [not_a_kibana_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_legacy_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_dual_privileges_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_dual_privileges_dashboard_only_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_dashboard_only_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_default_space_all_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_default_space_read_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_space_1_all_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_space_1_read_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_space_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_space_2_read_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_space_1_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_space_1_2_read_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_default_space_saved_objects_all_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_default_space_saved_objects_read_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_space_1_saved_objects_all_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_kibana_rbac_space_1_saved_objects_read_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_apm_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_machine_learning_admin]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_machine_learning_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] added user [a_monitoring_user]
[00:03:54]           └-: delete
[00:03:54]             └-> "before all" hook in "delete"
[00:04:56]             └-: superuser from the space_1 space
[00:04:56]               └-> "before all" hook for "should return 204 when referencing the space_1 space explicitly in the URL"
[00:04:56]               └-> should return 204 when referencing the space_1 space explicitly in the URL
[00:04:56]                 └-> "before each" hook: global before each for "should return 204 when referencing the space_1 space explicitly in the URL"
[00:04:56]                 └-> "before each" hook for "should return 204 when referencing the space_1 space explicitly in the URL"
[00:04:56]                   │ info [saved_objects/spaces] Loading "mappings.json"
[00:04:56]                   │ info [saved_objects/spaces] Loading "data.json"
[00:04:57]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] [.kibana_8.0.0_001/QF2-qxf0S0inlwLdoZaVyw] deleting index
[00:04:57]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] [.kibana_task_manager_8.0.0_001/IPcNoHDvQTijwPmQy79naA] deleting index
[00:04:57]                   │ info [saved_objects/spaces] Deleted existing index ".kibana_8.0.0_001"
[00:04:57]                   │ info [saved_objects/spaces] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:04:57]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] [.kibana_8.0.0_001] creating index, cause [api], templates [], shards [1]/[0]
[00:04:57]                   │ info [saved_objects/spaces] Created index ".kibana_8.0.0_001"
[00:04:57]                   │ debg [saved_objects/spaces] ".kibana_8.0.0_001" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:57]                   │ info [saved_objects/spaces] Indexed 31 docs into ".kibana"
[00:04:57]                   │ debg Migrating saved objects
[00:04:57]                   │ proc [kibana]   log   [14:06:24.165] [warning][collector-set][plugins][usageCollection] ResponseError: index_not_found_exception
[00:04:57]                   │ proc [kibana]     at onBody (/dev/shm/workspace/kibana-build-xpack-1/node_modules/@elastic/elasticsearch/lib/Transport.js:333:23)
[00:04:57]                   │ proc [kibana]     at IncomingMessage.onEnd (/dev/shm/workspace/kibana-build-xpack-1/node_modules/@elastic/elasticsearch/lib/Transport.js:260:11)
[00:04:57]                   │ proc [kibana]     at IncomingMessage.emit (events.js:327:22)
[00:04:57]                   │ proc [kibana]     at endReadableNT (internal/streams/readable.js:1327:12)
[00:04:57]                   │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:80:21) {
[00:04:57]                   │ proc [kibana]   meta: {
[00:04:57]                   │ proc [kibana]     body: { error: [Object], status: 404 },
[00:04:57]                   │ proc [kibana]     statusCode: 404,
[00:04:57]                   │ proc [kibana]     headers: {
[00:04:57]                   │ proc [kibana]       'content-type': 'application/json;charset=utf-8',
[00:04:57]                   │ proc [kibana]       'content-length': '449'
[00:04:57]                   │ proc [kibana]     },
[00:04:57]                   │ proc [kibana]     meta: {
[00:04:57]                   │ proc [kibana]       context: null,
[00:04:57]                   │ proc [kibana]       request: [Object],
[00:04:57]                   │ proc [kibana]       name: 'elasticsearch-js',
[00:04:57]                   │ proc [kibana]       connection: [Object],
[00:04:57]                   │ proc [kibana]       attempts: 0,
[00:04:57]                   │ proc [kibana]       aborted: false
[00:04:57]                   │ proc [kibana]     }
[00:04:57]                   │ proc [kibana]   }
[00:04:57]                   │ proc [kibana] }
[00:04:57]                   │ proc [kibana]   log   [14:06:24.174] [warning][collector-set][plugins][usageCollection] Unable to fetch data from core collector
[00:04:57]                   │ proc [kibana]   log   [14:06:24.231] [warning][collector-set][plugins][usageCollection] ResponseError: search_phase_execution_exception
[00:04:57]                   │ proc [kibana]     at onBody (/dev/shm/workspace/kibana-build-xpack-1/node_modules/@elastic/elasticsearch/lib/Transport.js:333:23)
[00:04:57]                   │ proc [kibana]     at IncomingMessage.onEnd (/dev/shm/workspace/kibana-build-xpack-1/node_modules/@elastic/elasticsearch/lib/Transport.js:260:11)
[00:04:57]                   │ proc [kibana]     at IncomingMessage.emit (events.js:327:22)
[00:04:57]                   │ proc [kibana]     at endReadableNT (internal/streams/readable.js:1327:12)
[00:04:57]                   │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:80:21) {
[00:04:57]                   │ proc [kibana]   meta: {
[00:04:57]                   │ proc [kibana]     body: { error: [Object], status: 400 },
[00:04:57]                   │ proc [kibana]     statusCode: 400,
[00:04:57]                   │ proc [kibana]     headers: {
[00:04:57]                   │ proc [kibana]       'content-type': 'application/json;charset=utf-8',
[00:04:57]                   │ proc [kibana]       'content-length': '752'
[00:04:57]                   │ proc [kibana]     },
[00:04:57]                   │ proc [kibana]     meta: {
[00:04:57]                   │ proc [kibana]       context: null,
[00:04:57]                   │ proc [kibana]       request: [Object],
[00:04:57]                   │ proc [kibana]       name: 'elasticsearch-js',
[00:04:57]                   │ proc [kibana]       connection: [Object],
[00:04:57]                   │ proc [kibana]       attempts: 0,
[00:04:57]                   │ proc [kibana]       aborted: false
[00:04:57]                   │ proc [kibana]     }
[00:04:57]                   │ proc [kibana]   }
[00:04:57]                   │ proc [kibana] }
[00:04:57]                   │ proc [kibana]   log   [14:06:24.232] [warning][collector-set][plugins][usageCollection] Unable to fetch data from saved_objects_tagging collector
[00:04:57]                   │ proc [kibana]   log   [14:06:24.254] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET
[00:04:57]                   │ proc [kibana]   log   [14:06:24.258] [info][savedobjects-service] [.kibana] INIT -> OUTDATED_DOCUMENTS_SEARCH
[00:04:57]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] [.kibana_task_manager_8.0.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:04:57]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:04:57]                   │ proc [kibana]   log   [14:06:24.270] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH -> UPDATE_TARGET_MAPPINGS
[00:04:57]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] [.kibana_8.0.0_001/9MgnUjgbQP2S674jhbF3eA] update_mapping [_doc]
[00:04:57]                   │ proc [kibana]   log   [14:06:24.329] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK
[00:04:57]                   │ proc [kibana]   log   [14:06:24.342] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY
[00:04:57]                   │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] 60511 finished with response BulkByScrollResponse[took=22.6ms,timed_out=false,sliceId=null,updated=31,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:57]                   │ proc [kibana]   log   [14:06:24.365] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE
[00:04:57]                   │ proc [kibana]   log   [14:06:24.366] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 120ms
[00:04:57]                   │ proc [kibana]   log   [14:06:24.438] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> DONE
[00:04:57]                   │ proc [kibana]   log   [14:06:24.438] [info][savedobjects-service] [.kibana] Migration completed after 193ms
[00:04:57]                   │ debg [saved_objects/spaces] Migrated Kibana index after loading Kibana data
[00:04:57]                   │ debg [saved_objects/spaces] Ensured that default space exists in .kibana
[00:04:57]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1615986543857626098] [.kibana_8.0.0_001/9MgnUjgbQP2S674jhbF3eA] update_mapping [_doc]
[00:04:59]                 └- ✖ fail: spaces api with security delete superuser from the space_1 space should return 204 when referencing the space_1 space explicitly in the URL
[00:04:59]                 │       Error: expected [ { key: 'default',
[00:04:59]                 │     doc_count: 8,
[00:04:59]                 │     countByType: 
[00:04:59]                 │      { doc_count_error_upper_bound: 0,
[00:04:59]                 │        sum_other_doc_count: 0,
[00:04:59]                 │        buckets: [Object] } },
[00:04:59]                 │   { key: 'space_1',
[00:04:59]                 │     doc_count: 7,
[00:04:59]                 │     countByType: 
[00:04:59]                 │      { doc_count_error_upper_bound: 0,
[00:04:59]                 │        sum_other_doc_count: 0,
[00:04:59]                 │        buckets: [Object] } } ] to sort of equal [ { key: 'default',
[00:04:59]                 │     doc_count: 9,
[00:04:59]                 │     countByType: 
[00:04:59]                 │      { doc_count_error_upper_bound: 0,
[00:04:59]                 │        sum_other_doc_count: 0,
[00:04:59]                 │        buckets: [Object] } },
[00:04:59]                 │   { doc_count: 7,
[00:04:59]                 │     key: 'space_1',
[00:04:59]                 │     countByType: 
[00:04:59]                 │      { doc_count_error_upper_bound: 0,
[00:04:59]                 │        sum_other_doc_count: 0,
[00:04:59]                 │        buckets: [Object] } } ]
[00:04:59]                 │       + expected - actual
[00:04:59]                 │ 
[00:04:59]                 │                  "key": "space"
[00:04:59]                 │                }
[00:04:59]                 │                {
[00:04:59]                 │                  "doc_count": 1
[00:04:59]                 │       +          "key": "config"
[00:04:59]                 │       +        }
[00:04:59]                 │       +        {
[00:04:59]                 │       +          "doc_count": 1
[00:04:59]                 │                  "key": "index-pattern"
[00:04:59]                 │                }
[00:04:59]                 │              ]
[00:04:59]                 │              "doc_count_error_upper_bound": 0
[00:04:59]                 │              "sum_other_doc_count": 0
[00:04:59]                 │            }
[00:04:59]                 │       -    "doc_count": 8
[00:04:59]                 │       +    "doc_count": 9
[00:04:59]                 │            "key": "default"
[00:04:59]                 │          }
[00:04:59]                 │          {
[00:04:59]                 │            "countByType": {
[00:04:59]                 │       
[00:04:59]                 │       at Assertion.assert (/dev/shm/workspace/parallel/1/kibana/node_modules/@kbn/expect/expect.js:100:11)
[00:04:59]                 │       at Assertion.eql (/dev/shm/workspace/parallel/1/kibana/node_modules/@kbn/expect/expect.js:244:8)
[00:04:59]                 │       at expectEmptyResult (test/spaces_api_integration/common/suites/delete.ts:133:24)
[00:04:59]                 │       at runMicrotasks (<anonymous>)
[00:04:59]                 │       at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:04:59]                 │ 
[00:04:59]                 │ 

Stack Trace

Error: expected [ { key: 'default',
    doc_count: 8,
    countByType: 
     { doc_count_error_upper_bound: 0,
       sum_other_doc_count: 0,
       buckets: [Object] } },
  { key: 'space_1',
    doc_count: 7,
    countByType: 
     { doc_count_error_upper_bound: 0,
       sum_other_doc_count: 0,
       buckets: [Object] } } ] to sort of equal [ { key: 'default',
    doc_count: 9,
    countByType: 
     { doc_count_error_upper_bound: 0,
       sum_other_doc_count: 0,
       buckets: [Object] } },
  { doc_count: 7,
    key: 'space_1',
    countByType: 
     { doc_count_error_upper_bound: 0,
       sum_other_doc_count: 0,
       buckets: [Object] } } ]
    at Assertion.assert (/dev/shm/workspace/parallel/1/kibana/node_modules/@kbn/expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/1/kibana/node_modules/@kbn/expect/expect.js:244:8)
    at expectEmptyResult (test/spaces_api_integration/common/suites/delete.ts:133:24)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  actual: '[\n' +
    '  {\n' +
    '    "countByType": {\n' +
    '      "buckets": [\n' +
    '        {\n' +
    '          "doc_count": 3\n' +
    '          "key": "visualization"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "dashboard"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "space"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "index-pattern"\n' +
    '        }\n' +
    '      ]\n' +
    '      "doc_count_error_upper_bound": 0\n' +
    '      "sum_other_doc_count": 0\n' +
    '    }\n' +
    '    "doc_count": 8\n' +
    '    "key": "default"\n' +
    '  }\n' +
    '  {\n' +
    '    "countByType": {\n' +
    '      "buckets": [\n' +
    '        {\n' +
    '          "doc_count": 3\n' +
    '          "key": "visualization"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "dashboard"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "config"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "index-pattern"\n' +
    '        }\n' +
    '      ]\n' +
    '      "doc_count_error_upper_bound": 0\n' +
    '      "sum_other_doc_count": 0\n' +
    '    }\n' +
    '    "doc_count": 7\n' +
    '    "key": "space_1"\n' +
    '  }\n' +
    ']',
  expected: '[\n' +
    '  {\n' +
    '    "countByType": {\n' +
    '      "buckets": [\n' +
    '        {\n' +
    '          "doc_count": 3\n' +
    '          "key": "visualization"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "dashboard"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "space"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "config"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "index-pattern"\n' +
    '        }\n' +
    '      ]\n' +
    '      "doc_count_error_upper_bound": 0\n' +
    '      "sum_other_doc_count": 0\n' +
    '    }\n' +
    '    "doc_count": 9\n' +
    '    "key": "default"\n' +
    '  }\n' +
    '  {\n' +
    '    "countByType": {\n' +
    '      "buckets": [\n' +
    '        {\n' +
    '          "doc_count": 3\n' +
    '          "key": "visualization"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "dashboard"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "config"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "index-pattern"\n' +
    '        }\n' +
    '      ]\n' +
    '      "doc_count_error_upper_bound": 0\n' +
    '      "sum_other_doc_count": 0\n' +
    '    }\n' +
    '    "doc_count": 7\n' +
    '    "key": "space_1"\n' +
    '  }\n' +
    ']',
  showDiff: true
}

Metrics [docs]

✅ unchanged

History

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

cc @lizozom

@lizozom lizozom merged commit 2ef7f3b into elastic:master Mar 17, 2021
@lizozom lizozom added the auto-backport Deprecated - use backport:version if exact versions are needed label Mar 17, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Mar 17, 2021
* use index patterns and search services for autocomplete

* imports

* extend DataRequestHandlerContext

* Catch error if index patterns service can't be created.

* doc

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.x / #94826

Successful backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Mar 18, 2021
)

* use index patterns and search services for autocomplete

* imports

* extend DataRequestHandlerContext

* Catch error if index patterns service can't be created.

* doc

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Liza Katz <lizka.k@gmail.com>
lizozom added a commit that referenced this pull request Mar 24, 2021
lizozom added a commit that referenced this pull request Mar 24, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 24, 2021
@mattkime
Copy link
Contributor

This was reverted because it doesn't work with index pattern like objects.

kibanamachine added a commit that referenced this pull request Apr 4, 2021
…#92861)" (#95335) (#95360)

* Revert "use index patterns and search services for autocomplete (#92861)" (#95335)

This reverts commit 2ef7f3b.

* es

Co-authored-by: Liza Katz <lizka.k@gmail.com>
Co-authored-by: Liza K <liza.katz@elastic.co>
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 release_note:skip Skip the PR/issue when compiling release notes v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants