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

[canvas][tech-debt] Convert Canvas to use Service Abstractions API #103202

Closed

Conversation

clintandrewhall
Copy link
Contributor

@clintandrewhall clintandrewhall commented Jun 24, 2021

Summary

This is a big PR, and I'm going to break it up:

Nav Link: #107346
Expressions: #107350
Embeddables: #107351
Reporting: #107352
Labs: #107354
Custom Elements: #107356

...and close this source PR.

This converts all of our services to use the safer, more correct service abstractions API we created in Presentation Util. It also attempts to clean up the non-standard usage of the setup and start contracts API.

Tomorrow I'll flesh out this description with details of what's been done and the impact it has on other aspects of Canvas (running and in development). It's incredibly exciting...!

Expect this to be closed eventually... I wanted to get it in front of @crob611 @poffdeluxe @cqliu1 and @ThomThomson before we kick off another tech-debt week.

Each service will be created individually and reviewed independently, with the first containing the initial setup for each service. Then I'll convert any from public/lib that remain.

In the end, we'll be on a much safer, more predictable, extensible standard.

@clintandrewhall clintandrewhall added WIP Work in progress Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas loe:small Small Level of Effort v8.0.0 release_note:skip Skip the PR/issue when compiling release notes impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Feature:Canvas labels Jun 24, 2021
@clintandrewhall clintandrewhall force-pushed the canvas/services branch 4 times, most recently from 3805752 to b93852a Compare June 25, 2021 03:00
[canvas] Reduce bundle by registering Canvas Plugin API on mount
@kibanamachine
Copy link
Contributor

kibanamachine commented Jul 6, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/canvas/filters·ts.Canvas app filters filter updates when dropdown is changed

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:02:08]         └-: Canvas app
[00:02:08]           └-> "before all" hook in "Canvas app"
[00:02:08]           └-> "before all" hook in "Canvas app"
[00:02:08]             │ debg set roles = test_logstash_reader,global_canvas_all
[00:02:08]             │ debg creating user test_user
[00:02:08]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] updated user [test_user]
[00:02:08]             │ debg created user test_user
[00:02:08]             │ debg TestSubjects.exists(kibanaChrome)
[00:02:08]             │ debg Find.existsByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=2500
[00:02:09]             │ debg TestSubjects.find(kibanaChrome)
[00:02:09]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=100000
[00:02:09]             │ debg browser[INFO] http://localhost:61181/spaces/space_selector 281 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:09]             │
[00:02:09]             │ debg browser[INFO] http://localhost:61181/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:10]             │ info [x-pack/test/functional/es_archives/logstash_functional] Loading "mappings.json"
[00:02:10]             │ info [x-pack/test/functional/es_archives/logstash_functional] Loading "data.json.gz"
[00:02:10]             │ info [x-pack/test/functional/es_archives/logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:02:10]             │ info [x-pack/test/functional/es_archives/logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:02:10]             │ info [x-pack/test/functional/es_archives/logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:02:10]             │ proc [kibana]   log   [03:03:44.356] [warning][api-authorization][plugins][security] User not authorized for "/api/fleet/epm/packages?experimental=true": responding with 403
[00:02:10]             │ERROR browser[SEVERE] http://localhost:61181/api/fleet/epm/packages?experimental=true - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:02:28]           └-: filters
[00:02:28]             └-> "before all" hook for "filter updates when dropdown is changed"
[00:02:28]             └-> "before all" hook for "filter updates when dropdown is changed"
[00:02:28]               │ info [x-pack/test/functional/es_archives/canvas/filter] Loading "mappings.json"
[00:02:28]               │ info [x-pack/test/functional/es_archives/canvas/filter] Loading "data.json.gz"
[00:02:28]               │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_8.0.0_001/Q3gXTudSQGigWVRnniDzNw] deleting index
[00:02:28]               │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_task_manager_8.0.0_001/1UDmCCJyQPaVjnWA1vX5xQ] deleting index
[00:02:28]               │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_1/Du_y4UMgQoCOFncCmCDdYg] deleting index
[00:02:28]               │ info [x-pack/test/functional/es_archives/canvas/filter] Deleted existing index ".kibana_8.0.0_001"
[00:02:28]               │ info [x-pack/test/functional/es_archives/canvas/filter] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:02:28]               │ info [x-pack/test/functional/es_archives/canvas/filter] Deleted existing index ".kibana_1"
[00:02:28]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_1] creating index, cause [api], templates [], shards [1]/[0]
[00:02:28]               │ info [o.e.c.r.a.AllocationService] [node-01] 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:02:28]               │ info [x-pack/test/functional/es_archives/canvas/filter] Created index ".kibana_1"
[00:02:28]               │ debg [x-pack/test/functional/es_archives/canvas/filter] ".kibana_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:02:28]               │ info [x-pack/test/functional/es_archives/canvas/filter] Indexed 1 docs into ".kibana_1"
[00:02:28]               │ debg Migrating saved objects
[00:02:28]               │ proc [kibana]   log   [03:04:02.075] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET. took: 3ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.079] [info][savedobjects-service] [.kibana] INIT -> WAIT_FOR_YELLOW_SOURCE. took: 9ms.
[00:02:28]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_task_manager_8.0.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:02:28]               │ proc [kibana]   log   [03:04:02.082] [info][savedobjects-service] [.kibana] WAIT_FOR_YELLOW_SOURCE -> CHECK_UNKNOWN_DOCUMENTS. took: 3ms.
[00:02:28]               │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:02:28]               │ proc [kibana]   log   [03:04:02.088] [info][savedobjects-service] [.kibana] CHECK_UNKNOWN_DOCUMENTS -> SET_SOURCE_WRITE_BLOCK. took: 6ms.
[00:02:28]               │ info [o.e.c.m.MetadataIndexStateService] [node-01] adding block write to indices [[.kibana_1/jfnX3c9bS9CdU1RlQ6Vz5A]]
[00:02:28]               │ info [o.e.c.r.a.AllocationService] [node-01] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_task_manager_8.0.0_001][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_task_manager_8.0.0_001][0]]"
[00:02:28]               │ info [o.e.c.m.MetadataIndexStateService] [node-01] completed adding block write to indices [.kibana_1]
[00:02:28]               │ proc [kibana]   log   [03:04:02.149] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY. took: 74ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.165] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP. took: 77ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.186] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE. took: 37ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.186] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 114ms
[00:02:28]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:02:28]               │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.kibana_8.0.0_reindex_temp]
[00:02:28]               │ info [o.e.c.r.a.AllocationService] [node-01] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_8.0.0_reindex_temp][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_8.0.0_reindex_temp][0]]"
[00:02:28]               │ proc [kibana]   log   [03:04:02.238] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP_OPEN_PIT. took: 73ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.243] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_OPEN_PIT -> REINDEX_SOURCE_TO_TEMP_READ. took: 5ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.250] [info][savedobjects-service] [.kibana] Starting to process 1 documents.
[00:02:28]               │ proc [kibana]   log   [03:04:02.250] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_INDEX. took: 7ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.251] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1ms.
[00:02:28]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_reindex_temp/eYcNeaWcS2WKmDzrpJCnOw] update_mapping [_doc]
[00:02:28]               │ proc [kibana]   log   [03:04:02.282] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 31ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.288] [info][savedobjects-service] [.kibana] Processed 1 documents out of 1.
[00:02:28]               │ proc [kibana]   log   [03:04:02.289] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 6ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.292] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_CLOSE_PIT -> SET_TEMP_WRITE_BLOCK. took: 4ms.
[00:02:28]               │ info [o.e.c.m.MetadataIndexStateService] [node-01] adding block write to indices [[.kibana_8.0.0_reindex_temp/eYcNeaWcS2WKmDzrpJCnOw]]
[00:02:28]               │ info [o.e.c.m.MetadataIndexStateService] [node-01] completed adding block write to indices [.kibana_8.0.0_reindex_temp]
[00:02:28]               │ proc [kibana]   log   [03:04:02.333] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET. took: 41ms.
[00:02:28]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] applying create index request using existing index [.kibana_8.0.0_reindex_temp] metadata
[00:02:28]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:02:28]               │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.kibana_8.0.0_001]
[00:02:28]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/x4nwEKF5SA-ZMJv-XIRbrQ] create_mapping
[00:02:28]               │ info [o.e.c.r.a.AllocationService] [node-01] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_8.0.0_001][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_8.0.0_001][0]]"
[00:02:28]               │ proc [kibana]   log   [03:04:02.435] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> REFRESH_TARGET. took: 102ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.438] [info][savedobjects-service] [.kibana] REFRESH_TARGET -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 3ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.443] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 5ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.449] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 6ms.
[00:02:28]               │ proc [kibana]   log   [03:04:02.453] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 4ms.
[00:02:28]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/x4nwEKF5SA-ZMJv-XIRbrQ] update_mapping [_doc]
[00:02:28]               │ proc [kibana]   log   [03:04:02.505] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 52ms.
[00:02:28]               │ info [o.e.t.LoggingTaskListener] [node-01] 6888 finished with response BulkByScrollResponse[took=20ms,timed_out=false,sliceId=null,updated=1,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:02:29]               │ proc [kibana]   log   [03:04:02.609] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY. took: 104ms.
[00:02:29]               │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_8.0.0_reindex_temp/eYcNeaWcS2WKmDzrpJCnOw] deleting index
[00:02:29]               │ proc [kibana]   log   [03:04:02.648] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE. took: 39ms.
[00:02:29]               │ proc [kibana]   log   [03:04:02.649] [info][savedobjects-service] [.kibana] Migration completed after 579ms
[00:02:29]               │ debg [x-pack/test/functional/es_archives/canvas/filter] Migrated Kibana index after loading Kibana data
[00:02:29]               │ debg [x-pack/test/functional/es_archives/canvas/filter] Ensured that default space exists in .kibana
[00:02:29]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true,"visualization:visualize:legacyPieChartsLibrary":true}
[00:02:29]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/x4nwEKF5SA-ZMJv-XIRbrQ] update_mapping [_doc]
[00:02:31]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/x4nwEKF5SA-ZMJv-XIRbrQ] update_mapping [_doc]
[00:02:31]               │ debg navigating to canvas url: http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:31]               │ debg navigate to: http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:32]               │ debg browser[INFO] http://localhost:61181/app/canvas?_t=1625540645394#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1 281 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:32]               │
[00:02:32]               │ debg browser[INFO] http://localhost:61181/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:32]               │ debg ... sleep(700) start
[00:02:32]               │ debg ... sleep(700) end
[00:02:32]               │ debg returned from get, calling refresh
[00:02:33]               │ debg browser[INFO] http://localhost:61181/app/canvas?_t=1625540645394#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1 281 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:33]               │
[00:02:33]               │ debg browser[INFO] http://localhost:61181/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:33]               │ debg currentUrl = http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:33]               │          appUrl = http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:33]               │ debg TestSubjects.find(kibanaChrome)
[00:02:33]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:34]               │ proc [kibana]   log   [03:04:07.899] [warning][api-authorization][plugins][security] User not authorized for "/api/fleet/epm/packages?experimental=true": responding with 403
[00:02:34]               │ debg ... sleep(501) start
[00:02:34]               │ERROR browser[SEVERE] http://localhost:61181/api/fleet/epm/packages?experimental=true - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:02:34]               │ debg ... sleep(501) end
[00:02:34]               │ debg in navigateTo url = http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:34]             └-> filter updates when dropdown is changed
[00:02:34]               └-> "before each" hook: global before each for "filter updates when dropdown is changed"
[00:02:34]               │ debg TestSubjects.findAll(canvasWorkpadPage > canvasWorkpadPageElementContent)
[00:02:34]               │ debg Find.allByCssSelector('[data-test-subj="canvasWorkpadPage"] [data-test-subj="canvasWorkpadPageElementContent"]') with timeout=10000
[00:02:34]               │ debg TestSubjects.exists(canvasDebug__content)
[00:02:34]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="canvasDebug__content"]') with timeout=120000
[00:02:35]               │ debg TestSubjects.find(canvasDebug__content)
[00:02:35]               │ debg Find.findByCssSelector('[data-test-subj="canvasDebug__content"]') with timeout=10000
[00:02:35]               │ debg Find.selectValue('[data-test-subj="canvasDropdownFilter__select"]', option[value="beats"]')
[00:02:35]               │ debg Find.findByCssSelector('[data-test-subj="canvasDropdownFilter__select"]') with timeout=10000
[00:02:45]               │ info Taking screenshot "/dev/shm/workspace/parallel/18/kibana/x-pack/test/functional/screenshots/failure/Canvas app filters filter updates when dropdown is changed.png"
[00:02:45]               │ info Current URL is: http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:45]               │ info Saving page source to: /dev/shm/workspace/parallel/18/kibana/x-pack/test/functional/failure_debug/html/Canvas app filters filter updates when dropdown is changed.html
[00:02:45]               └- ✖ fail: Canvas app filters filter updates when dropdown is changed
[00:02:45]               │      TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="canvasDropdownFilter__select"])
[00:02:45]               │ Wait timed out after 10007ms
[00:02:45]               │       at /dev/shm/workspace/parallel/18/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:02:45]               │       at runMicrotasks (<anonymous>)
[00:02:45]               │       at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:02:45]               │ 
[00:02:45]               │ 

Stack Trace

TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="canvasDropdownFilter__select"])
Wait timed out after 10007ms
    at /dev/shm/workspace/parallel/18/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5) {
  remoteStacktrace: ''
}

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/canvas/filters·ts.Canvas app filters filter updates when dropdown is changed

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:02:07]         └-: Canvas app
[00:02:07]           └-> "before all" hook in "Canvas app"
[00:02:07]           └-> "before all" hook in "Canvas app"
[00:02:07]             │ debg set roles = test_logstash_reader,global_canvas_all
[00:02:07]             │ debg creating user test_user
[00:02:07]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] updated user [test_user]
[00:02:07]             │ debg created user test_user
[00:02:07]             │ debg TestSubjects.exists(kibanaChrome)
[00:02:07]             │ debg Find.existsByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=2500
[00:02:08]             │ debg TestSubjects.find(kibanaChrome)
[00:02:08]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=100000
[00:02:08]             │ debg browser[INFO] http://localhost:61181/spaces/space_selector 281 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:08]             │
[00:02:08]             │ debg browser[INFO] http://localhost:61181/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:09]             │ info [x-pack/test/functional/es_archives/logstash_functional] Loading "mappings.json"
[00:02:09]             │ info [x-pack/test/functional/es_archives/logstash_functional] Loading "data.json.gz"
[00:02:09]             │ info [x-pack/test/functional/es_archives/logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:02:09]             │ info [x-pack/test/functional/es_archives/logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:02:09]             │ info [x-pack/test/functional/es_archives/logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:02:09]             │ proc [kibana]   log   [02:59:19.106] [warning][api-authorization][plugins][security] User not authorized for "/api/fleet/epm/packages?experimental=true": responding with 403
[00:02:09]             │ERROR browser[SEVERE] http://localhost:61181/api/fleet/epm/packages?experimental=true - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:02:27]           └-: filters
[00:02:27]             └-> "before all" hook for "filter updates when dropdown is changed"
[00:02:27]             └-> "before all" hook for "filter updates when dropdown is changed"
[00:02:27]               │ info [x-pack/test/functional/es_archives/canvas/filter] Loading "mappings.json"
[00:02:27]               │ info [x-pack/test/functional/es_archives/canvas/filter] Loading "data.json.gz"
[00:02:27]               │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_8.0.0_001/ieF1wmugRwyWeVo2RgKKxA] deleting index
[00:02:27]               │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_1/6pOePKoPSmOhcXWL0NEAoQ] deleting index
[00:02:27]               │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_task_manager_8.0.0_001/YLqkNs7ZRkG-yXNOBQyxWg] deleting index
[00:02:27]               │ info [x-pack/test/functional/es_archives/canvas/filter] Deleted existing index ".kibana_8.0.0_001"
[00:02:27]               │ info [x-pack/test/functional/es_archives/canvas/filter] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:02:27]               │ info [x-pack/test/functional/es_archives/canvas/filter] Deleted existing index ".kibana_1"
[00:02:27]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_1] creating index, cause [api], templates [], shards [1]/[0]
[00:02:27]               │ info [o.e.c.r.a.AllocationService] [node-01] 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:02:27]               │ info [x-pack/test/functional/es_archives/canvas/filter] Created index ".kibana_1"
[00:02:27]               │ debg [x-pack/test/functional/es_archives/canvas/filter] ".kibana_1" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:02:27]               │ info [x-pack/test/functional/es_archives/canvas/filter] Indexed 1 docs into ".kibana_1"
[00:02:27]               │ debg Migrating saved objects
[00:02:27]               │ proc [kibana]   log   [02:59:37.002] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET. took: 2ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.005] [info][savedobjects-service] [.kibana] INIT -> WAIT_FOR_YELLOW_SOURCE. took: 7ms.
[00:02:27]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_task_manager_8.0.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:02:27]               │ proc [kibana]   log   [02:59:37.008] [info][savedobjects-service] [.kibana] WAIT_FOR_YELLOW_SOURCE -> CHECK_UNKNOWN_DOCUMENTS. took: 3ms.
[00:02:27]               │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:02:27]               │ proc [kibana]   log   [02:59:37.015] [info][savedobjects-service] [.kibana] CHECK_UNKNOWN_DOCUMENTS -> SET_SOURCE_WRITE_BLOCK. took: 7ms.
[00:02:27]               │ info [o.e.c.m.MetadataIndexStateService] [node-01] adding block write to indices [[.kibana_1/1G588GbyR4Grlv-pfbW3_A]]
[00:02:27]               │ info [o.e.c.r.a.AllocationService] [node-01] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_task_manager_8.0.0_001][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_task_manager_8.0.0_001][0]]"
[00:02:27]               │ info [o.e.c.m.MetadataIndexStateService] [node-01] completed adding block write to indices [.kibana_1]
[00:02:27]               │ proc [kibana]   log   [02:59:37.084] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY. took: 82ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.098] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP. took: 83ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.115] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE. took: 31ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.115] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 115ms
[00:02:27]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:02:27]               │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.kibana_8.0.0_reindex_temp]
[00:02:27]               │ info [o.e.c.r.a.AllocationService] [node-01] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_8.0.0_reindex_temp][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_8.0.0_reindex_temp][0]]"
[00:02:27]               │ proc [kibana]   log   [02:59:37.159] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP_OPEN_PIT. took: 61ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.164] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_OPEN_PIT -> REINDEX_SOURCE_TO_TEMP_READ. took: 5ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.172] [info][savedobjects-service] [.kibana] Starting to process 1 documents.
[00:02:27]               │ proc [kibana]   log   [02:59:37.173] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_INDEX. took: 8ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.174] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 2ms.
[00:02:27]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_reindex_temp/cqETmaDQSKS1_C_UoUSO-Q] update_mapping [_doc]
[00:02:27]               │ proc [kibana]   log   [02:59:37.208] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 34ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.216] [info][savedobjects-service] [.kibana] Processed 1 documents out of 1.
[00:02:27]               │ proc [kibana]   log   [02:59:37.217] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 8ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.222] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_CLOSE_PIT -> SET_TEMP_WRITE_BLOCK. took: 6ms.
[00:02:27]               │ info [o.e.c.m.MetadataIndexStateService] [node-01] adding block write to indices [[.kibana_8.0.0_reindex_temp/cqETmaDQSKS1_C_UoUSO-Q]]
[00:02:27]               │ info [o.e.c.m.MetadataIndexStateService] [node-01] completed adding block write to indices [.kibana_8.0.0_reindex_temp]
[00:02:27]               │ proc [kibana]   log   [02:59:37.266] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET. took: 44ms.
[00:02:27]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] applying create index request using existing index [.kibana_8.0.0_reindex_temp] metadata
[00:02:27]               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:02:27]               │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.kibana_8.0.0_001]
[00:02:27]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/V-LicIwgTbOgnlCd4uOH2Q] create_mapping
[00:02:27]               │ info [o.e.c.r.a.AllocationService] [node-01] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_8.0.0_001][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_8.0.0_001][0]]"
[00:02:27]               │ proc [kibana]   log   [02:59:37.365] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> REFRESH_TARGET. took: 99ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.369] [info][savedobjects-service] [.kibana] REFRESH_TARGET -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 4ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.373] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 4ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.379] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 6ms.
[00:02:27]               │ proc [kibana]   log   [02:59:37.381] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 2ms.
[00:02:27]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/V-LicIwgTbOgnlCd4uOH2Q] update_mapping [_doc]
[00:02:28]               │ proc [kibana]   log   [02:59:37.442] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 61ms.
[00:02:28]               │ info [o.e.t.LoggingTaskListener] [node-01] 6968 finished with response BulkByScrollResponse[took=17.4ms,timed_out=false,sliceId=null,updated=1,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:02:28]               │ proc [kibana]   log   [02:59:37.547] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY. took: 105ms.
[00:02:28]               │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_8.0.0_reindex_temp/cqETmaDQSKS1_C_UoUSO-Q] deleting index
[00:02:28]               │ proc [kibana]   log   [02:59:37.591] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE. took: 44ms.
[00:02:28]               │ proc [kibana]   log   [02:59:37.591] [info][savedobjects-service] [.kibana] Migration completed after 593ms
[00:02:28]               │ debg [x-pack/test/functional/es_archives/canvas/filter] Migrated Kibana index after loading Kibana data
[00:02:28]               │ debg [x-pack/test/functional/es_archives/canvas/filter] Ensured that default space exists in .kibana
[00:02:28]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true,"visualization:visualize:legacyPieChartsLibrary":true}
[00:02:28]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/V-LicIwgTbOgnlCd4uOH2Q] update_mapping [_doc]
[00:02:29]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/V-LicIwgTbOgnlCd4uOH2Q] update_mapping [_doc]
[00:02:30]               │ debg navigating to canvas url: http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:30]               │ debg navigate to: http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:31]               │ debg browser[INFO] http://localhost:61181/app/canvas?_t=1625540380335#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1 281 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:31]               │
[00:02:31]               │ debg browser[INFO] http://localhost:61181/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:31]               │ debg ... sleep(700) start
[00:02:31]               │ debg ... sleep(700) end
[00:02:31]               │ debg returned from get, calling refresh
[00:02:32]               │ debg browser[INFO] http://localhost:61181/app/canvas?_t=1625540380335#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1 281 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:32]               │
[00:02:32]               │ debg browser[INFO] http://localhost:61181/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:32]               │ debg currentUrl = http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:32]               │          appUrl = http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:32]               │ debg TestSubjects.find(kibanaChrome)
[00:02:32]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:33]               │ proc [kibana]   log   [02:59:43.155] [warning][api-authorization][plugins][security] User not authorized for "/api/fleet/epm/packages?experimental=true": responding with 403
[00:02:33]               │ debg ... sleep(501) start
[00:02:33]               │ERROR browser[SEVERE] http://localhost:61181/api/fleet/epm/packages?experimental=true - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:02:34]               │ debg ... sleep(501) end
[00:02:34]               │ debg in navigateTo url = http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:34]             └-> filter updates when dropdown is changed
[00:02:34]               └-> "before each" hook: global before each for "filter updates when dropdown is changed"
[00:02:34]               │ debg TestSubjects.findAll(canvasWorkpadPage > canvasWorkpadPageElementContent)
[00:02:34]               │ debg Find.allByCssSelector('[data-test-subj="canvasWorkpadPage"] [data-test-subj="canvasWorkpadPageElementContent"]') with timeout=10000
[00:02:34]               │ debg TestSubjects.exists(canvasDebug__content)
[00:02:34]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="canvasDebug__content"]') with timeout=120000
[00:02:34]               │ debg TestSubjects.find(canvasDebug__content)
[00:02:34]               │ debg Find.findByCssSelector('[data-test-subj="canvasDebug__content"]') with timeout=10000
[00:02:34]               │ debg Find.selectValue('[data-test-subj="canvasDropdownFilter__select"]', option[value="beats"]')
[00:02:34]               │ debg Find.findByCssSelector('[data-test-subj="canvasDropdownFilter__select"]') with timeout=10000
[00:02:44]               │ info Taking screenshot "/dev/shm/workspace/parallel/18/kibana/x-pack/test/functional/screenshots/failure/Canvas app filters filter updates when dropdown is changed.png"
[00:02:44]               │ info Current URL is: http://localhost:61181/app/canvas#/workpad/workpad-b5618217-56d2-47fa-b756-1be2306cda68/page/1
[00:02:44]               │ info Saving page source to: /dev/shm/workspace/parallel/18/kibana/x-pack/test/functional/failure_debug/html/Canvas app filters filter updates when dropdown is changed.html
[00:02:44]               └- ✖ fail: Canvas app filters filter updates when dropdown is changed
[00:02:44]               │      TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="canvasDropdownFilter__select"])
[00:02:44]               │ Wait timed out after 10013ms
[00:02:44]               │       at /dev/shm/workspace/parallel/18/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:02:44]               │       at runMicrotasks (<anonymous>)
[00:02:44]               │       at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:02:44]               │ 
[00:02:44]               │ 

Stack Trace

TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="canvasDropdownFilter__select"])
Wait timed out after 10013ms
    at /dev/shm/workspace/parallel/18/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5) {
  remoteStacktrace: ''
}

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 1032 1030 -2

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
canvas 5 3 -2

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
canvas 1.2MB 1.2MB -479.0B

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
canvas 3 1 -2

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
canvas 429.1KB 427.7KB -1.4KB
Unknown metric groups

API count

id before after diff
canvas 6 4 -2

History

  • 💔 Build #134300 failed b93852a20de6f4dfb323aa35d74dff30174e47e4
  • 💔 Build #134246 failed 380575279d548b9bf04a3341ab14150ee01c393e
  • 💔 Build #133885 failed 0d15e1fb80d7acc6361e72eacf692c118dd29f6a

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Canvas impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.0.0 WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants