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

[7.x] [Reporting] Make "ScreenCapturePanel" shareable for Canvas (#100623) #101852

Merged
merged 3 commits into from
Jun 10, 2021

Conversation

tsullivan
Copy link
Member

Backports the following commits to 7.x:

…00623)

* use ScreenCapturePanel component in Canvas

* use smaller state object

* add comment about canvas-specific shared component

* fix example

* fix toast error

* fix i18n

* fix data-test-subj

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@tsullivan tsullivan enabled auto-merge (squash) June 10, 2021 00:09
@tsullivan
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Chrome UI Functional Tests.test/functional/apps/getting_started/_shakespeare·ts.Getting Started new charts library Shakespeare "before all" hook for "should create shakespeare index pattern"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:36:13]         └-: Getting Started 
[00:36:13]           └-> "before all" hook in "Getting Started "
[00:36:13]           └-> "before all" hook in "Getting Started "
[00:36:13]           └-: new charts library
[00:36:13]             └-> "before all" hook in "new charts library"
[00:36:13]             └-> "before all" hook in "new charts library"
[00:36:13]               │ debg applying update to kibana config: {"visualization:visualize:legacyChartsLibrary":false}
[00:36:13]             └-: Shakespeare
[00:36:13]               └-> "before all" hook for "should create shakespeare index pattern"
[00:36:14]               └-> "before all" hook for "should create shakespeare index pattern"
[00:36:14]                 │ debg Load empty_kibana and Shakespeare Getting Started data
[00:36:14]                 │      https://www.elastic.co/guide/en/kibana/current/tutorial-load-dataset.html
[00:36:14]                 │ debg browser[INFO] http://localhost:6171/app/discover#/doc/logstash-*/logstash-2015.09.22?id=AU_x3_g4GFA8no6QjkYX 340 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:36:14]                 │
[00:36:14]                 │ debg browser[INFO] http://localhost:6171/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:36:14]                 │ debg -- isNewChartsLibraryEnabled = true
[00:36:14]                 │ info [test/functional/fixtures/es_archiver/empty_kibana] Loading "mappings.json"
[00:36:14]                 │ info [test/functional/fixtures/es_archiver/empty_kibana] Loading "data.json.gz"
[00:36:14]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [.kibana_1/Q-zEp6waSumsgpHUy1mc4g] deleting index
[00:36:14]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [.kibana_7.14.0_001/laHBvhuSQvGseVCpMR-Yew] deleting index
[00:36:14]                 │ info [test/functional/fixtures/es_archiver/empty_kibana] Deleted existing index ".kibana_7.14.0_001"
[00:36:14]                 │ info [test/functional/fixtures/es_archiver/empty_kibana] Deleted existing index ".kibana_1"
[00:36:14]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:36:14]                 │ info [test/functional/fixtures/es_archiver/empty_kibana] Created index ".kibana_1"
[00:36:14]                 │ debg [test/functional/fixtures/es_archiver/empty_kibana] ".kibana_1" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:36:14]                 │ info [test/functional/fixtures/es_archiver/empty_kibana] Indexed 1 docs into ".kibana"
[00:36:14]                 │ debg Migrating saved objects
[00:36:14]                 │ proc [kibana]   log   [05:19:08.363] [info][savedobjects-service] [.kibana] INIT -> WAIT_FOR_YELLOW_SOURCE. took: 5ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.373] [info][savedobjects-service] [.kibana] WAIT_FOR_YELLOW_SOURCE -> SET_SOURCE_WRITE_BLOCK. took: 11ms.
[00:36:14]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] adding block write to indices [[.kibana_1/0LSooEcFRo2-8gyLr5OSWw]]
[00:36:14]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] completed adding block write to indices [.kibana_1]
[00:36:14]                 │ proc [kibana]   log   [05:19:08.409] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP. took: 36ms.
[00:36:14]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [.kibana_7.14.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:36:14]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] updating number_of_replicas to [0] for indices [.kibana_7.14.0_reindex_temp]
[00:36:14]                 │ proc [kibana]   log   [05:19:08.455] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP_OPEN_PIT. took: 46ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.459] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_OPEN_PIT -> REINDEX_SOURCE_TO_TEMP_READ. took: 4ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.464] [info][savedobjects-service] [.kibana] Starting to process 1 documents.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.465] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_INDEX. took: 5ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.467] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 3ms.
[00:36:14]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [.kibana_7.14.0_reindex_temp/WHzOkFyESYCNfX8f5HlNtw] update_mapping [_doc]
[00:36:14]                 │ proc [kibana]   log   [05:19:08.492] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 25ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.495] [info][savedobjects-service] [.kibana] Processed 1 documents out of 1.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.496] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 3ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.498] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_CLOSE_PIT -> SET_TEMP_WRITE_BLOCK. took: 3ms.
[00:36:14]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] adding block write to indices [[.kibana_7.14.0_reindex_temp/WHzOkFyESYCNfX8f5HlNtw]]
[00:36:14]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] completed adding block write to indices [.kibana_7.14.0_reindex_temp]
[00:36:14]                 │ proc [kibana]   log   [05:19:08.533] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET. took: 35ms.
[00:36:14]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] applying create index request using existing index [.kibana_7.14.0_reindex_temp] metadata
[00:36:14]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [.kibana_7.14.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:36:14]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] updating number_of_replicas to [0] for indices [.kibana_7.14.0_001]
[00:36:14]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [.kibana_7.14.0_001/6_9PEIKkT_2Kci6puKlmTw] create_mapping [_doc]
[00:36:14]                 │ proc [kibana]   log   [05:19:08.621] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> REFRESH_TARGET. took: 88ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.624] [info][savedobjects-service] [.kibana] REFRESH_TARGET -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 3ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.626] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 2ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.630] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 4ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.632] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 2ms.
[00:36:14]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [.kibana_7.14.0_001/6_9PEIKkT_2Kci6puKlmTw] update_mapping [_doc]
[00:36:14]                 │ proc [kibana]   log   [05:19:08.663] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 31ms.
[00:36:14]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] 20199 finished with response BulkByScrollResponse[took=15.8ms,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:36:14]                 │ proc [kibana]   log   [05:19:08.768] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY. took: 105ms.
[00:36:14]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [.kibana_7.14.0_reindex_temp/WHzOkFyESYCNfX8f5HlNtw] deleting index
[00:36:14]                 │ proc [kibana]   log   [05:19:08.799] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE. took: 31ms.
[00:36:14]                 │ proc [kibana]   log   [05:19:08.800] [info][savedobjects-service] [.kibana] Migration completed after 443ms
[00:36:14]                 │ debg [test/functional/fixtures/es_archiver/empty_kibana] Migrated Kibana index after loading Kibana data
[00:36:14]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true}
[00:36:16]                 │ debg Load shakespeare data
[00:36:16]                 │ info [test/functional/fixtures/es_archiver/getting_started/shakespeare] Loading "mappings.json"
[00:36:16]                 │ info [test/functional/fixtures/es_archiver/getting_started/shakespeare] Loading "data.json.gz"
[00:36:16]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [shakespeare] creating index, cause [api], templates [], shards [5]/[1]
[00:36:16]                 │ info [test/functional/fixtures/es_archiver/getting_started/shakespeare] Created index "shakespeare"
[00:36:16]                 │ debg [test/functional/fixtures/es_archiver/getting_started/shakespeare] "shakespeare" settings {"index":{"number_of_replicas":"1","number_of_shards":"5"}}
[00:36:16]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] [shakespeare/9f3nReCpQjWyMP-UW-Xh4Q] update_mapping [_doc]
[00:36:17]                 │ info [o.e.i.b.HierarchyCircuitBreakerService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] attempting to trigger G1GC due to high heap usage [1025487056]
[00:36:17]                 │ info [o.e.i.b.HierarchyCircuitBreakerService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1623299051608065781] GC did bring memory usage down, before [1025487056], after [524781488], allocations [9], duration [16]
[00:36:19]                 │ info Taking screenshot "/dev/shm/workspace/parallel/7/kibana/test/functional/screenshots/failure/Getting Started  new charts library Shakespeare _before all_ hook for _should create shakespeare index pattern_.png"
[00:36:19]                 │ info Current URL is: http://localhost:6171/app/discover#/doc/logstash-*/logstash-2015.09.22?id=AU_x3_g4GFA8no6QjkYX
[00:36:19]                 │ info Saving page source to: /dev/shm/workspace/parallel/7/kibana/test/functional/failure_debug/html/Getting Started  new charts library Shakespeare _before all_ hook for _should create shakespeare index pattern_.html
[00:36:19]                 └- ✖ fail: Getting Started  new charts library Shakespeare "before all" hook for "should create shakespeare index pattern"
[00:36:19]                 │      ResponseError: circuit_breaking_exception: [circuit_breaking_exception] Reason: [parent] Data too large, data for [<http_request>] would be [1040461048/992.2mb], which is larger than the limit of [1020054732/972.7mb], real usage: [1040460584/992.2mb], new bytes reserved: [464/464b], usages [request=0/0b, fielddata=0/0b, in_flight_requests=464/464b, model_inference=0/0b, accounting=36704/35.8kb]
[00:36:19]                 │       at onBody (node_modules/@elastic/elasticsearch/lib/Transport.js:337:23)
[00:36:19]                 │       at IncomingMessage.onEnd (node_modules/@elastic/elasticsearch/lib/Transport.js:264:11)
[00:36:19]                 │       at endReadableNT (internal/streams/readable.js:1336:12)
[00:36:19]                 │       at processTicksAndRejections (internal/process/task_queues.js:82:21)
[00:36:19]                 │ 
[00:36:19]                 │ 

Stack Trace

ResponseError: circuit_breaking_exception: [circuit_breaking_exception] Reason: [parent] Data too large, data for [<http_request>] would be [1040461048/992.2mb], which is larger than the limit of [1020054732/972.7mb], real usage: [1040460584/992.2mb], new bytes reserved: [464/464b], usages [request=0/0b, fielddata=0/0b, in_flight_requests=464/464b, model_inference=0/0b, accounting=36704/35.8kb]
    at onBody (node_modules/@elastic/elasticsearch/lib/Transport.js:337:23)
    at IncomingMessage.onEnd (node_modules/@elastic/elasticsearch/lib/Transport.js:264:11)
    at endReadableNT (internal/streams/readable.js:1336:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  meta: {
    body: { error: [Object], status: 429 },
    statusCode: 429,
    headers: {
      'content-type': 'application/json; charset=UTF-8',
      'content-length': '923'
    },
    meta: {
      context: null,
      request: [Object],
      name: 'elasticsearch-js',
      connection: [Object],
      attempts: 0,
      aborted: false
    }
  }
}

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 1089 1088 -1
reporting 49 51 +2
total +1

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
reporting 124 123 -1

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.3MB 1.3MB -4.7KB

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
reporting 18 17 -1

Page load bundle

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

id before after diff
canvas 533.4KB 529.6KB -3.7KB
reporting 84.3KB 85.4KB +1.1KB
total -2.6KB
Unknown metric groups

API count

id before after diff
reporting 125 124 -1

History

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

@tsullivan tsullivan merged commit c6d395f into elastic:7.x Jun 10, 2021
@tsullivan tsullivan deleted the backport/7.x/pr-100623 branch June 24, 2021 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants