Skip to content

[APM] WIP: Send inspected queries to client#85052

Closed
sorenlouv wants to merge 1 commit intoelastic:masterfrom
sorenlouv:output-inspected-queries-to-client
Closed

[APM] WIP: Send inspected queries to client#85052
sorenlouv wants to merge 1 commit intoelastic:masterfrom
sorenlouv:output-inspected-queries-to-client

Conversation

@sorenlouv
Copy link
Copy Markdown
Contributor

@sorenlouv sorenlouv commented Dec 4, 2020

Currently it's possible to output ES queries to the log output on the server side. This is fine for local development but on a remote Kibana instance it's difficult to access.
This PR appends the inspected queries to the response to allow the browser to see them.

image

@sorenlouv sorenlouv requested a review from a team December 4, 2020 18:33
@botelastic botelastic Bot added the Team:APM - DEPRECATED Use Team:obs-ux-infra_services. label Dec 4, 2020
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/apm-ui (Team:apm)

@sorenlouv sorenlouv added release_note:skip Skip the PR/issue when compiling release notes v7.11.0 labels Dec 4, 2020
@kibanamachine
Copy link
Copy Markdown
Contributor

kibanamachine commented Dec 4, 2020

💔 Build Failed

Failed CI Steps


Test Failures

Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/apm/feature_controls/apm_security·ts.APM specs feature controls security global apm all privileges can navigate to APM app

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:07:20]         └-: APM specs
[00:07:20]           └-> "before all" hook
[00:07:20]           └-: feature controls
[00:07:20]             └-> "before all" hook
[00:07:20]             └-: security
[00:07:20]               └-> "before all" hook
[00:07:20]               └-> "before all" hook
[00:07:20]                 │ info [empty_kibana] Loading "mappings.json"
[00:07:20]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_1/Xh7h1wFeSHqKxOwSr8lj9A] deleting index
[00:07:20]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2/p6X7JwLgRC6698fI4APdsQ] deleting index
[00:07:20]                 │ info [empty_kibana] Deleted existing index [".kibana_2",".kibana_1"]
[00:07:20]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:07:20]                 │ info [empty_kibana] Created index ".kibana"
[00:07:20]                 │ debg [empty_kibana] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:07:20]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana/-snzo97JRRORxanRd6j-YA] update_mapping [_doc]
[00:07:20]                 │ debg Migrating saved objects
[00:07:20]                 │ proc [kibana]   log   [19:25:44.344] [info][savedobjects-service] Creating index .kibana_2.
[00:07:20]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:07:20]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] updating number_of_replicas to [0] for indices [.kibana_2]
[00:07:20]                 │ proc [kibana]   log   [19:25:44.415] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:07:20]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:07:20]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] updating number_of_replicas to [0] for indices [.kibana_1]
[00:07:20]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] 18629 finished with response BulkByScrollResponse[took=1.5ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:07:20]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana/-snzo97JRRORxanRd6j-YA] deleting index
[00:07:20]                 │ proc [kibana]   log   [19:25:44.770] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:07:20]                 │ proc [kibana]   log   [19:25:44.775] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:07:20]                 │ proc [kibana]   log   [19:25:44.802] [info][savedobjects-service] Finished in 460ms.
[00:07:20]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:07:20]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2/C7xJ3_vuTICoJioCXEO-6w] update_mapping [_doc]
[00:07:22]                 │ debg SecurityPage.forceLogout
[00:07:22]                 │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=100
[00:07:22]                 │ debg --- retry.tryForTime error: .login-form is not displayed
[00:07:22]                 │ debg Redirecting to /logout to force the logout
[00:07:23]                 │ debg Waiting on the login form to appear
[00:07:23]                 │ debg Waiting for Login Page to appear.
[00:07:23]                 │ debg Waiting up to 100000ms for login page...
[00:07:23]                 │ debg browser[INFO] http://localhost:61181/logout?_t=1607109947035 341 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:07:23]                 │
[00:07:23]                 │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:23]                 │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=2500
[00:07:25]                 │ debg browser[INFO] http://localhost:61181/login?msg=LOGGED_OUT 341 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:07:25]                 │
[00:07:25]                 │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:25]                 │ debg --- retry.tryForTime error: .login-form is not displayed
[00:07:26]                 │ERROR browser[SEVERE] http://localhost:61181/internal/spaces/_active_space - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:07:26]                 │ debg browser[INFO] http://localhost:61181/38607/bundles/core/core.entry.js 12:194329 "Detected an unhandled Promise rejection.
[00:07:26]                 │      Error: Unauthorized"
[00:07:26]                 │ERROR browser[SEVERE] http://localhost:61181/38607/bundles/core/core.entry.js 5:3002 
[00:07:26]                 │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=2500
[00:07:26]               └-: global apm all privileges
[00:07:26]                 └-> "before all" hook
[00:07:26]                 └-> "before all" hook
[00:07:26]                   │ debg creating role global_apm_all_role
[00:07:26]                   │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] added role [global_apm_all_role]
[00:07:26]                   │ debg creating user global_apm_all_user
[00:07:26]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] added user [global_apm_all_user]
[00:07:26]                   │ debg created user global_apm_all_user
[00:07:26]                   │ debg TestSubjects.exists(loginForm)
[00:07:26]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:07:26]                   │ debg Waiting for Login Form to appear.
[00:07:26]                   │ debg Waiting up to 100000ms for login form...
[00:07:26]                   │ debg TestSubjects.exists(loginForm)
[00:07:26]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:07:26]                   │ debg TestSubjects.setValue(loginUsername, global_apm_all_user)
[00:07:26]                   │ debg TestSubjects.click(loginUsername)
[00:07:26]                   │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:07:26]                   │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:07:27]                   │ debg TestSubjects.setValue(loginPassword, global_apm_all_user-password)
[00:07:27]                   │ debg TestSubjects.click(loginPassword)
[00:07:27]                   │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:07:27]                   │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:07:27]                   │ debg TestSubjects.click(loginSubmit)
[00:07:27]                   │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:07:27]                   │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:07:27]                   │ debg Waiting for login result, expected: undefined.
[00:07:27]                   │ debg Waiting up to 20000ms for logout button visible...
[00:07:27]                   │ debg TestSubjects.exists(userMenuButton)
[00:07:27]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:07:27]                   │ proc [kibana]   log   [19:25:51.405] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:07:29]                   │ debg browser[INFO] http://localhost:61181/app/home 341 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:07:29]                   │
[00:07:29]                   │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:29]                   │ debg TestSubjects.exists(userMenu)
[00:07:29]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:07:32]                   │ debg --- retry.tryForTime error: [data-test-subj="userMenu"] is not displayed
[00:07:33]                   │ debg TestSubjects.click(userMenuButton)
[00:07:33]                   │ debg Find.clickByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:07:33]                   │ debg Find.findByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:07:33]                   │ debg TestSubjects.exists(userMenu)
[00:07:33]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=120000
[00:07:33]                   │ debg TestSubjects.exists(userMenu > logoutLink)
[00:07:33]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"] [data-test-subj="logoutLink"]') with timeout=2500
[00:07:33]                 └-> shows apm navlink
[00:07:33]                   └-> "before each" hook: global before each
[00:07:33]                   │ debg isGlobalLoadingIndicatorVisible
[00:07:33]                   │ debg TestSubjects.exists(globalLoadingIndicator)
[00:07:33]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:07:34]                   │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:07:35]                   │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:07:35]                   │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:07:35]                   │ debg TestSubjects.exists(collapsibleNav)
[00:07:35]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=2500
[00:07:37]                   │ debg --- retry.tryForTime error: [data-test-subj="collapsibleNav"] is not displayed
[00:07:38]                   │ debg TestSubjects.click(toggleNavButton)
[00:07:38]                   │ debg Find.clickByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:07:38]                   │ debg Find.findByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:07:38]                   │ debg TestSubjects.find(collapsibleNav)
[00:07:38]                   │ debg Find.findByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=10000
[00:07:38]                   │ debg Find.existsByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=2500
[00:07:38]                   │ debg Find.findByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:07:38]                   │ debg Find.clickByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:07:38]                   │ debg Find.findByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:07:38]                   └- ✓ pass  (5.5s) "APM specs feature controls security global apm all privileges shows apm navlink"
[00:07:38]                 └-> can navigate to APM app
[00:07:38]                   └-> "before each" hook: global before each
[00:07:38]                   │ debg navigating to apm url: http://localhost:61181/app/apm
[00:07:38]                   │ debg navigate to: http://localhost:61181/app/apm
[00:07:38]                   │ debg browser[INFO] http://localhost:61181/app/apm?_t=1607109962765 341 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:07:38]                   │
[00:07:38]                   │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:38]                   │ debg ... sleep(700) start
[00:07:39]                   │ debg ... sleep(700) end
[00:07:39]                   │ debg returned from get, calling refresh
[00:07:40]                   │ debg browser[INFO] http://localhost:61181/app/apm?_t=1607109962765 341 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:07:40]                   │
[00:07:40]                   │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:40]                   │ debg currentUrl = http://localhost:61181/app/apm
[00:07:40]                   │          appUrl = http://localhost:61181/app/apm
[00:07:40]                   │ debg TestSubjects.find(kibanaChrome)
[00:07:40]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:07:40]                   │ debg ... sleep(501) start
[00:07:41]                   │ proc [kibana]   log   [19:26:05.138] [warning][api-authorization][plugins][security] User not authorized for "/api/apm/settings/anomaly-detection/jobs": responding with 403
[00:07:41]                   │ proc [kibana]   log   [19:26:05.148] [error][data][elasticsearch] [index_not_found_exception]: no such index [apm-*]
[00:07:41]                   │ proc [kibana]   log   [19:26:05.149] [error][apm][plugins] Could not get dynamic index pattern because indices "apm-*,apm-*,apm-*" don't exist
[00:07:41]                   │ERROR browser[SEVERE] http://localhost:61181/api/apm/settings/anomaly-detection/jobs - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:07:41]                   │ERROR browser[SEVERE] http://localhost:61181/api/apm/ui_filters/local_filters/services?uiFilters=%7B%22environment%22%3A%22ENVIRONMENT_ALL%22%7D&filterNames=%5B%22host%22%2C%22agentName%22%5D - Failed to load resource: the server responded with a status of 400 (Bad Request)
[00:07:41]                   │ERROR browser[SEVERE] http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 374:77071 TypeError: environments.filter is not a function
[00:07:41]                   │          at getEnvironmentOptions (http://localhost:61181/38607/bundles/plugin/apm/apm.chunk.1.js:3:753)
[00:07:41]                   │          at http://localhost:61181/38607/bundles/plugin/apm/apm.chunk.1.js:3:1671
[00:07:41]                   │          at Object.useMemo (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:64610)
[00:07:41]                   │          at useMemo (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:353:5228)
[00:07:41]                   │          at useEnvironmentsFetcher (http://localhost:61181/38607/bundles/plugin/apm/apm.chunk.1.js:3:1666)
[00:07:41]                   │          at EnvironmentFilter (http://localhost:61181/38607/bundles/plugin/apm/apm.chunk.2.js:3:604405)
[00:07:41]                   │          at cr (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:59332)
[00:07:41]                   │          at $r (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:67554)
[00:07:41]                   │          at _l (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:105587)
[00:07:41]                   │          at gs (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:90018)
[00:07:41]                   │ debg ... sleep(501) end
[00:07:41]                   │ debg in navigateTo url = http://localhost:61181/app/apm/services?rangeFrom=now-15m&rangeTo=now
[00:07:41]                   │ debg --- retry.try error: URL changed, waiting for it to settle
[00:07:41]                   │ proc [kibana]   log   [19:26:05.304] [error][apm][plugins] InsufficientMLCapabilities [Error]: Insufficient privileges to access feature
[00:07:41]                   │ proc [kibana]     at /dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/ml/server/lib/capabilities/check_capabilities.js:76:15
[00:07:41]                   │ proc [kibana]     at runMicrotasks (<anonymous>)
[00:07:41]                   │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:07:41]                   │ proc [kibana]     at async Promise.all (index 0)
[00:07:41]                   │ proc [kibana]     at Object.ok (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/ml/server/shared_services/shared_services.js:72:9)
[00:07:41]                   │ proc [kibana]     at Object.jobs (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/ml/server/shared_services/providers/anomaly_detectors.js:18:18)
[00:07:41]                   │ proc [kibana]     at getMlJobsWithAPMGroup (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.js:20:12)
[00:07:41]                   │ proc [kibana]     at getMLJobs (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/service_map/get_service_anomalies.js:154:20)
[00:07:41]                   │ proc [kibana]     at getMLJobIds (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/service_map/get_service_anomalies.js:181:18)
[00:07:41]                   │ proc [kibana]     at getHealthStatuses (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/services/get_services/get_services_items_stats.js:361:18)
[00:07:41]                   │ proc [kibana]     at async Promise.all (index 5)
[00:07:41]                   │ proc [kibana]     at getServicesItems (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/services/get_services/get_services_items.js:33:124)
[00:07:41]                   │ proc [kibana]     at async Promise.all (index 0)
[00:07:41]                   │ proc [kibana]     at getServices (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/services/get_services/index.js:27:34)
[00:07:41]                   │ proc [kibana]     at handler (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/routes/services.js:120:22)
[00:07:41]                   │ proc [kibana]     at /dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/routes/create_api/index.js:169:26
[00:07:41]                   │ debg ... sleep(501) start
[00:07:42]                   │ debg ... sleep(501) end
[00:07:42]                   │ debg in navigateTo url = http://localhost:61181/app/apm/services?rangeFrom=now-15m&rangeTo=now
[00:07:42]                   │ debg TestSubjects.exists(statusPageContainer)
[00:07:42]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:07:44]                   │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:07:45]                   │ debg TestSubjects.exists(apmMainContainer)
[00:07:45]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="apmMainContainer"]') with timeout=10000
[00:07:47]                   │ debg --- retry.tryForTime error: [data-test-subj="apmMainContainer"] is not displayed
[00:07:50]                   │ debg --- retry.tryForTime failed again with the same message...
[00:07:53]                   │ debg --- retry.tryForTime failed again with the same message...
[00:07:56]                   │ debg --- retry.tryForTime failed again with the same message...
[00:07:57]                   │ info Taking screenshot "/dev/shm/workspace/parallel/18/kibana/x-pack/test/functional/screenshots/failure/APM specs feature controls security global apm all privileges can navigate to APM app.png"
[00:07:57]                   │ info Current URL is: http://localhost:61181/app/apm/services?rangeFrom=now-15m&rangeTo=now
[00:07:57]                   │ info Saving page source to: /dev/shm/workspace/parallel/18/kibana/x-pack/test/functional/failure_debug/html/APM specs feature controls security global apm all privileges can navigate to APM app.html
[00:07:57]                   └- ✖ fail: APM specs feature controls security global apm all privileges can navigate to APM app
[00:07:57]                   │      Error: expected testSubject(apmMainContainer) to exist
[00:07:57]                   │       at TestSubjects.existOrFail (/dev/shm/workspace/parallel/18/kibana/test/functional/services/common/test_subjects.ts:62:15)
[00:07:57]                   │       at Context.<anonymous> (test/functional/apps/apm/feature_controls/apm_security.ts:73:9)
[00:07:57]                   │       at Object.apply (/dev/shm/workspace/parallel/18/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)
[00:07:57]                   │ 
[00:07:57]                   │ 

Stack Trace

Error: expected testSubject(apmMainContainer) to exist
    at TestSubjects.existOrFail (/dev/shm/workspace/parallel/18/kibana/test/functional/services/common/test_subjects.ts:62:15)
    at Context.<anonymous> (test/functional/apps/apm/feature_controls/apm_security.ts:73:9)
    at Object.apply (/dev/shm/workspace/parallel/18/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)

Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/apm/feature_controls/apm_security·ts.APM specs feature controls security global apm all privileges can navigate to APM app

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://dryrun

[00:00:00]       │
[00:07:33]         └-: APM specs
[00:07:33]           └-> "before all" hook
[00:07:33]           └-: feature controls
[00:07:33]             └-> "before all" hook
[00:07:33]             └-: security
[00:07:33]               └-> "before all" hook
[00:07:33]               └-> "before all" hook
[00:07:33]                 │ info [empty_kibana] Loading "mappings.json"
[00:07:33]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_1/84qTD8hXRPeerqrJVV1Nlg] deleting index
[00:07:33]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2/VvJXaCtDSGOgjSjQfy5LRg] deleting index
[00:07:33]                 │ info [empty_kibana] Deleted existing index [".kibana_2",".kibana_1"]
[00:07:33]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:07:33]                 │ info [empty_kibana] Created index ".kibana"
[00:07:33]                 │ debg [empty_kibana] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:07:33]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana/es4wfp9QQtOAf12UEDDC-g] update_mapping [_doc]
[00:07:33]                 │ debg Migrating saved objects
[00:07:33]                 │ proc [kibana]   log   [19:16:33.852] [info][savedobjects-service] Creating index .kibana_2.
[00:07:33]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:07:33]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] updating number_of_replicas to [0] for indices [.kibana_2]
[00:07:33]                 │ proc [kibana]   log   [19:16:33.919] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:07:33]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:07:33]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] updating number_of_replicas to [0] for indices [.kibana_1]
[00:07:33]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] 18652 finished with response BulkByScrollResponse[took=1.4ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:07:33]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana/es4wfp9QQtOAf12UEDDC-g] deleting index
[00:07:33]                 │ proc [kibana]   log   [19:16:34.265] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:07:33]                 │ proc [kibana]   log   [19:16:34.271] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:07:33]                 │ proc [kibana]   log   [19:16:34.298] [info][savedobjects-service] Finished in 448ms.
[00:07:33]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:07:33]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2/UB0x2bwoTaSkjnKR3X7RuA] update_mapping [_doc]
[00:07:35]                 │ debg SecurityPage.forceLogout
[00:07:35]                 │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=100
[00:07:35]                 │ debg --- retry.tryForTime error: .login-form is not displayed
[00:07:36]                 │ debg Redirecting to /logout to force the logout
[00:07:36]                 │ debg Waiting on the login form to appear
[00:07:36]                 │ debg Waiting for Login Page to appear.
[00:07:36]                 │ debg Waiting up to 100000ms for login page...
[00:07:36]                 │ debg browser[INFO] http://localhost:61181/logout?_t=1607109396538 341 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:07:36]                 │
[00:07:36]                 │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:36]                 │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=2500
[00:07:38]                 │ debg browser[INFO] http://localhost:61181/login?msg=LOGGED_OUT 341 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:07:38]                 │
[00:07:38]                 │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:38]                 │ debg --- retry.tryForTime error: .login-form is not displayed
[00:07:39]                 │ERROR browser[SEVERE] http://localhost:61181/internal/spaces/_active_space - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:07:39]                 │ debg browser[INFO] http://localhost:61181/38607/bundles/core/core.entry.js 12:194329 "Detected an unhandled Promise rejection.
[00:07:39]                 │      Error: Unauthorized"
[00:07:39]                 │ERROR browser[SEVERE] http://localhost:61181/38607/bundles/core/core.entry.js 5:3002 
[00:07:39]                 │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=2500
[00:07:39]               └-: global apm all privileges
[00:07:39]                 └-> "before all" hook
[00:07:39]                 └-> "before all" hook
[00:07:39]                   │ debg creating role global_apm_all_role
[00:07:39]                   │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] added role [global_apm_all_role]
[00:07:39]                   │ debg creating user global_apm_all_user
[00:07:39]                   │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] added user [global_apm_all_user]
[00:07:39]                   │ debg created user global_apm_all_user
[00:07:39]                   │ debg TestSubjects.exists(loginForm)
[00:07:39]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:07:39]                   │ debg Waiting for Login Form to appear.
[00:07:39]                   │ debg Waiting up to 100000ms for login form...
[00:07:39]                   │ debg TestSubjects.exists(loginForm)
[00:07:39]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:07:39]                   │ debg TestSubjects.setValue(loginUsername, global_apm_all_user)
[00:07:39]                   │ debg TestSubjects.click(loginUsername)
[00:07:39]                   │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:07:39]                   │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:07:40]                   │ debg TestSubjects.setValue(loginPassword, global_apm_all_user-password)
[00:07:40]                   │ debg TestSubjects.click(loginPassword)
[00:07:40]                   │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:07:40]                   │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:07:40]                   │ debg TestSubjects.click(loginSubmit)
[00:07:40]                   │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:07:40]                   │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:07:40]                   │ debg Waiting for login result, expected: undefined.
[00:07:40]                   │ debg Waiting up to 20000ms for logout button visible...
[00:07:40]                   │ debg TestSubjects.exists(userMenuButton)
[00:07:40]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:07:40]                   │ proc [kibana]   log   [19:16:40.938] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:07:42]                   │ debg browser[INFO] http://localhost:61181/app/home 341 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:07:42]                   │
[00:07:42]                   │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:43]                   │ debg TestSubjects.exists(userMenu)
[00:07:43]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:07:45]                   │ debg --- retry.tryForTime error: [data-test-subj="userMenu"] is not displayed
[00:07:46]                   │ debg TestSubjects.click(userMenuButton)
[00:07:46]                   │ debg Find.clickByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:07:46]                   │ debg Find.findByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:07:46]                   │ debg TestSubjects.exists(userMenu)
[00:07:46]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=120000
[00:07:46]                   │ debg TestSubjects.exists(userMenu > logoutLink)
[00:07:46]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"] [data-test-subj="logoutLink"]') with timeout=2500
[00:07:46]                 └-> shows apm navlink
[00:07:46]                   └-> "before each" hook: global before each
[00:07:46]                   │ debg isGlobalLoadingIndicatorVisible
[00:07:46]                   │ debg TestSubjects.exists(globalLoadingIndicator)
[00:07:46]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:07:47]                   │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:07:48]                   │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:07:48]                   │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:07:48]                   │ debg TestSubjects.exists(collapsibleNav)
[00:07:48]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=2500
[00:07:50]                   │ debg --- retry.tryForTime error: [data-test-subj="collapsibleNav"] is not displayed
[00:07:51]                   │ debg TestSubjects.click(toggleNavButton)
[00:07:51]                   │ debg Find.clickByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:07:51]                   │ debg Find.findByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:07:51]                   │ debg TestSubjects.find(collapsibleNav)
[00:07:51]                   │ debg Find.findByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=10000
[00:07:51]                   │ debg Find.existsByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=2500
[00:07:51]                   │ debg Find.findByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:07:51]                   │ debg Find.clickByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:07:51]                   │ debg Find.findByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:07:51]                   └- ✓ pass  (5.4s) "APM specs feature controls security global apm all privileges shows apm navlink"
[00:07:51]                 └-> can navigate to APM app
[00:07:51]                   └-> "before each" hook: global before each
[00:07:51]                   │ debg navigating to apm url: http://localhost:61181/app/apm
[00:07:51]                   │ debg navigate to: http://localhost:61181/app/apm
[00:07:51]                   │ debg browser[INFO] http://localhost:61181/app/apm?_t=1607109412219 341 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:07:51]                   │
[00:07:51]                   │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:51]                   │ debg ... sleep(700) start
[00:07:52]                   │ debg ... sleep(700) end
[00:07:52]                   │ debg returned from get, calling refresh
[00:07:53]                   │ERROR browser[SEVERE] http://localhost:61181/38607/bundles/core/core.entry.js 12:193382 TypeError: Failed to fetch
[00:07:53]                   │          at _callee3$ (http://localhost:61181/38607/bundles/core/core.entry.js:6:43940)
[00:07:53]                   │          at s (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:964606)
[00:07:53]                   │          at Generator._invoke (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:964359)
[00:07:53]                   │          at Generator.forEach.e.<computed> [as throw] (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:964963)
[00:07:53]                   │          at fetch_asyncGeneratorStep (http://localhost:61181/38607/bundles/core/core.entry.js:6:38998)
[00:07:53]                   │          at _throw (http://localhost:61181/38607/bundles/core/core.entry.js:6:39406)
[00:07:53]                   │ debg browser[INFO] http://localhost:61181/app/apm?_t=1607109412219 341 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:07:53]                   │
[00:07:53]                   │ debg browser[INFO] http://localhost:61181/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:07:53]                   │ debg currentUrl = http://localhost:61181/app/apm
[00:07:53]                   │          appUrl = http://localhost:61181/app/apm
[00:07:53]                   │ debg TestSubjects.find(kibanaChrome)
[00:07:53]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:07:53]                   │ debg ... sleep(501) start
[00:07:54]                   │ proc [kibana]   log   [19:16:54.648] [warning][api-authorization][plugins][security] User not authorized for "/api/apm/settings/anomaly-detection/jobs": responding with 403
[00:07:54]                   │ proc [kibana]   log   [19:16:54.653] [error][data][elasticsearch] [index_not_found_exception]: no such index [apm-*]
[00:07:54]                   │ proc [kibana]   log   [19:16:54.654] [error][apm][plugins] Could not get dynamic index pattern because indices "apm-*,apm-*,apm-*" don't exist
[00:07:54]                   │ERROR browser[SEVERE] http://localhost:61181/api/apm/settings/anomaly-detection/jobs - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:07:54]                   │ERROR browser[SEVERE] http://localhost:61181/api/apm/ui_filters/local_filters/services?uiFilters=%7B%22environment%22%3A%22ENVIRONMENT_ALL%22%7D&filterNames=%5B%22host%22%2C%22agentName%22%5D - Failed to load resource: the server responded with a status of 400 (Bad Request)
[00:07:54]                   │ERROR browser[SEVERE] http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 374:77071 TypeError: environments.filter is not a function
[00:07:54]                   │          at getEnvironmentOptions (http://localhost:61181/38607/bundles/plugin/apm/apm.chunk.1.js:3:753)
[00:07:54]                   │          at http://localhost:61181/38607/bundles/plugin/apm/apm.chunk.1.js:3:1671
[00:07:54]                   │          at Object.useMemo (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:64610)
[00:07:54]                   │          at useMemo (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:353:5228)
[00:07:54]                   │          at useEnvironmentsFetcher (http://localhost:61181/38607/bundles/plugin/apm/apm.chunk.1.js:3:1666)
[00:07:54]                   │          at EnvironmentFilter (http://localhost:61181/38607/bundles/plugin/apm/apm.chunk.2.js:3:604405)
[00:07:54]                   │          at cr (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:59332)
[00:07:54]                   │          at $r (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:67554)
[00:07:54]                   │          at _l (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:105587)
[00:07:54]                   │          at gs (http://localhost:61181/38607/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:375:90018)
[00:07:54]                   │ debg ... sleep(501) end
[00:07:54]                   │ debg in navigateTo url = http://localhost:61181/app/apm/services?rangeFrom=now-15m&rangeTo=now
[00:07:54]                   │ debg --- retry.try error: URL changed, waiting for it to settle
[00:07:54]                   │ proc [kibana]   log   [19:16:54.902] [error][apm][plugins] InsufficientMLCapabilities [Error]: Insufficient privileges to access feature
[00:07:54]                   │ proc [kibana]     at /dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/ml/server/lib/capabilities/check_capabilities.js:76:15
[00:07:54]                   │ proc [kibana]     at runMicrotasks (<anonymous>)
[00:07:54]                   │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:07:54]                   │ proc [kibana]     at async Promise.all (index 0)
[00:07:54]                   │ proc [kibana]     at Object.ok (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/ml/server/shared_services/shared_services.js:72:9)
[00:07:54]                   │ proc [kibana]     at Object.jobs (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/ml/server/shared_services/providers/anomaly_detectors.js:18:18)
[00:07:54]                   │ proc [kibana]     at getMlJobsWithAPMGroup (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/anomaly_detection/get_ml_jobs_with_apm_group.js:20:12)
[00:07:54]                   │ proc [kibana]     at getMLJobs (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/service_map/get_service_anomalies.js:154:20)
[00:07:54]                   │ proc [kibana]     at getMLJobIds (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/service_map/get_service_anomalies.js:181:18)
[00:07:54]                   │ proc [kibana]     at getHealthStatuses (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/services/get_services/get_services_items_stats.js:361:18)
[00:07:54]                   │ proc [kibana]     at async Promise.all (index 5)
[00:07:54]                   │ proc [kibana]     at getServicesItems (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/services/get_services/get_services_items.js:33:124)
[00:07:54]                   │ proc [kibana]     at async Promise.all (index 0)
[00:07:54]                   │ proc [kibana]     at getServices (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/lib/services/get_services/index.js:27:34)
[00:07:54]                   │ proc [kibana]     at handler (/dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/routes/services.js:120:22)
[00:07:54]                   │ proc [kibana]     at /dev/shm/workspace/kibana-build-xpack-18/x-pack/plugins/apm/server/routes/create_api/index.js:169:26
[00:07:54]                   │ debg ... sleep(501) start
[00:07:55]                   │ debg ... sleep(501) end
[00:07:55]                   │ debg in navigateTo url = http://localhost:61181/app/apm/services?rangeFrom=now-15m&rangeTo=now
[00:07:55]                   │ debg TestSubjects.exists(statusPageContainer)
[00:07:55]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:07:57]                   │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:07:58]                   │ debg TestSubjects.exists(apmMainContainer)
[00:07:58]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="apmMainContainer"]') with timeout=10000
[00:08:00]                   │ debg --- retry.tryForTime error: [data-test-subj="apmMainContainer"] is not displayed
[00:08:03]                   │ debg --- retry.tryForTime failed again with the same message...
[00:08:06]                   │ debg --- retry.tryForTime failed again with the same message...
[00:08:10]                   │ debg --- retry.tryForTime failed again with the same message...
[00:08:10]                   │ info Taking screenshot "/dev/shm/workspace/parallel/18/kibana/x-pack/test/functional/screenshots/failure/APM specs feature controls security global apm all privileges can navigate to APM app.png"
[00:08:10]                   │ info Current URL is: http://localhost:61181/app/apm/services?rangeFrom=now-15m&rangeTo=now
[00:08:10]                   │ info Saving page source to: /dev/shm/workspace/parallel/18/kibana/x-pack/test/functional/failure_debug/html/APM specs feature controls security global apm all privileges can navigate to APM app.html
[00:08:10]                   └- ✖ fail: APM specs feature controls security global apm all privileges can navigate to APM app
[00:08:10]                   │      Error: expected testSubject(apmMainContainer) to exist
[00:08:10]                   │       at TestSubjects.existOrFail (/dev/shm/workspace/parallel/18/kibana/test/functional/services/common/test_subjects.ts:62:15)
[00:08:10]                   │       at Context.<anonymous> (test/functional/apps/apm/feature_controls/apm_security.ts:73:9)
[00:08:10]                   │       at Object.apply (/dev/shm/workspace/parallel/18/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)
[00:08:10]                   │ 
[00:08:10]                   │ 

Stack Trace

Error: expected testSubject(apmMainContainer) to exist
    at TestSubjects.existOrFail (/dev/shm/workspace/parallel/18/kibana/test/functional/services/common/test_subjects.ts:62:15)
    at Context.<anonymous> (test/functional/apps/apm/feature_controls/apm_security.ts:73:9)
    at Object.apply (/dev/shm/workspace/parallel/18/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)

X-Pack APM API integration tests (basic).x-pack/test/apm_api_integration/basic/tests/settings/agent_configuration·ts.APM specs (basic) Settings agent configuration when data is loaded returns all services

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: APM specs (basic)
[00:00:00]           └-> "before all" hook
[00:01:04]           └-: Settings
[00:01:04]             └-> "before all" hook
[00:01:04]             └-: agent configuration
[00:01:04]               └-> "before all" hook
[00:01:04]               └-: when data is loaded
[00:01:04]                 └-> "before all" hook
[00:01:04]                 └-> "before all" hook
[00:01:04]                   │ info [apm_8.0.0] Loading "mappings.json"
[00:01:04]                   │ info [apm_8.0.0] Loading "data.json.gz"
[00:01:04]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2/sCTiE6PwRbuvkKRCte7bvQ] deleting index
[00:01:04]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_1/u1rmiULrRu-ZBFE-M1X0eQ] deleting index
[00:01:04]                   │ info [apm_8.0.0] Deleted existing index [".kibana_2",".kibana_1"]
[00:01:04]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_1] creating index, cause [api], templates [], shards [1]/[0]
[00:01:04]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_1][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_1][0]]"
[00:01:04]                   │ info [apm_8.0.0] Created index ".kibana_1"
[00:01:04]                   │ debg [apm_8.0.0] ".kibana_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:01:04]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.ml-anomalies-shared] creating index, cause [api], templates [.ml-anomalies-], shards [1]/[0]
[00:01:04]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.ml-anomalies-shared][0]]])." previous.health="YELLOW" reason="shards started [[.ml-anomalies-shared][0]]"
[00:01:04]                   │ info [apm_8.0.0] Created index ".ml-anomalies-shared"
[00:01:04]                   │ debg [apm_8.0.0] ".ml-anomalies-shared" settings {"index":{"auto_expand_replicas":"0-1","hidden":"true","number_of_replicas":"0","number_of_shards":"1","translog":{"durability":"async"}}}
[00:01:04]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.ml-config] creating index, cause [api], templates [.ml-config], shards [1]/[0]
[00:01:04]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.ml-config][0]]])." previous.health="YELLOW" reason="shards started [[.ml-config][0]]"
[00:01:04]                   │ info [apm_8.0.0] Created index ".ml-config"
[00:01:04]                   │ debg [apm_8.0.0] ".ml-config" settings {"index":{"auto_expand_replicas":"0-1","max_result_window":"10000","number_of_replicas":"0","number_of_shards":"1"}}
[00:01:04]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-error-000001] creating index, cause [api], templates [], shards [1]/[0]
[00:01:04]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[apm-8.0.0-error-000001][0]]])." previous.health="YELLOW" reason="shards started [[apm-8.0.0-error-000001][0]]"
[00:01:04]                   │ info [apm_8.0.0] Created index "apm-8.0.0-error-000001"
[00:01:04]                   │ debg [apm_8.0.0] "apm-8.0.0-error-000001" settings {"index":{"auto_expand_replicas":"false","codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-error"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"0","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:04]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-error-000002] creating index, cause [api], templates [], shards [1]/[0]
[00:01:04]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[apm-8.0.0-error-000002][0]]])." previous.health="YELLOW" reason="shards started [[apm-8.0.0-error-000002][0]]"
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-error-000002"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-error-000002" settings {"index":{"auto_expand_replicas":"false","codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-error"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"0","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-error-2020.07.31-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-error-2020.07.31-000001"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-error-2020.07.31-000001" settings {"index":{"blocks":{"write":"true"},"codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-error"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"1","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-error-2020.07.31-000002] creating index, cause [api], templates [], shards [1]/[1]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-error-2020.07.31-000002"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-error-2020.07.31-000002" settings {"index":{"codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-error"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"1","number_of_shards":"1","priority":"100","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-error-2020.09.16-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-error-2020.09.16-000001"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-error-2020.09.16-000001" settings {"index":{"codec":"best_compression","lifecycle":{"name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-error"},"mapping":{"total_fields":{"limit":"2000"}},"max_docvalue_fields_search":"200","number_of_replicas":"1","number_of_shards":"1","priority":"100","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-metric-000001] creating index, cause [api], templates [], shards [1]/[0]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-metric-000001"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-metric-000001" settings {"index":{"auto_expand_replicas":"false","codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-metric"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"0","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-metric-000002] creating index, cause [api], templates [], shards [1]/[0]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-metric-000002"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-metric-000002" settings {"index":{"auto_expand_replicas":"false","codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-metric"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"0","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-metric-2020.07.31-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-metric-2020.07.31-000001"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-metric-2020.07.31-000001" settings {"index":{"blocks":{"write":"true"},"codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-metric"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"1","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-metric-2020.07.31-000002] creating index, cause [api], templates [], shards [1]/[1]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-metric-2020.07.31-000002"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-metric-2020.07.31-000002" settings {"index":{"codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-metric"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"1","number_of_shards":"1","priority":"100","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-metric-2020.09.16-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-metric-2020.09.16-000001"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-metric-2020.09.16-000001" settings {"index":{"codec":"best_compression","lifecycle":{"name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-metric"},"mapping":{"total_fields":{"limit":"2000"}},"max_docvalue_fields_search":"200","number_of_replicas":"1","number_of_shards":"1","priority":"100","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-span-000001] creating index, cause [api], templates [], shards [1]/[0]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-span-000001"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-span-000001" settings {"index":{"auto_expand_replicas":"false","codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-span"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"0","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-span-000002] creating index, cause [api], templates [], shards [1]/[0]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-span-000002"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-span-000002" settings {"index":{"auto_expand_replicas":"false","codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-span"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"0","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-span-2020.07.31-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-span-2020.07.31-000001"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-span-2020.07.31-000001" settings {"index":{"blocks":{"write":"true"},"codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-span"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"1","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-span-2020.07.31-000002] creating index, cause [api], templates [], shards [1]/[1]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-span-2020.07.31-000002"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-span-2020.07.31-000002" settings {"index":{"codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-span"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"1","number_of_shards":"1","priority":"100","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-span-2020.09.16-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:05]                   │ info [apm_8.0.0] Created index "apm-8.0.0-span-2020.09.16-000001"
[00:01:05]                   │ debg [apm_8.0.0] "apm-8.0.0-span-2020.09.16-000001" settings {"index":{"codec":"best_compression","lifecycle":{"name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-span"},"mapping":{"total_fields":{"limit":"2000"}},"max_docvalue_fields_search":"200","number_of_replicas":"1","number_of_shards":"1","priority":"100","refresh_interval":"5s"}}
[00:01:05]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-transaction-000001] creating index, cause [api], templates [], shards [1]/[0]
[00:01:06]                   │ info [apm_8.0.0] Created index "apm-8.0.0-transaction-000001"
[00:01:06]                   │ debg [apm_8.0.0] "apm-8.0.0-transaction-000001" settings {"index":{"auto_expand_replicas":"false","codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-transaction"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"0","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:06]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-transaction-000002] creating index, cause [api], templates [], shards [1]/[0]
[00:01:06]                   │ info [apm_8.0.0] Created index "apm-8.0.0-transaction-000002"
[00:01:06]                   │ debg [apm_8.0.0] "apm-8.0.0-transaction-000002" settings {"index":{"auto_expand_replicas":"false","codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-transaction"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"0","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:06]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-transaction-2020.07.31-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:06]                   │ info [apm_8.0.0] Created index "apm-8.0.0-transaction-2020.07.31-000001"
[00:01:06]                   │ debg [apm_8.0.0] "apm-8.0.0-transaction-2020.07.31-000001" settings {"index":{"blocks":{"write":"true"},"codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-transaction"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"1","number_of_shards":"1","priority":"50","refresh_interval":"5s"}}
[00:01:06]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-transaction-2020.07.31-000002] creating index, cause [api], templates [], shards [1]/[1]
[00:01:06]                   │ info [apm_8.0.0] Created index "apm-8.0.0-transaction-2020.07.31-000002"
[00:01:06]                   │ debg [apm_8.0.0] "apm-8.0.0-transaction-2020.07.31-000002" settings {"index":{"codec":"best_compression","lifecycle":{"indexing_complete":"true","name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-transaction"},"mapping":{"total_fields":{"limit":"2000"}},"number_of_replicas":"1","number_of_shards":"1","priority":"100","refresh_interval":"5s"}}
[00:01:06]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [apm-8.0.0-transaction-2020.09.16-000001] creating index, cause [api], templates [], shards [1]/[1]
[00:01:06]                   │ info [apm_8.0.0] Created index "apm-8.0.0-transaction-2020.09.16-000001"
[00:01:06]                   │ debg [apm_8.0.0] "apm-8.0.0-transaction-2020.09.16-000001" settings {"index":{"codec":"best_compression","lifecycle":{"name":"apm-rollover-30-days","rollover_alias":"apm-8.0.0-transaction"},"mapping":{"total_fields":{"limit":"2000"}},"max_docvalue_fields_search":"200","number_of_replicas":"1","number_of_shards":"1","priority":"100","refresh_interval":"5s"}}
[00:01:09]                   │ info [apm_8.0.0] Indexed 20 docs into ".kibana_1"
[00:01:09]                   │ info [apm_8.0.0] Indexed 1940 docs into ".ml-anomalies-shared"
[00:01:09]                   │ info [apm_8.0.0] Indexed 34 docs into ".ml-config"
[00:01:09]                   │ info [apm_8.0.0] Indexed 337 docs into "apm-8.0.0-error-2020.09.16-000001"
[00:01:09]                   │ info [apm_8.0.0] Indexed 6803 docs into "apm-8.0.0-metric-2020.09.16-000001"
[00:01:09]                   │ info [apm_8.0.0] Indexed 5176 docs into "apm-8.0.0-span-2020.09.16-000001"
[00:01:09]                   │ info [apm_8.0.0] Indexed 1349 docs into "apm-8.0.0-transaction-2020.09.16-000001"
[00:01:10]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_1/FBeor6AdQZWHXDQjmg9fKA] update_mapping [_doc]
[00:01:10]                   │ debg Migrating saved objects
[00:01:10]                   │ proc [kibana]   log   [19:44:14.446] [info][savedobjects-service] Detected mapping change in "dynamic"
[00:01:10]                   │ proc [kibana]   log   [19:44:14.449] [info][savedobjects-service] Creating index .kibana_2.
[00:01:10]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:01:10]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] updating number_of_replicas to [0] for indices [.kibana_2]
[00:01:10]                   │ proc [kibana]   log   [19:44:14.521] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:01:10]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2/7RXj6r7eTTGbtS87AQz0Ig] update_mapping [_doc]
[00:01:10]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2/7RXj6r7eTTGbtS87AQz0Ig] update_mapping [_doc]
[00:01:10]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1607106810274883270] [.kibana_2/7RXj6r7eTTGbtS87AQz0Ig] update_mapping [_doc]
[00:01:10]                   │ proc [kibana]   log   [19:44:14.668] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:01:10]                   │ proc [kibana]   log   [19:44:14.704] [info][savedobjects-service] Finished in 257ms.
[00:01:10]                 └-> returns all services
[00:01:10]                   └-> "before each" hook: global before each
[00:01:10]                   └- ✖ fail: APM specs (basic) Settings agent configuration when data is loaded returns all services
[00:01:10]                   │      Error: expect(received).toMatchInlineSnapshot(snapshot)
[00:01:10]                   │ 
[00:01:10]                   │ Snapshot name: `agent configuration when data is loaded returns all services 1`
[00:01:10]                   │ 
[00:01:10]                   │ - Snapshot  - 11
[00:01:10]                   │ + Received  + 11
[00:01:10]                   │ 
[00:01:10]                   │ - Array [
[00:01:10]                   │ -   "ALL_OPTION_VALUE",
[00:01:10]                   │ -   "elastic-co-frontend",
[00:01:10]                   │ -   "opbeans-dotnet",
[00:01:10]                   │ -   "opbeans-go",
[00:01:10]                   │ -   "opbeans-java",
[00:01:10]                   │ -   "opbeans-node",
[00:01:10]                   │ -   "opbeans-python",
[00:01:10]                   │ -   "opbeans-ruby",
[00:01:10]                   │ -   "opbeans-rum",
[00:01:10]                   │ - ]
[00:01:10]                   │ + Object {
[00:01:10]                   │ +   "0": "ALL_OPTION_VALUE",
[00:01:10]                   │ +   "1": "elastic-co-frontend",
[00:01:10]                   │ +   "2": "opbeans-dotnet",
[00:01:10]                   │ +   "3": "opbeans-go",
[00:01:10]                   │ +   "4": "opbeans-java",
[00:01:10]                   │ +   "5": "opbeans-node",
[00:01:10]                   │ +   "6": "opbeans-python",
[00:01:10]                   │ +   "7": "opbeans-ruby",
[00:01:10]                   │ +   "8": "opbeans-rum",
[00:01:10]                   │ + }
[00:01:10]                   │       at Context.<anonymous> (test/apm_api_integration/basic/tests/settings/agent_configuration.ts:135:30)
[00:01:10]                   │       at Object.apply (/dev/shm/workspace/parallel/6/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)
[00:01:10]                   │ 
[00:01:10]                   │ 

Stack Trace

Error: expect(received).toMatchInlineSnapshot(snapshot)

Snapshot name: `agent configuration when data is loaded returns all services 1`

- Snapshot  - 11
+ Received  + 11

- Array [
-   "ALL_OPTION_VALUE",
-   "elastic-co-frontend",
-   "opbeans-dotnet",
-   "opbeans-go",
-   "opbeans-java",
-   "opbeans-node",
-   "opbeans-python",
-   "opbeans-ruby",
-   "opbeans-rum",
- ]
+ Object {
+   "0": "ALL_OPTION_VALUE",
+   "1": "elastic-co-frontend",
+   "2": "opbeans-dotnet",
+   "3": "opbeans-go",
+   "4": "opbeans-java",
+   "5": "opbeans-node",
+   "6": "opbeans-python",
+   "7": "opbeans-ruby",
+   "8": "opbeans-rum",
+ }
    at Context.<anonymous> (test/apm_api_integration/basic/tests/settings/agent_configuration.ts:135:30)
    at Object.apply (/dev/shm/workspace/parallel/6/kibana/packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:16)

Metrics [docs]

✅ unchanged

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

params: Record<string, any>;
debug: boolean;
request: KibanaRequest;
request: KibanaRequest & { _debugQueries?: Array<Record<string, any>> };
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rather than adding a _debugQueries property (which are awkward/impossible with array/string/boolean etc response types), what do you think about wrapping the response if _debugQueries set? Something like { queries: [], response: ... }. We can then opaquely unwrap in useFetcher().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hmm.. not following

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay, I get it now - but still not sure where you want to store _debugQueries to go from an es request is made until the response happens.


console.log(chalk.bold('ES query:'));
console.log(formatObj(params));
request._debugQueries.push({
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe setupRequest can return a respond method, and we wrap responses as: respond({ hasData: true }). Then we don't have to modify the request object, we'd need to pass some kind of tracking function to create_apm_event_client and call_client_with_debug.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not following. How would I access the response object from within callClientWithDebug?
response would have to be supplied to each route, which in turn would have to pass it on to setupRequest like:

const setup = await setupRequest(context, request, response);

@LeeDr
Copy link
Copy Markdown

LeeDr commented Jan 7, 2021

This looks like an enhancement, we're past FF on 7.11.0. It doesn't look like this has had recent activity. Probably bump it to 7.12.0.

@sorenlouv sorenlouv removed the v7.11.0 label Jan 7, 2021
@sorenlouv
Copy link
Copy Markdown
Contributor Author

This looks like an enhancement, we're past FF on 7.11.0. It doesn't look like this has had recent activity. Probably bump it to 7.12.0.

Good point. Taking out of 7.11

@sorenlouv
Copy link
Copy Markdown
Contributor Author

Replaced by #95146

@sorenlouv sorenlouv closed this Mar 23, 2021
@sorenlouv sorenlouv deleted the output-inspected-queries-to-client branch March 25, 2021 11:49
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 Team:APM - DEPRECATED Use Team:obs-ux-infra_services.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants