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

[APM] NP Migration - Saved Objects Client #57438

Closed

Conversation

ogupte
Copy link
Contributor

@ogupte ogupte commented Feb 12, 2020

Closes #56832

Migrates uses of the saved objects client to the internal and context scoped clients exposed in the new platform core setup.

and context scoped clients exposed in the new platform core setup
@ogupte ogupte added release_note:skip Skip the PR/issue when compiling release notes v7.7.0 labels Feb 12, 2020
@ogupte ogupte requested review from a team as code owners February 12, 2020 11:11
const apmIndices = await framework.plugins.apm.getApmIndices(
requestContext.core.savedObjects.client
);
const apmIndices = await framework.plugins.apm.getApmIndices();
Copy link
Member

Choose a reason for hiding this comment

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

Nice!!

Copy link
Member

@jasonrhodes jasonrhodes 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, thanks!

@ogupte
Copy link
Contributor Author

ogupte commented Feb 12, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💔 Build Failed


Test Failures

Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/advanced_settings/feature_controls/advanced_settings_security·ts.Advanced Settings security feature controls no advanced_settings privileges does not allow navigation to advanced settings; redirects to management home

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: Advanced Settings
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: security feature controls
[00:00:00]             └-> "before all" hook
[00:00:00]             └-> "before all" hook
[00:00:00]               │ info [empty_kibana] Loading "mappings.json"
[00:00:00]               │ info [empty_kibana] Loading "data.json.gz"
[00:00:00]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_1/GITIpvv6QL23n_nKZB-DEQ] deleting index
[00:00:00]               │ info [empty_kibana] Deleted existing index [".kibana_1"]
[00:00:00]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:00]               │ info [empty_kibana] Created index ".kibana"
[00:00:00]               │ debg [empty_kibana] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:00]               │ info [empty_kibana] Indexed 2 docs into ".kibana"
[00:00:44]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana/OPRMqamiTamVA8fiTiV5TA] update_mapping [_doc]
[00:00:47]               │ info Creating index .kibana_2.
[00:00:47]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:47]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] updating number_of_replicas to [0] for indices [.kibana_2]
[00:00:47]               │ info Reindexing .kibana to .kibana_1
[00:00:47]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:47]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] updating number_of_replicas to [0] for indices [.kibana_1]
[00:00:47]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1], mappings [_doc]
[00:00:47]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] updating number_of_replicas to [0] for indices [.tasks]
[00:00:47]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] 809 finished with response BulkByScrollResponse[took=51.2ms,timed_out=false,sliceId=null,updated=0,created=4,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:48]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana/OPRMqamiTamVA8fiTiV5TA] deleting index
[00:00:48]               │ info Migrating .kibana_1 saved objects to .kibana_2
[00:00:48]               │ debg Migrating saved objects config:6.0.0-alpha1, space:default, maps-telemetry:maps-telemetry, config:8.0.0-SNAPSHOT
[00:00:48]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2/2uz0SZXAQHeXj5BcNEqijA] update_mapping [_doc]
[00:00:48]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2/2uz0SZXAQHeXj5BcNEqijA] update_mapping [_doc]
[00:00:48]               │ info Pointing alias .kibana to .kibana_2.
[00:00:48]               │ info Finished in 877ms.
[00:00:48]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:00:48]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2/2uz0SZXAQHeXj5BcNEqijA] update_mapping [_doc]
[00:02:24]             └-: no advanced_settings privileges
[00:02:24]               └-> "before all" hook
[00:02:24]               └-> "before all" hook
[00:02:24]                 │ debg creating role no_advanced_settings_privileges_role
[00:02:24]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added role [no_advanced_settings_privileges_role]
[00:02:24]                 │ debg created role no_advanced_settings_privileges_role
[00:02:24]                 │ debg creating user no_advanced_settings_privileges_user
[00:02:24]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added user [no_advanced_settings_privileges_user]
[00:02:24]                 │ debg created user no_advanced_settings_privileges_user
[00:02:24]                 │ debg navigating to login url: http://localhost:6131/login
[00:02:24]                 │ debg Navigate to: http://localhost:6131/login
[00:02:24]                 │ proc [kibana]   log   [23:34:34.854] [info][authentication][plugins][security] Authentication attempt failed: [security_exception] unable to authenticate user [global_advanced_settings_read_user] for REST request [/_security/_authenticate], with { header={ WWW-Authenticate="Basic realm=\"security\" charset=\"UTF-8\"" } }
[00:02:24]                 │ debg ... sleep(700) start
[00:02:24]                 │ERROR browser[SEVERE] http://localhost:6131/ - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:02:25]                 │ debg ... sleep(700) end
[00:02:25]                 │ debg returned from get, calling refresh
[00:02:25]                 │ debg browser[INFO] http://localhost:6131/login?next=%2F 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:25]                 │
[00:02:25]                 │ debg browser[INFO] http://localhost:6131/bundles/app/login/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:25]                 │ debg currentUrl = http://localhost:6131/login?next=%2F
[00:02:25]                 │          appUrl = http://localhost:6131/login
[00:02:25]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:29]                 │ debg browser[INFO] http://localhost:6131/built_assets/dlls/vendors_3.bundle.dll.js 582:139970 "INFO: 2020-02-12T23:34:38Z
[00:02:29]                 │        Adding connection to http://localhost:6131/elasticsearch
[00:02:29]                 │
[00:02:29]                 │      "
[00:02:29]                 │ debg ... sleep(501) start
[00:02:29]                 │ debg ... sleep(501) end
[00:02:29]                 │ debg in navigateTo url = http://localhost:6131/login?next=%2F#/
[00:02:29]                 │ debg TestSubjects.exists(statusPageContainer)
[00:02:29]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:02:32]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:02:32]                 │ debg TestSubjects.setValue(loginUsername, no_advanced_settings_privileges_user)
[00:02:32]                 │ debg TestSubjects.click(loginUsername)
[00:02:32]                 │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:02:32]                 │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:02:33]                 │ debg TestSubjects.setValue(loginPassword, no_advanced_settings_privileges_user-password)
[00:02:33]                 │ debg TestSubjects.click(loginPassword)
[00:02:33]                 │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:02:33]                 │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:02:33]                 │ debg TestSubjects.click(loginSubmit)
[00:02:33]                 │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:02:33]                 │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:02:33]                 │ debg Waiting up to 20000ms for logout button visible...
[00:02:33]                 │ debg TestSubjects.exists(userMenuButton)
[00:02:33]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:02:36]                 │ debg browser[INFO] http://localhost:6131/app/kibana#/ 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:36]                 │
[00:02:36]                 │ debg browser[INFO] http://localhost:6131/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:36]                 │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:02:37]                 │ debg TestSubjects.exists(userMenuButton)
[00:02:37]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:02:40]                 │ debg browser[INFO] http://localhost:6131/built_assets/dlls/vendors_3.bundle.dll.js 582:139970 "INFO: 2020-02-12T23:34:48Z
[00:02:40]                 │        Adding connection to http://localhost:6131/elasticsearch
[00:02:40]                 │
[00:02:40]                 │      "
[00:02:40]                 │ debg TestSubjects.exists(userMenu)
[00:02:40]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:02:42]                 │ debg --- retry.tryForTime error: [data-test-subj="userMenu"] is not displayed
[00:02:43]                 │ debg TestSubjects.click(userMenuButton)
[00:02:43]                 │ debg Find.clickByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:02:43]                 │ debg Find.findByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:02:43]                 │ debg Waiting up to 20000ms for user menu opened...
[00:02:43]                 │ debg TestSubjects.exists(userMenu)
[00:02:43]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:02:43]                 │ debg TestSubjects.exists(userMenu > logoutLink)
[00:02:43]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"] [data-test-subj="logoutLink"]') with timeout=2500
[00:02:43]               └-> shows Management navlink
[00:02:43]                 └-> "before each" hook: global before each
[00:02:43]                 │ debg TestSubjects.find(navDrawer)
[00:02:43]                 │ debg Find.findByCssSelector('[data-test-subj="navDrawer"]') with timeout=10000
[00:02:43]                 └- ✓ pass  (37ms) "Advanced Settings security feature controls no advanced_settings privileges shows Management navlink"
[00:02:43]               └-> does not allow navigation to advanced settings; redirects to management home
[00:02:43]                 └-> "before each" hook: global before each
[00:02:43]                 │ debg navigateToActualUrl http://localhost:6131/app/kibana#management/kibana/settings
[00:02:43]                 │ debg browser[INFO] http://localhost:6131/app/kibana?_t=1581550493596#management/kibana/settings 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:43]                 │
[00:02:43]                 │ debg browser[INFO] http://localhost:6131/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:43]                 │ debg TestSubjects.exists(managementHome)
[00:02:43]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="managementHome"]') with timeout=10000
[00:02:46]                 │ debg --- retry.tryForTime error: [data-test-subj="managementHome"] is not displayed
[00:02:50]                 │ debg browser[INFO] http://localhost:6131/built_assets/dlls/vendors_3.bundle.dll.js 582:139970 "INFO: 2020-02-12T23:34:58Z
[00:02:50]                 │        Adding connection to http://localhost:6131/elasticsearch
[00:02:50]                 │
[00:02:50]                 │      "
[00:02:50]                 │ debg browser[INFO] http://localhost:6131/app/kibana#/management 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:02:50]                 │
[00:02:50]                 │ debg browser[INFO] http://localhost:6131/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:50]                 │ debg --- retry.tryForTime failed again with the same message...
[00:02:53]                 │ debg --- retry.tryForTime failed again with the same message...
[00:02:54]                 │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional/screenshots/failure/Advanced Settings security feature controls no advanced_settings privileges does not allow navigation to advanced settings_ redirects to management home.png"
[00:02:56]                 │ debg browser[INFO] http://localhost:6131/built_assets/dlls/vendors_3.bundle.dll.js 582:139970 "INFO: 2020-02-12T23:35:04Z
[00:02:56]                 │        Adding connection to http://localhost:6131/elasticsearch
[00:02:56]                 │
[00:02:56]                 │      "
[00:02:56]                 │ info Current URL is: http://localhost:6131/app/kibana#/management?_g=()
[00:02:57]                 │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional/failure_debug/html/Advanced Settings security feature controls no advanced_settings privileges does not allow navigation to advanced settings_ redirects to management home.html
[00:02:57]                 └- ✖ fail: "Advanced Settings security feature controls no advanced_settings privileges does not allow navigation to advanced settings; redirects to management home"
[00:02:57]                 │

Stack Trace

Error: expected testSubject(managementHome) to exist
    at TestSubjects.existOrFail (/dev/shm/workspace/kibana/test/functional/services/test_subjects.ts:60:15)

Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/rollup_job/tsvb·js.rollup app tsvb integration create rollup tsvb

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:28:56]         └-: rollup app
[00:28:56]           └-> "before all" hook
[00:30:24]           └-: tsvb integration
[00:30:24]             └-> "before all" hook
[00:30:24]             └-> "before all" hook
[00:30:24]               │ info [visualize/default] Loading "mappings.json"
[00:30:24]               │ info [visualize/default] Loading "data.json"
[00:30:24]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_1/Nqnm4IYaR1-KVtgFVdu-1A] deleting index
[00:30:24]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2/hziftB6EQ-e_RVBYgwXFxQ] deleting index
[00:30:24]               │ info [visualize/default] Deleted existing index [".kibana_2",".kibana_1"]
[00:30:24]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:30:24]               │ info [visualize/default] Created index ".kibana"
[00:30:24]               │ debg [visualize/default] ".kibana" settings {"index":{"number_of_shards":"1","auto_expand_replicas":"0-1","number_of_replicas":"0"}}
[00:30:24]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [metricbeat-7] creating index, cause [auto(bulk api)], templates [], shards [1]/[1], mappings []
[00:30:24]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [metricbeat-7/ASaNE6sVS-6MNoJUZcCB7g] create_mapping
[00:30:24]               │ info [visualize/default] Indexed 8 docs into ".kibana"
[00:30:24]               │ info [visualize/default] Indexed 1 docs into "metricbeat-7"
[00:30:26]               │ info Creating index .kibana_2.
[00:30:26]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:30:26]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] updating number_of_replicas to [0] for indices [.kibana_2]
[00:30:26]               │ info Reindexing .kibana to .kibana_1
[00:30:26]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:30:26]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] updating number_of_replicas to [0] for indices [.kibana_1]
[00:30:26]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] 70902 finished with response BulkByScrollResponse[took=123.2ms,timed_out=false,sliceId=null,updated=0,created=8,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:30:26]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana/ZEiKdSVPSiSAue5qHf7rNQ] deleting index
[00:30:26]               │ info Migrating .kibana_1 saved objects to .kibana_2
[00:30:27]               │ debg Migrating saved objects space:default, index-pattern:metricbeat-*, custom-space:index-pattern:metricbeat-*, index-pattern:logstash-*, custom_space:index-pattern:logstash-*, visualization:i-exist, custom_space:visualization:i-exist, query:okjpgs
[00:30:27]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2/fTAhKmLsSI-QEEyNj96NQQ] update_mapping [_doc]
[00:30:27]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2/fTAhKmLsSI-QEEyNj96NQQ] update_mapping [_doc]
[00:30:27]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2/fTAhKmLsSI-QEEyNj96NQQ] update_mapping [_doc]
[00:30:27]               │ info Pointing alias .kibana to .kibana_2.
[00:30:27]               │ info Finished in 832ms.
[00:30:27]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:30:27]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2/fTAhKmLsSI-QEEyNj96NQQ] update_mapping [_doc]
[00:30:28]             └-> create rollup tsvb
[00:30:28]               └-> "before each" hook: global before each
[00:30:28]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [rollup-source-data] creating index, cause [auto(bulk api)], templates [], shards [1]/[1], mappings []
[00:30:28]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [rollup-source-data/6ofQKqw6RjOnD9pGmeJNZQ] create_mapping
[00:30:28]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [rollup-target-data] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:30:28]               │ debg navigating to visualize url: http://localhost:6121/app/kibana#/visualize
[00:30:28]               │ debg Navigate to: http://localhost:6121/app/kibana#/visualize
[00:30:28]               │ info [o.e.x.r.j.RollupJobTask] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] Rollup job [tsvb-test-rollup-job-1581550306012] created.
[00:30:28]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [rollup-target-data/lbapHbyjTOmy5hl3gHP4NA] update_mapping [_doc]
[00:30:29]               │ debg ... sleep(700) start
[00:30:29]               │ debg browser[INFO] http://localhost:6121/app/kibana?_t=1581552136711#/visualize 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:30:29]               │
[00:30:29]               │ debg browser[INFO] http://localhost:6121/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:30:29]               │ debg ... sleep(700) end
[00:30:29]               │ debg returned from get, calling refresh
[00:30:30]               │ debg browser[INFO] http://localhost:6121/app/kibana?_t=1581552136711#/visualize 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:30:30]               │
[00:30:30]               │ debg browser[INFO] http://localhost:6121/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:30:30]               │ debg currentUrl = http://localhost:6121/app/kibana#/visualize
[00:30:30]               │          appUrl = http://localhost:6121/app/kibana#/visualize
[00:30:30]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:30:37]               │ debg TestSubjects.find(kibanaChrome)
[00:30:37]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:30:37]               │ debg browser[INFO] http://localhost:6121/built_assets/dlls/vendors_3.bundle.dll.js 582:139970 "INFO: 2020-02-13T00:02:22Z
[00:30:37]               │        Adding connection to http://localhost:6121/elasticsearch
[00:30:37]               │
[00:30:37]               │      "
[00:30:37]               │ debg ... sleep(501) start
[00:30:37]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] [.kibana_2/fTAhKmLsSI-QEEyNj96NQQ] update_mapping [_doc]
[00:30:38]               │ debg ... sleep(501) end
[00:30:38]               │ debg in navigateTo url = http://localhost:6121/app/kibana#/visualize?_g=(refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:30:38]               │ debg TestSubjects.exists(statusPageContainer)
[00:30:38]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:30:40]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:30:41]               │ debg TestSubjects.exists(newItemButton)
[00:30:41]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="newItemButton"]') with timeout=2500
[00:30:41]               │ debg TestSubjects.click(newItemButton)
[00:30:41]               │ debg Find.clickByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:30:41]               │ debg Find.findByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:30:41]               │ debg TestSubjects.find(visNewDialogTypes)
[00:30:41]               │ debg Find.findByCssSelector('[data-test-subj="visNewDialogTypes"]') with timeout=10000
[00:30:41]               │ debg TestSubjects.click(visType-metrics)
[00:30:41]               │ debg Find.clickByCssSelector('[data-test-subj="visType-metrics"]') with timeout=10000
[00:30:41]               │ debg Find.findByCssSelector('[data-test-subj="visType-metrics"]') with timeout=10000
[00:30:42]               │ debg isGlobalLoadingIndicatorVisible
[00:30:42]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:30:42]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:30:44]               │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:30:44]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:30:44]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:30:44]               │ debg TestSubjects.exists(tvbVisEditor)
[00:30:44]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="tvbVisEditor"]') with timeout=10000
[00:30:44]               │ debg openQuickSelectTimeMenu
[00:30:44]               │ debg TestSubjects.exists(superDatePickerQuickMenu)
[00:30:44]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerQuickMenu"]') with timeout=2500
[00:30:47]               │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerQuickMenu"] is not displayed
[00:30:48]               │ debg opening quick select menu
[00:30:48]               │ debg TestSubjects.click(superDatePickerToggleQuickMenuButton)
[00:30:48]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:30:48]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:30:48]               │ debg TestSubjects.click(superDatePickerCommonlyUsed_Last_24 hours)
[00:30:48]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerCommonlyUsed_Last_24 hours"]') with timeout=10000
[00:30:48]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerCommonlyUsed_Last_24 hours"]') with timeout=10000
[00:30:48]               │ debg TestSubjects.find(metricTsvbTypeBtn)
[00:30:48]               │ debg Find.findByCssSelector('[data-test-subj="metricTsvbTypeBtn"]') with timeout=10000
[00:30:48]               │ debg TestSubjects.exists(tsvbMetricValue)
[00:30:48]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="tsvbMetricValue"]') with timeout=10000
[00:30:49]               │ debg TestSubjects.click(metricEditorPanelOptionsBtn)
[00:30:49]               │ debg Find.clickByCssSelector('[data-test-subj="metricEditorPanelOptionsBtn"]') with timeout=10000
[00:30:49]               │ debg Find.findByCssSelector('[data-test-subj="metricEditorPanelOptionsBtn"]') with timeout=10000
[00:30:49]               │ debg isGlobalLoadingIndicatorVisible
[00:30:49]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:30:49]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:30:51]               │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:30:52]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:30:52]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:30:52]               │ debg TestSubjects.find(metricsIndexPatternInput)
[00:30:52]               │ debg Find.findByCssSelector('[data-test-subj="metricsIndexPatternInput"]') with timeout=10000
[00:30:52]               │ debg isGlobalLoadingIndicatorVisible
[00:30:52]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:30:52]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:30:54]               │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:30:54]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:30:54]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:30:54]               │ debg TestSubjects.find(metricsIndexPatternInterval)
[00:30:54]               │ debg Find.findByCssSelector('[data-test-subj="metricsIndexPatternInterval"]') with timeout=10000
[00:30:54]               │ debg isGlobalLoadingIndicatorVisible
[00:30:54]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:30:54]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:30:56]               │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:30:56]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:30:56]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:30:57]               │ debg TestSubjects.find(metricsDropLastBucket-no)
[00:30:57]               │ debg Find.findByCssSelector('[data-test-subj="metricsDropLastBucket-no"]') with timeout=10000
[00:30:57]               │ debg isGlobalLoadingIndicatorVisible
[00:30:57]               │ debg TestSubjects.exists(globalLoadingIndicator)
[00:30:57]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:30:58]               │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:30:59]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:30:59]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:30:59]               │ debg ... sleep(3000) start
[00:31:02]               │ debg ... sleep(3000) end
[00:31:02]               │ debg Waiting up to 20000ms for rendering count to stabilize...
[00:31:02]               │ debg TestSubjects.find(visualizationLoader)
[00:31:02]               │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:31:02]               │ debg -- firstCount=7
[00:31:02]               │ debg ... sleep(1000) start
[00:31:03]               │ debg ... sleep(1000) end
[00:31:03]               │ debg TestSubjects.find(visualizationLoader)
[00:31:03]               │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:31:03]               │ debg -- secondCount=7
[00:31:03]               │ debg Find.findByCssSelector('.tvbVisMetric__value--primary') with timeout=10000
[00:31:03]               │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional/screenshots/failure/rollup app tsvb integration create rollup tsvb.png"
[00:31:03]               │ info Current URL is: http://localhost:6121/app/kibana#/visualize/create?type=metrics&_g=(refreshInterval:(pause:!t,value:0),time:(from:now-24h,to:now))&_a=(filters:!(),linked:!f,query:(language:kuery,query:%27%27),uiState:(),vis:(aggs:!(),params:(axis_formatter:number,axis_position:left,axis_scale:normal,background_color_rules:!((id:%27246b1d20-4df4-11ea-b577-759772fb9cb9%27)),default_index_pattern:%27metricbeat-*%27,default_timefield:%27@timestamp%27,drop_last_bucket:0,id:%2761ca57f0-469d-11e7-af02-69e470af7417%27,index_pattern:rollup-target-data,interval:%271d%27,isModelInvalid:!f,series:!((axis_position:right,chart_type:line,color:%2368BC00,fill:0.5,formatter:number,id:%2761ca57f1-469d-11e7-af02-69e470af7417%27,line_width:1,metrics:!((id:%2761ca57f2-469d-11e7-af02-69e470af7417%27,type:count)),point_size:1,separate_axis:0,split_mode:everything,stacked:none)),show_grid:1,show_legend:1,time_field:%27%27,type:metric),title:%27%27,type:metrics))
[00:31:03]               │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional/failure_debug/html/rollup app tsvb integration create rollup tsvb.html
[00:31:03]               └- ✖ fail: "rollup app tsvb integration create rollup tsvb"
[00:31:03]               │

Stack Trace

{ Error: expected '0' to sort of equal '3'
    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 Context.it (test/functional/apps/rollup_job/tsvb.js:90:27)
    at process._tickCallback (internal/process/next_tick.js:68:7) actual: '0', expected: '3', showDiff: true }

Kibana Pipeline / kibana-xpack-agent / X-Pack API Integration Tests.x-pack/test/api_integration/apis/apm/feature_controls·ts.apis APM apm feature controls spaces user_1 can access APIs in space_1

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: apis
[00:00:00]           └-> "before all" hook
[00:07:25]           └-: APM
[00:07:25]             └-> "before all" hook
[00:07:25]             └-: apm feature controls
[00:07:25]               └-> "before all" hook
[00:07:25]               └-> "before all" hook
[00:07:25]                 │ proc [kibana] Could not get dynamic index pattern because indices "apm-*,apm-*,apm-*" don't exist
[00:07:25]                 │ proc [kibana]   log   [00:06:11.793] [info][apm][apm][plugins] Hitting: /api/apm/settings/agent-configuration/new with test-service/undefined
[00:07:25]                 │ proc [kibana]   log   [00:06:11.812] [info][apm][apm][plugins] Created agent configuration
[00:07:25]               └-> APIs can't be accessed by logstash_read user
[00:07:25]                 └-> "before each" hook: global before each
[00:07:25]                 │ debg creating role logstash_read
[00:07:26]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added role [logstash_read]
[00:07:26]                 │ debg created role logstash_read
[00:07:26]                 │ debg creating user logstash_read
[00:07:26]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added user [logstash_read]
[00:07:26]                 │ debg created user logstash_read
[00:07:27]                 │ debg deleting role logstash_read
[00:07:27]                 │ debg deleted role logstash_read
[00:07:27]                 │ debg deleting user logstash_read
[00:07:27]                 │ debg deleted user logstash_read
[00:07:27]                 └- ✓ pass  (1.3s) "apis APM apm feature controls APIs can't be accessed by logstash_read user"
[00:07:27]               └-> APIs can be accessed by global_all user
[00:07:27]                 └-> "before each" hook: global before each
[00:07:27]                 │ debg creating role global_all
[00:07:27]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added role [global_all]
[00:07:27]                 │ debg created role global_all
[00:07:27]                 │ debg creating user global_all
[00:07:27]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added user [global_all]
[00:07:27]                 │ debg created user global_all
[00:07:28]                 │ proc [kibana]   log   [00:06:14.286] [info][apm][apm][plugins] Hitting: /api/apm/settings/agent-configuration/search for test-service/undefined
[00:07:28]                 │ proc [kibana]   log   [00:06:14.312] [info][apm][apm][plugins] Config was found for test-service/undefined
[00:07:28]                 │ debg deleting role global_all
[00:07:28]                 │ debg deleted role global_all
[00:07:28]                 │ debg deleting user global_all
[00:07:28]                 │ debg deleted user global_all
[00:07:28]                 └- ✓ pass  (1.4s) "apis APM apm feature controls APIs can be accessed by global_all user"
[00:07:28]               └-> APIs can't be accessed by dashboard_all user
[00:07:28]                 └-> "before each" hook: global before each
[00:07:28]                 │ debg creating role dashboard_all
[00:07:28]                 │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added role [dashboard_all]
[00:07:28]                 │ debg created role dashboard_all
[00:07:28]                 │ debg creating user dashboard_all
[00:07:28]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added user [dashboard_all]
[00:07:28]                 │ debg created user dashboard_all
[00:07:29]                 │ debg deleting role dashboard_all
[00:07:29]                 │ debg deleted role dashboard_all
[00:07:29]                 │ debg deleting user dashboard_all
[00:07:29]                 │ debg deleted user dashboard_all
[00:07:29]                 └- ✓ pass  (1.4s) "apis APM apm feature controls APIs can't be accessed by dashboard_all user"
[00:07:29]               └-: spaces
[00:07:29]                 └-> "before all" hook
[00:07:29]                 └-> "before all" hook
[00:07:29]                   │ debg creating space
[00:07:30]                   │ debg created space
[00:07:30]                   │ debg creating space
[00:07:31]                   │ debg created space
[00:07:31]                   │ debg creating role user_1
[00:07:32]                   │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added role [user_1]
[00:07:32]                   │ debg created role user_1
[00:07:32]                   │ debg creating user user_1
[00:07:32]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-tests-xl-1581548254833428774] added user [user_1]
[00:07:32]                   │ debg created user user_1
[00:07:32]                 └-> user_1 can access APIs in space_1
[00:07:32]                   └-> "before each" hook: global before each
[00:07:32]                   │ proc [kibana] internal/process/warning.js:153
[00:07:32]                   │ proc [kibana]         throw warning;
[00:07:32]                   │ proc [kibana]         ^
[00:07:32]                   │ proc [kibana] 
[00:07:32]                   │ proc [kibana] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[00:07:32]                   │ proc [kibana]     at emitDeprecationWarning (internal/process/promises.js:111:13)
[00:07:32]                   │ proc [kibana]     at emitWarning (internal/process/promises.js:104:3)
[00:07:32]                   │ proc [kibana]     at emitPromiseRejectionWarnings (internal/process/promises.js:143:7)
[00:07:32]                   │ proc [kibana]     at process._tickCallback (internal/process/next_tick.js:69:34)
[00:07:32]                   └- ✖ fail: "apis APM apm feature controls spaces user_1 can access APIs in space_1"
[00:07:32]                   │

Stack Trace

TypeError: Cannot destructure property `statusCode` of 'undefined' or 'null'.
    at executeRequests (test/api_integration/apis/apm/feature_controls.ts:234:50)

and 2 more failures, only showing the first 3.

History

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

@ogupte
Copy link
Contributor Author

ogupte commented Feb 13, 2020

Closing this since it's already part of another PR: #57532

@ogupte ogupte closed this Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] NP Migration - use saved object client factory from core setup
4 participants