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

[bfetch] compress stream chunks #97994

Merged
merged 65 commits into from
Jun 1, 2021
Merged

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Apr 22, 2021

Summary

Resolves #94998

This bug was introduced by switching to use bfetch for batching in 7.11.
Since bfetch chunks are not compressed, we started transferring uncompressed data, whenever the data.search api was used (low level search + search source).

This PR encodes each chunk before sending it.

Testing

Compression is now applied by default to anywhere where bfetch is used: Discover, Visualizations, Dashboard, Canvas, etc.
If you wish to disable compression (for example for debugging), you can toggle the DISABLE_BFETCH_COMPRESSION UI setting.
Toggling this setting on and off everything should work the same, but data transfer size should drastically decrease.

Release note

Fixes bug where bfetch responses were not compressed.
Introduces new UI Setting DISABLE_BFETCH_COMPRESSION for better debuggability.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

Liza K added 29 commits April 5, 2021 21:50
ts improvements
more inspector tests
more tests
@lizozom
Copy link
Contributor Author

lizozom commented May 24, 2021

Waiting a little longer with merging this, to allow @mshustov try integrating DecompressionStream

@lizozom
Copy link
Contributor Author

lizozom commented May 24, 2021

@elasticmachine merge upstream

@lizozom
Copy link
Contributor Author

lizozom commented May 25, 2021

@elasticmachine merge upstream

@lizozom
Copy link
Contributor Author

lizozom commented May 30, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

merge conflict between base and head

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/spaces/spaces_selection·ts.Spaces app Spaces Spaces Data displays separate data for each space in the default space

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:08:20]         └-: Spaces app
[00:08:20]           └-> "before all" hook in "Spaces app"
[00:10:22]           └-: Spaces
[00:10:22]             └-> "before all" hook in "Spaces"
[00:10:34]             └-: Spaces Data
[00:10:34]               └-> "before all" hook in "Spaces Data"
[00:10:34]               └-> "before all" hook in "Spaces Data"
[00:10:34]                 │ info [spaces/selector] Loading "mappings.json"
[00:10:34]                 │ info [spaces/selector] Loading "data.json"
[00:10:34]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/qJSSWktIR3SD8GFgiS_Zog] deleting index
[00:10:34]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_pre6.5.0_001/Q2_n_QLSScSl89HciJNIpg] deleting index
[00:10:34]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_task_manager_8.0.0_001/2yqBM7gMReuExA5uYD-MIg] deleting index
[00:10:34]                 │ info [spaces/selector] Deleted existing index ".kibana_8.0.0_001"
[00:10:34]                 │ info [spaces/selector] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:10:34]                 │ info [spaces/selector] Deleted existing index ".kibana_pre6.5.0_001"
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:10:34]                 │ info [spaces/selector] Created index ".kibana"
[00:10:34]                 │ debg [spaces/selector] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:10:34]                 │ info [spaces/selector] Indexed 3 docs into ".kibana"
[00:10:34]                 │ debg Migrating saved objects
[00:10:34]                 │ proc [kibana]   log   [13:09:15.166] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET. took: 5ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.168] [info][savedobjects-service] [.kibana] INIT -> LEGACY_SET_WRITE_BLOCK. took: 9ms.
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_task_manager_8.0.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:10:34]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] adding block write to indices [[.kibana/8T9f7m6bR_KmJMGM4azoGQ]]
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] completed adding block write to indices [.kibana]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.243] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY. took: 77ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.256] [info][savedobjects-service] [.kibana] LEGACY_SET_WRITE_BLOCK -> LEGACY_CREATE_REINDEX_TARGET. took: 88ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.275] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE. took: 32ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.275] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 114ms
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_pre6.5.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:10:34]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [.kibana_pre6.5.0_001]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.325] [info][savedobjects-service] [.kibana] LEGACY_CREATE_REINDEX_TARGET -> LEGACY_REINDEX. took: 69ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.329] [info][savedobjects-service] [.kibana] LEGACY_REINDEX -> LEGACY_REINDEX_WAIT_FOR_TASK. took: 4ms.
[00:10:34]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] 25313 finished with response BulkByScrollResponse[took=18ms,timed_out=false,sliceId=null,updated=0,created=3,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.433] [info][savedobjects-service] [.kibana] LEGACY_REINDEX_WAIT_FOR_TASK -> LEGACY_DELETE. took: 104ms.
[00:10:34]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana/8T9f7m6bR_KmJMGM4azoGQ] deleting index
[00:10:34]                 │ proc [kibana]   log   [13:09:15.468] [info][savedobjects-service] [.kibana] LEGACY_DELETE -> SET_SOURCE_WRITE_BLOCK. took: 35ms.
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] adding block write to indices [[.kibana_pre6.5.0_001/kiNOkPbISOi4SnmbmEG8iA]]
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] completed adding block write to indices [.kibana_pre6.5.0_001]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.506] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP. took: 38ms.
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:10:34]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [.kibana_8.0.0_reindex_temp]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.558] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP_OPEN_PIT. took: 52ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.561] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_OPEN_PIT -> REINDEX_SOURCE_TO_TEMP_READ. took: 3ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.566] [info][savedobjects-service] [.kibana] Starting to process 3 documents.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.566] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_INDEX. took: 5ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.567] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1ms.
[00:10:34]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_reindex_temp/T3d05pAXQ3KfP5ww1bHXFA] update_mapping [_doc]
[00:10:34]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_reindex_temp/T3d05pAXQ3KfP5ww1bHXFA] update_mapping [_doc]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.620] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 53ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.624] [info][savedobjects-service] [.kibana] Processed 3 documents out of 3.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.625] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 4ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.627] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_CLOSE_PIT -> SET_TEMP_WRITE_BLOCK. took: 3ms.
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] adding block write to indices [[.kibana_8.0.0_reindex_temp/T3d05pAXQ3KfP5ww1bHXFA]]
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] completed adding block write to indices [.kibana_8.0.0_reindex_temp]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.673] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET. took: 46ms.
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] applying create index request using existing index [.kibana_8.0.0_reindex_temp] metadata
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:10:34]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [.kibana_8.0.0_001]
[00:10:34]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] create_mapping
[00:10:35]                 │ proc [kibana]   log   [13:09:15.802] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> REFRESH_TARGET. took: 129ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:15.806] [info][savedobjects-service] [.kibana] REFRESH_TARGET -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 4ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:15.809] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 3ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:15.817] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 8ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:15.821] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 4ms.
[00:10:35]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:35]                 │ proc [kibana]   log   [13:09:15.896] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 75ms.
[00:10:35]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] 25401 finished with response BulkByScrollResponse[took=25.9ms,timed_out=false,sliceId=null,updated=3,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:10:35]                 │ proc [kibana]   log   [13:09:16.000] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY. took: 104ms.
[00:10:35]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_reindex_temp/T3d05pAXQ3KfP5ww1bHXFA] deleting index
[00:10:35]                 │ proc [kibana]   log   [13:09:16.063] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE. took: 63ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:16.063] [info][savedobjects-service] [.kibana] Migration completed after 904ms
[00:10:35]                 │ debg [spaces/selector] Migrated Kibana index after loading Kibana data
[00:10:35]                 │ debg [spaces/selector] Ensured that default space exists in .kibana
[00:10:35]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true}
[00:10:36]                 │ debg TestSubjects.exists(loginForm)
[00:10:36]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:10:36]                 │ debg Waiting for Login Form to appear.
[00:10:36]                 │ debg Waiting up to 100000ms for login form...
[00:10:36]                 │ debg TestSubjects.exists(loginForm)
[00:10:36]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:10:37]                 │ debg TestSubjects.setValue(loginUsername, elastic)
[00:10:37]                 │ debg TestSubjects.click(loginUsername)
[00:10:37]                 │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:10:37]                 │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:10:37]                 │ debg TestSubjects.setValue(loginPassword, changeme)
[00:10:37]                 │ debg TestSubjects.click(loginPassword)
[00:10:37]                 │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:10:37]                 │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:10:37]                 │ debg TestSubjects.click(loginSubmit)
[00:10:37]                 │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:10:37]                 │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:10:37]                 │ debg Waiting for login result, expected: spaceSelector.
[00:10:37]                 │ debg TestSubjects.find(kibanaSpaceSelector)
[00:10:37]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaSpaceSelector"]') with timeout=10000
[00:10:37]                 │ proc [kibana]   log   [13:09:18.090] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:10:39]                 │ debg browser[INFO] http://localhost:61161/spaces/space_selector 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:10:39]                 │
[00:10:39]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:39]                 │ debg Finished login process, landed on space selector. currentUrl = http://localhost:61161/spaces/space_selector
[00:10:39]                 │ info SpaceSelectorPage:clickSpaceCard(default)
[00:10:39]                 │ debg TestSubjects.click(space-card-default)
[00:10:39]                 │ debg Find.clickByCssSelector('[data-test-subj="space-card-default"]') with timeout=10000
[00:10:39]                 │ debg Find.findByCssSelector('[data-test-subj="space-card-default"]') with timeout=10000
[00:10:39]                 │ debg ... sleep(1000) start
[00:10:39]                 │ debg browser[INFO] http://localhost:61161/app/home 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:10:39]                 │
[00:10:39]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:40]                 │ debg ... sleep(1000) end
[00:10:40]                 │ debg navigating to home url: http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:40]                 │ debg navigate to: http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:41]                 │ debg browser[INFO] http://localhost:61161/app/home?_t=1622466561620#/tutorial_directory/sampleData 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:10:41]                 │
[00:10:41]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:41]                 │ debg ... sleep(700) start
[00:10:41]                 │ debg ... sleep(700) end
[00:10:41]                 │ debg returned from get, calling refresh
[00:10:42]                 │ERROR browser[SEVERE] http://localhost:61161/43215/bundles/plugin/newsfeed/kibana/newsfeed.plugin.js 0:18527 TypeError: Failed to fetch
[00:10:42]                 │          at fetch_Fetch.fetchResponse (http://localhost:61161/43215/bundles/core/core.entry.js:6:26614)
[00:10:42]                 │          at async http://localhost:61161/43215/bundles/core/core.entry.js:6:24090
[00:10:42]                 │          at async http://localhost:61161/43215/bundles/core/core.entry.js:6:23996
[00:10:42]                 │ debg browser[INFO] http://localhost:61161/app/home?_t=1622466561620#/tutorial_directory/sampleData 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:10:42]                 │
[00:10:42]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:42]                 │ debg currentUrl = http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:42]                 │          appUrl = http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:42]                 │ debg TestSubjects.find(kibanaChrome)
[00:10:42]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:44]                 │ debg ... sleep(501) start
[00:10:44]                 │ debg ... sleep(501) end
[00:10:44]                 │ debg in navigateTo url = http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:44]                 │ debg TestSubjects.exists(addSampleDataSetlogs)
[00:10:44]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=2500
[00:10:44]                 │ debg TestSubjects.click(addSampleDataSetlogs)
[00:10:44]                 │ debg Find.clickByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=10000
[00:10:44]                 │ debg Find.findByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=10000
[00:10:44]                 │ debg TestSubjects.find(sampleDataSetCardlogs)
[00:10:44]                 │ debg Find.findByCssSelector('[data-test-subj="sampleDataSetCardlogs"]') with timeout=10000
[00:10:44]                 │ERROR browser[SEVERE] http://localhost:61161/api/fleet/settings - Failed to load resource: the server responded with a status of 404 (Not Found)
[00:10:45]                 │ debg navigating to home url: http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:45]                 │ debg navigate to: http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:46]                 │ debg browser[INFO] http://localhost:61161/s/another-space/app/home?_t=1622466566665#/tutorial_directory/sampleData 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:10:46]                 │
[00:10:46]                 │ debg browser[INFO] http://localhost:61161/s/another-space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:46]                 │ debg ... sleep(700) start
[00:10:47]                 │ debg ... sleep(700) end
[00:10:47]                 │ debg returned from get, calling refresh
[00:10:47]                 │ERROR browser[SEVERE] http://localhost:61161/43215/bundles/plugin/newsfeed/kibana/newsfeed.plugin.js 0:18527 TypeError: Failed to fetch
[00:10:47]                 │          at fetch_Fetch.fetchResponse (http://localhost:61161/43215/bundles/core/core.entry.js:6:26614)
[00:10:47]                 │          at async http://localhost:61161/43215/bundles/core/core.entry.js:6:24090
[00:10:47]                 │          at async http://localhost:61161/43215/bundles/core/core.entry.js:6:23996
[00:10:47]                 │ debg browser[INFO] http://localhost:61161/s/another-space/app/home?_t=1622466566665#/tutorial_directory/sampleData 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:10:47]                 │
[00:10:47]                 │ debg browser[INFO] http://localhost:61161/s/another-space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:48]                 │ debg currentUrl = http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:48]                 │          appUrl = http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:48]                 │ debg TestSubjects.find(kibanaChrome)
[00:10:48]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:48]                 │ debg ... sleep(501) start
[00:10:48]                 │ debg ... sleep(501) end
[00:10:48]                 │ debg in navigateTo url = http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:48]                 │ debg TestSubjects.exists(addSampleDataSetlogs)
[00:10:48]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=2500
[00:10:48]                 │ERROR browser[SEVERE] http://localhost:61161/s/another-space/api/fleet/settings - Failed to load resource: the server responded with a status of 404 (Not Found)
[00:10:49]                 │ debg TestSubjects.click(addSampleDataSetlogs)
[00:10:49]                 │ debg Find.clickByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=10000
[00:10:49]                 │ debg Find.findByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=10000
[00:10:49]                 │ debg TestSubjects.find(sampleDataSetCardlogs)
[00:10:49]                 │ debg Find.findByCssSelector('[data-test-subj="sampleDataSetCardlogs"]') with timeout=10000
[00:10:49]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [kibana_sample_data_logs] creating index, cause [api], templates [], shards [1]/[1]
[00:10:49]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [kibana_sample_data_logs]
[00:10:49]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [kibana_sample_data_logs/yl015xcLQQCjTFyxiKWeZw] update_mapping [_doc]
[00:10:51]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:51]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:52]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:52]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:52]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:52]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:54]               └-: displays separate data for each space
[00:10:54]                 └-> "before all" hook for "in the default space"
[00:10:54]                 └-> in the default space
[00:10:54]                   └-> "before each" hook: global before each for "in the default space"
[00:10:54]                   │ debg navigating to dashboard url: http://localhost:61161/app/dashboards#/list
[00:10:54]                   │ debg navigate to: http://localhost:61161/app/dashboards#/list
[00:10:54]                   │ debg browser[INFO] http://localhost:61161/app/dashboards?_t=1622466574956#/list 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:10:54]                   │
[00:10:54]                   │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:54]                   │ debg ... sleep(700) start
[00:10:55]                   │ debg ... sleep(700) end
[00:10:55]                   │ debg returned from get, calling refresh
[00:10:55]                   │ debg browser[INFO] http://localhost:61161/app/dashboards?_t=1622466574956#/list 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:10:55]                   │
[00:10:55]                   │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:55]                   │ debg currentUrl = http://localhost:61161/app/dashboards#/list
[00:10:55]                   │          appUrl = http://localhost:61161/app/dashboards#/list
[00:10:55]                   │ debg TestSubjects.find(kibanaChrome)
[00:10:55]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:56]                   │ debg ... sleep(501) start
[00:10:56]                   │ debg ... sleep(501) end
[00:10:56]                   │ debg in navigateTo url = http://localhost:61161/app/dashboards#/list?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:10:56]                   │ debg --- retry.tryForTime error: URL changed, waiting for it to settle
[00:10:57]                   │ debg ... sleep(501) start
[00:10:57]                   │ debg ... sleep(501) end
[00:10:57]                   │ debg in navigateTo url = http://localhost:61161/app/dashboards#/list?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:10:57]                   │ debg searchForItemWithName: [Logs] Web Traffic
[00:10:57]                   │ debg TestSubjects.find(tableListSearchBox)
[00:10:57]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:11:07]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:11:07]                   │      Wait timed out after 10051ms
[00:11:08]                   │ debg TestSubjects.find(tableListSearchBox)
[00:11:08]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:11:18]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:11:18]                   │      Wait timed out after 10058ms
[00:11:18]                   │ debg TestSubjects.find(tableListSearchBox)
[00:11:18]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:11:28]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:11:28]                   │      Wait timed out after 10035ms
[00:11:29]                   │ debg TestSubjects.find(tableListSearchBox)
[00:11:29]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:11:39]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:11:39]                   │      Wait timed out after 10047ms
[00:11:39]                   │ debg TestSubjects.find(tableListSearchBox)
[00:11:39]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:11:49]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:11:49]                   │      Wait timed out after 10005ms
[00:11:50]                   │ debg TestSubjects.find(tableListSearchBox)
[00:11:50]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:12:00]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:12:00]                   │      Wait timed out after 10009ms
[00:12:00]                   │ debg TestSubjects.find(tableListSearchBox)
[00:12:00]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:12:10]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:12:10]                   │      Wait timed out after 10022ms
[00:12:11]                   │ debg TestSubjects.find(tableListSearchBox)
[00:12:11]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:12:21]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:12:21]                   │      Wait timed out after 10025ms
[00:12:21]                   │ debg TestSubjects.find(tableListSearchBox)
[00:12:21]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:12:31]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:12:31]                   │      Wait timed out after 10051ms
[00:12:32]                   │ debg TestSubjects.find(tableListSearchBox)
[00:12:32]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:12:42]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:12:42]                   │      Wait timed out after 10010ms
[00:12:42]                   │ debg TestSubjects.find(tableListSearchBox)
[00:12:42]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:12:52]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:12:52]                   │      Wait timed out after 10011ms
[00:12:53]                   │ debg TestSubjects.find(tableListSearchBox)
[00:12:53]                   │ debg Find.findByCssSelector('[data-test-subj="tableListSearchBox"]') with timeout=10000
[00:13:03]                   │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:13:03]                   │      Wait timed out after 10008ms
[00:13:03]                   │ info Taking screenshot "/dev/shm/workspace/parallel/16/kibana/x-pack/test/functional/screenshots/failure/Spaces app Spaces Spaces Data displays separate data for each space in the default space.png"
[00:13:04]                   │ info Current URL is: http://localhost:61161/app/dashboards#/list?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:13:04]                   │ info Saving page source to: /dev/shm/workspace/parallel/16/kibana/x-pack/test/functional/failure_debug/html/Spaces app Spaces Spaces Data displays separate data for each space in the default space.html
[00:13:04]                   └- ✖ fail: Spaces app Spaces Spaces Data displays separate data for each space in the default space
[00:13:04]                   │      Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
[00:13:04]                   │ Wait timed out after 10008ms
[00:13:04]                   │     at /dev/shm/workspace/parallel/16/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:13:04]                   │     at runMicrotasks (<anonymous>)
[00:13:04]                   │     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:13:04]                   │       at onFailure (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry_for_success.ts:17:9)
[00:13:04]                   │       at retryForSuccess (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry_for_success.ts:57:13)
[00:13:04]                   │       at RetryService.try (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry.ts:31:12)
[00:13:04]                   │       at ListingTableService.searchForItemWithName (/dev/shm/workspace/parallel/16/kibana/test/functional/services/listing_table.ts:107:5)
[00:13:04]                   │       at expectDashboardRenders (test/functional/apps/spaces/spaces_selection.ts:64:9)
[00:13:04]                   │       at Context.<anonymous> (test/functional/apps/spaces/spaces_selection.ts:103:11)
[00:13:04]                   │       at Object.apply (/dev/shm/workspace/parallel/16/kibana/node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
[00:13:04]                   │ 
[00:13:04]                   │ 

Stack Trace

Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="tableListSearchBox"])
Wait timed out after 10008ms
    at /dev/shm/workspace/parallel/16/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at onFailure (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry_for_success.ts:17:9)
    at retryForSuccess (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry_for_success.ts:57:13)
    at RetryService.try (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry.ts:31:12)
    at ListingTableService.searchForItemWithName (/dev/shm/workspace/parallel/16/kibana/test/functional/services/listing_table.ts:107:5)
    at expectDashboardRenders (test/functional/apps/spaces/spaces_selection.ts:64:9)
    at Context.<anonymous> (test/functional/apps/spaces/spaces_selection.ts:103:11)
    at Object.apply (/dev/shm/workspace/parallel/16/kibana/node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/spaces/spaces_selection·ts.Spaces app Spaces Spaces Data "after all" hook in "Spaces Data"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:08:20]         └-: Spaces app
[00:08:20]           └-> "before all" hook in "Spaces app"
[00:10:22]           └-: Spaces
[00:10:22]             └-> "before all" hook in "Spaces"
[00:10:34]             └-: Spaces Data
[00:10:34]               └-> "before all" hook in "Spaces Data"
[00:10:34]               └-> "before all" hook in "Spaces Data"
[00:10:34]                 │ info [spaces/selector] Loading "mappings.json"
[00:10:34]                 │ info [spaces/selector] Loading "data.json"
[00:10:34]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/qJSSWktIR3SD8GFgiS_Zog] deleting index
[00:10:34]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_pre6.5.0_001/Q2_n_QLSScSl89HciJNIpg] deleting index
[00:10:34]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_task_manager_8.0.0_001/2yqBM7gMReuExA5uYD-MIg] deleting index
[00:10:34]                 │ info [spaces/selector] Deleted existing index ".kibana_8.0.0_001"
[00:10:34]                 │ info [spaces/selector] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:10:34]                 │ info [spaces/selector] Deleted existing index ".kibana_pre6.5.0_001"
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:10:34]                 │ info [spaces/selector] Created index ".kibana"
[00:10:34]                 │ debg [spaces/selector] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:10:34]                 │ info [spaces/selector] Indexed 3 docs into ".kibana"
[00:10:34]                 │ debg Migrating saved objects
[00:10:34]                 │ proc [kibana]   log   [13:09:15.166] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET. took: 5ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.168] [info][savedobjects-service] [.kibana] INIT -> LEGACY_SET_WRITE_BLOCK. took: 9ms.
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_task_manager_8.0.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:10:34]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] adding block write to indices [[.kibana/8T9f7m6bR_KmJMGM4azoGQ]]
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] completed adding block write to indices [.kibana]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.243] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY. took: 77ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.256] [info][savedobjects-service] [.kibana] LEGACY_SET_WRITE_BLOCK -> LEGACY_CREATE_REINDEX_TARGET. took: 88ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.275] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE. took: 32ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.275] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 114ms
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_pre6.5.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:10:34]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [.kibana_pre6.5.0_001]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.325] [info][savedobjects-service] [.kibana] LEGACY_CREATE_REINDEX_TARGET -> LEGACY_REINDEX. took: 69ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.329] [info][savedobjects-service] [.kibana] LEGACY_REINDEX -> LEGACY_REINDEX_WAIT_FOR_TASK. took: 4ms.
[00:10:34]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] 25313 finished with response BulkByScrollResponse[took=18ms,timed_out=false,sliceId=null,updated=0,created=3,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.433] [info][savedobjects-service] [.kibana] LEGACY_REINDEX_WAIT_FOR_TASK -> LEGACY_DELETE. took: 104ms.
[00:10:34]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana/8T9f7m6bR_KmJMGM4azoGQ] deleting index
[00:10:34]                 │ proc [kibana]   log   [13:09:15.468] [info][savedobjects-service] [.kibana] LEGACY_DELETE -> SET_SOURCE_WRITE_BLOCK. took: 35ms.
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] adding block write to indices [[.kibana_pre6.5.0_001/kiNOkPbISOi4SnmbmEG8iA]]
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] completed adding block write to indices [.kibana_pre6.5.0_001]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.506] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CREATE_REINDEX_TEMP. took: 38ms.
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:10:34]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [.kibana_8.0.0_reindex_temp]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.558] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP_OPEN_PIT. took: 52ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.561] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_OPEN_PIT -> REINDEX_SOURCE_TO_TEMP_READ. took: 3ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.566] [info][savedobjects-service] [.kibana] Starting to process 3 documents.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.566] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_INDEX. took: 5ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.567] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1ms.
[00:10:34]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_reindex_temp/T3d05pAXQ3KfP5ww1bHXFA] update_mapping [_doc]
[00:10:34]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_reindex_temp/T3d05pAXQ3KfP5ww1bHXFA] update_mapping [_doc]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.620] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 53ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.624] [info][savedobjects-service] [.kibana] Processed 3 documents out of 3.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.625] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 4ms.
[00:10:34]                 │ proc [kibana]   log   [13:09:15.627] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_CLOSE_PIT -> SET_TEMP_WRITE_BLOCK. took: 3ms.
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] adding block write to indices [[.kibana_8.0.0_reindex_temp/T3d05pAXQ3KfP5ww1bHXFA]]
[00:10:34]                 │ info [o.e.c.m.MetadataIndexStateService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] completed adding block write to indices [.kibana_8.0.0_reindex_temp]
[00:10:34]                 │ proc [kibana]   log   [13:09:15.673] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET. took: 46ms.
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] applying create index request using existing index [.kibana_8.0.0_reindex_temp] metadata
[00:10:34]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:10:34]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [.kibana_8.0.0_001]
[00:10:34]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] create_mapping
[00:10:35]                 │ proc [kibana]   log   [13:09:15.802] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> REFRESH_TARGET. took: 129ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:15.806] [info][savedobjects-service] [.kibana] REFRESH_TARGET -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 4ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:15.809] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 3ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:15.817] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 8ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:15.821] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 4ms.
[00:10:35]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:35]                 │ proc [kibana]   log   [13:09:15.896] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 75ms.
[00:10:35]                 │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] 25401 finished with response BulkByScrollResponse[took=25.9ms,timed_out=false,sliceId=null,updated=3,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:10:35]                 │ proc [kibana]   log   [13:09:16.000] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY. took: 104ms.
[00:10:35]                 │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_reindex_temp/T3d05pAXQ3KfP5ww1bHXFA] deleting index
[00:10:35]                 │ proc [kibana]   log   [13:09:16.063] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE. took: 63ms.
[00:10:35]                 │ proc [kibana]   log   [13:09:16.063] [info][savedobjects-service] [.kibana] Migration completed after 904ms
[00:10:35]                 │ debg [spaces/selector] Migrated Kibana index after loading Kibana data
[00:10:35]                 │ debg [spaces/selector] Ensured that default space exists in .kibana
[00:10:35]                 │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyChartsLibrary":true}
[00:10:36]                 │ debg TestSubjects.exists(loginForm)
[00:10:36]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:10:36]                 │ debg Waiting for Login Form to appear.
[00:10:36]                 │ debg Waiting up to 100000ms for login form...
[00:10:36]                 │ debg TestSubjects.exists(loginForm)
[00:10:36]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:10:37]                 │ debg TestSubjects.setValue(loginUsername, elastic)
[00:10:37]                 │ debg TestSubjects.click(loginUsername)
[00:10:37]                 │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:10:37]                 │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:10:37]                 │ debg TestSubjects.setValue(loginPassword, changeme)
[00:10:37]                 │ debg TestSubjects.click(loginPassword)
[00:10:37]                 │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:10:37]                 │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:10:37]                 │ debg TestSubjects.click(loginSubmit)
[00:10:37]                 │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:10:37]                 │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:10:37]                 │ debg Waiting for login result, expected: spaceSelector.
[00:10:37]                 │ debg TestSubjects.find(kibanaSpaceSelector)
[00:10:37]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaSpaceSelector"]') with timeout=10000
[00:10:37]                 │ proc [kibana]   log   [13:09:18.090] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:10:39]                 │ debg browser[INFO] http://localhost:61161/spaces/space_selector 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:10:39]                 │
[00:10:39]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:39]                 │ debg Finished login process, landed on space selector. currentUrl = http://localhost:61161/spaces/space_selector
[00:10:39]                 │ info SpaceSelectorPage:clickSpaceCard(default)
[00:10:39]                 │ debg TestSubjects.click(space-card-default)
[00:10:39]                 │ debg Find.clickByCssSelector('[data-test-subj="space-card-default"]') with timeout=10000
[00:10:39]                 │ debg Find.findByCssSelector('[data-test-subj="space-card-default"]') with timeout=10000
[00:10:39]                 │ debg ... sleep(1000) start
[00:10:39]                 │ debg browser[INFO] http://localhost:61161/app/home 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:10:39]                 │
[00:10:39]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:40]                 │ debg ... sleep(1000) end
[00:10:40]                 │ debg navigating to home url: http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:40]                 │ debg navigate to: http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:41]                 │ debg browser[INFO] http://localhost:61161/app/home?_t=1622466561620#/tutorial_directory/sampleData 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:10:41]                 │
[00:10:41]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:41]                 │ debg ... sleep(700) start
[00:10:41]                 │ debg ... sleep(700) end
[00:10:41]                 │ debg returned from get, calling refresh
[00:10:42]                 │ERROR browser[SEVERE] http://localhost:61161/43215/bundles/plugin/newsfeed/kibana/newsfeed.plugin.js 0:18527 TypeError: Failed to fetch
[00:10:42]                 │          at fetch_Fetch.fetchResponse (http://localhost:61161/43215/bundles/core/core.entry.js:6:26614)
[00:10:42]                 │          at async http://localhost:61161/43215/bundles/core/core.entry.js:6:24090
[00:10:42]                 │          at async http://localhost:61161/43215/bundles/core/core.entry.js:6:23996
[00:10:42]                 │ debg browser[INFO] http://localhost:61161/app/home?_t=1622466561620#/tutorial_directory/sampleData 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:10:42]                 │
[00:10:42]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:42]                 │ debg currentUrl = http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:42]                 │          appUrl = http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:42]                 │ debg TestSubjects.find(kibanaChrome)
[00:10:42]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:44]                 │ debg ... sleep(501) start
[00:10:44]                 │ debg ... sleep(501) end
[00:10:44]                 │ debg in navigateTo url = http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:10:44]                 │ debg TestSubjects.exists(addSampleDataSetlogs)
[00:10:44]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=2500
[00:10:44]                 │ debg TestSubjects.click(addSampleDataSetlogs)
[00:10:44]                 │ debg Find.clickByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=10000
[00:10:44]                 │ debg Find.findByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=10000
[00:10:44]                 │ debg TestSubjects.find(sampleDataSetCardlogs)
[00:10:44]                 │ debg Find.findByCssSelector('[data-test-subj="sampleDataSetCardlogs"]') with timeout=10000
[00:10:44]                 │ERROR browser[SEVERE] http://localhost:61161/api/fleet/settings - Failed to load resource: the server responded with a status of 404 (Not Found)
[00:10:45]                 │ debg navigating to home url: http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:45]                 │ debg navigate to: http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:46]                 │ debg browser[INFO] http://localhost:61161/s/another-space/app/home?_t=1622466566665#/tutorial_directory/sampleData 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:10:46]                 │
[00:10:46]                 │ debg browser[INFO] http://localhost:61161/s/another-space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:46]                 │ debg ... sleep(700) start
[00:10:47]                 │ debg ... sleep(700) end
[00:10:47]                 │ debg returned from get, calling refresh
[00:10:47]                 │ERROR browser[SEVERE] http://localhost:61161/43215/bundles/plugin/newsfeed/kibana/newsfeed.plugin.js 0:18527 TypeError: Failed to fetch
[00:10:47]                 │          at fetch_Fetch.fetchResponse (http://localhost:61161/43215/bundles/core/core.entry.js:6:26614)
[00:10:47]                 │          at async http://localhost:61161/43215/bundles/core/core.entry.js:6:24090
[00:10:47]                 │          at async http://localhost:61161/43215/bundles/core/core.entry.js:6:23996
[00:10:47]                 │ debg browser[INFO] http://localhost:61161/s/another-space/app/home?_t=1622466566665#/tutorial_directory/sampleData 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:10:47]                 │
[00:10:47]                 │ debg browser[INFO] http://localhost:61161/s/another-space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:10:48]                 │ debg currentUrl = http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:48]                 │          appUrl = http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:48]                 │ debg TestSubjects.find(kibanaChrome)
[00:10:48]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:10:48]                 │ debg ... sleep(501) start
[00:10:48]                 │ debg ... sleep(501) end
[00:10:48]                 │ debg in navigateTo url = http://localhost:61161/s/another-space/app/home#/tutorial_directory/sampleData
[00:10:48]                 │ debg TestSubjects.exists(addSampleDataSetlogs)
[00:10:48]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=2500
[00:10:48]                 │ERROR browser[SEVERE] http://localhost:61161/s/another-space/api/fleet/settings - Failed to load resource: the server responded with a status of 404 (Not Found)
[00:10:49]                 │ debg TestSubjects.click(addSampleDataSetlogs)
[00:10:49]                 │ debg Find.clickByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=10000
[00:10:49]                 │ debg Find.findByCssSelector('[data-test-subj="addSampleDataSetlogs"]') with timeout=10000
[00:10:49]                 │ debg TestSubjects.find(sampleDataSetCardlogs)
[00:10:49]                 │ debg Find.findByCssSelector('[data-test-subj="sampleDataSetCardlogs"]') with timeout=10000
[00:10:49]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [kibana_sample_data_logs] creating index, cause [api], templates [], shards [1]/[1]
[00:10:49]                 │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] updating number_of_replicas to [0] for indices [kibana_sample_data_logs]
[00:10:49]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [kibana_sample_data_logs/yl015xcLQQCjTFyxiKWeZw] update_mapping [_doc]
[00:10:51]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:51]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:52]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:52]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:52]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:10:52]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_8.0.0_001/syJOZgweTimKCLfWxAGuvQ] update_mapping [_doc]
[00:13:04]               └-> "after all" hook in "Spaces Data"
[00:13:04]                 │ debg navigating to home url: http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:13:04]                 │ debg navigate to: http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:13:04]                 │ debg browser[INFO] http://localhost:61161/app/home?_t=1622466705013#/tutorial_directory/sampleData 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:13:04]                 │
[00:13:04]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:13:04]                 │ debg ... sleep(700) start
[00:13:05]                 │ debg ... sleep(700) end
[00:13:05]                 │ debg returned from get, calling refresh
[00:13:05]                 │ debg browser[INFO] http://localhost:61161/app/home?_t=1622466705013#/tutorial_directory/sampleData 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:13:05]                 │
[00:13:05]                 │ debg browser[INFO] http://localhost:61161/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:13:05]                 │ debg currentUrl = http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:13:05]                 │          appUrl = http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:13:05]                 │ debg TestSubjects.find(kibanaChrome)
[00:13:05]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:13:06]                 │ debg ... sleep(501) start
[00:13:07]                 │ debg ... sleep(501) end
[00:13:07]                 │ debg in navigateTo url = http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:13:07]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:13:07]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:13:17]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:13:17]                 │      Wait timed out after 10047ms
[00:13:17]                 │ERROR browser[SEVERE] http://localhost:61161/api/fleet/settings - Failed to load resource: the server responded with a status of 404 (Not Found)
[00:13:17]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:13:17]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:13:27]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:13:27]                 │      Wait timed out after 10035ms
[00:13:28]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:13:28]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:13:38]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:13:38]                 │      Wait timed out after 10052ms
[00:13:38]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:13:38]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:13:48]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:13:48]                 │      Wait timed out after 10042ms
[00:13:49]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:13:49]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:13:59]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:13:59]                 │      Wait timed out after 10005ms
[00:13:59]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:13:59]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:14:09]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:14:09]                 │      Wait timed out after 10024ms
[00:14:10]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:14:10]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:14:20]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:14:20]                 │      Wait timed out after 10011ms
[00:14:20]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:14:20]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:14:30]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:14:30]                 │      Wait timed out after 10027ms
[00:14:31]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:14:31]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:14:41]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:14:41]                 │      Wait timed out after 10035ms
[00:14:41]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:14:41]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:14:48]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-centos-tests-xxl-1622464333609436067] [.kibana_task_manager_8.0.0_001/iMNT0d1xS5eL4dPtwk8xRw] update_mapping [_doc]
[00:14:51]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:14:51]                 │      Wait timed out after 10045ms
[00:14:52]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:14:52]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:15:02]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:15:02]                 │      Wait timed out after 10031ms
[00:15:02]                 │ debg TestSubjects.find(removeSampleDataSetlogs)
[00:15:02]                 │ debg Find.findByCssSelector('[data-test-subj="removeSampleDataSetlogs"]') with timeout=10000
[00:15:12]                 │ debg --- retry.tryForTime error: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:15:12]                 │      Wait timed out after 10053ms
[00:15:13]                 │ info Taking screenshot "/dev/shm/workspace/parallel/16/kibana/x-pack/test/functional/screenshots/failure/Spaces app Spaces Spaces Data _after all_ hook in _Spaces Data_.png"
[00:15:13]                 │ info Current URL is: http://localhost:61161/app/home#/tutorial_directory/sampleData
[00:15:13]                 │ info Saving page source to: /dev/shm/workspace/parallel/16/kibana/x-pack/test/functional/failure_debug/html/Spaces app Spaces Spaces Data _after all_ hook in _Spaces Data_.html
[00:15:13]                 └- ✖ fail: Spaces app Spaces Spaces Data "after all" hook in "Spaces Data"
[00:15:13]                 │      Error: retry.tryForTime timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
[00:15:13]                 │ Wait timed out after 10053ms
[00:15:13]                 │     at /dev/shm/workspace/parallel/16/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:15:13]                 │     at runMicrotasks (<anonymous>)
[00:15:13]                 │     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:15:13]                 │       at onFailure (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry_for_success.ts:17:9)
[00:15:13]                 │       at retryForSuccess (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry_for_success.ts:57:13)
[00:15:13]                 │       at RetryService.tryForTime (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry.ts:22:12)
[00:15:13]                 │       at TestSubjects.waitForEnabled (/dev/shm/workspace/parallel/16/kibana/test/functional/services/common/test_subjects.ts:305:5)
[00:15:13]                 │       at HomePage.removeSampleDataSet (/dev/shm/workspace/parallel/16/kibana/test/functional/page_objects/home_page.ts:52:7)
[00:15:13]                 │       at Context.<anonymous> (test/functional/apps/spaces/spaces_selection.ts:95:9)
[00:15:13]                 │       at Object.apply (/dev/shm/workspace/parallel/16/kibana/node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
[00:15:13]                 │ 
[00:15:13]                 │ 

Stack Trace

Error: retry.tryForTime timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="removeSampleDataSetlogs"])
Wait timed out after 10053ms
    at /dev/shm/workspace/parallel/16/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at onFailure (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry_for_success.ts:17:9)
    at retryForSuccess (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry_for_success.ts:57:13)
    at RetryService.tryForTime (/dev/shm/workspace/parallel/16/kibana/test/common/services/retry/retry.ts:22:12)
    at TestSubjects.waitForEnabled (/dev/shm/workspace/parallel/16/kibana/test/functional/services/common/test_subjects.ts:305:5)
    at HomePage.removeSampleDataSet (/dev/shm/workspace/parallel/16/kibana/test/functional/page_objects/home_page.ts:52:7)
    at Context.<anonymous> (test/functional/apps/spaces/spaces_selection.ts:95:9)
    at Object.apply (/dev/shm/workspace/parallel/16/kibana/node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
bfetch 21 29 +8

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
bfetch 58 62 +4

Page load bundle

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

id before after diff
bfetch 11.1KB 46.9KB +35.8KB
kbnUiSharedDeps-elastic 3.3MB 3.3MB +1.0B
kbnUiSharedDeps-js 6.8MB 6.8MB +29.5KB
total +65.2KB
Unknown metric groups

API count

id before after diff
bfetch 69 73 +4

References to deprecated APIs

id before after diff
canvas 29 25 -4
crossClusterReplication 8 6 -2
fleet 22 20 -2
globalSearch 4 2 -2
indexManagement 12 7 -5
infra 261 149 -112
lens 67 45 -22
licensing 18 15 -3
lists 239 236 -3
maps 286 208 -78
ml 121 115 -6
monitoring 109 56 -53
securitySolution 390 346 -44
stackAlerts 101 95 -6
total -342

History

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

cc @lizozom


// Send the payload to the server
xhr.send(body);
const stream = fromStreamingXhr(xhr, signal);
Copy link
Contributor

Choose a reason for hiding this comment

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

converting XMLHttpRequest --> Stream --> Observable overcomplecates the code. Let's merge the current PR and consider switching to DecompressionStream after bfetch migration from XMLHttpRequest to fetch API.

Copy link
Contributor Author

@lizozom lizozom Jun 1, 2021

Choose a reason for hiding this comment

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

Thanks for approving. I will go ahead and merge. 👍🏻
Any progress with DecompressionStream?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I gave it a try, but as converting imperative XMLHttpRequest to Stream, with the following transformation to Observable it's PITA. That's why I suggested switching to DecompressionStream after migrating to fetch with built-in support of Streaming API.

@lizozom lizozom added the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 1, 2021
@lizozom lizozom merged commit 842bb69 into elastic:master Jun 1, 2021
@kibanamachine
Copy link
Contributor

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

To backport manually run:
node scripts/backport --pr 97994

lizozom added a commit to lizozom/kibana that referenced this pull request Jun 1, 2021
* Move inspector adapter integration into search source

* docs and ts

* Move other bucket to search source

* test ts + delete unused tabilfy function

* hierarchical param in aggconfig.
ts improvements
more inspector tests

* fix jest

* separate inspect
more tests

* jest

* inspector

* Error handling and more tests

* put the fun in functional tests

* delete client side legacy msearch code

* ts

* override to sync search in search source

* delete more legacy code

* ts

* delete moarrrr

* deflate bfetch chunks

* update tests
use only zlib

* ts

* extract getInflatedResponse

* tests

* Use fflate in attempt to reduce package size

* use node streams, fflate and hex encoding.

* DISABLE_SEARCH_COMPRESSION UI Settings
Use base64 and async compression

* i18n

* Code review
Use custom header for compression
Promisify once

* use custom headers

* Update jest

* fix tests

* code review, baby!

* integration

* tests

* limit

* limit

* limit

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	packages/kbn-optimizer/limits.yml
@101arrowz
Copy link

101arrowz commented Jun 1, 2021

Author of fflate here. It's a good idea to tree-shake out the unused bits of fflate, which will bring the addition to bundle size down from 30kB added to 3.5kB added, since you're only using unzlibSync. Here are some minified files for example (though if possible build tools should do this instead):

3.5kB CommonJS build of unzlibSync
"use strict";var r=Uint8Array,n=Uint16Array,a=Uint32Array,e=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),t=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),i=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(r,e){for(var t=new n(31),i=0;i<31;++i)t[i]=e+=1<<r[i-1];var f=new a(t[30]);for(i=1;i<30;++i)for(var o=t[i];o<t[i+1];++o)f[o]=o-t[i]<<5|i;return[t,f]},o=f(e,2),v=o[0],u=o[1];v[28]=258,u[258]=28;for(var l=f(t,0),c=l[0],s=(l[1],new n(32768)),w=0;w<32768;++w){var b=(43690&w)>>>1|(21845&w)<<1;b=(61680&(b=(52428&b)>>>2|(13107&b)<<2))>>>4|(3855&b)<<4,s[w]=((65280&b)>>>8|(255&b)<<8)>>>1}var d=function(r,a,e){for(var t=r.length,i=0,f=new n(a);i<t;++i)++f[r[i]-1];var o,v=new n(a);for(i=0;i<a;++i)v[i]=v[i-1]+f[i-1]<<1;if(e){o=new n(1<<a);var u=15-a;for(i=0;i<t;++i)if(r[i])for(var l=i<<4|r[i],c=a-r[i],w=v[r[i]-1]++<<c,b=w|(1<<c)-1;w<=b;++w)o[s[w]>>>u]=l}else for(o=new n(t),i=0;i<t;++i)r[i]&&(o[i]=s[v[r[i]-1]++]>>>15-r[i]);return o},h=new r(288);for(w=0;w<144;++w)h[w]=8;for(w=144;w<256;++w)h[w]=9;for(w=256;w<280;++w)h[w]=7;for(w=280;w<288;++w)h[w]=8;var p=new r(32);for(w=0;w<32;++w)p[w]=5;var y=d(h,9,1),g=d(p,5,1),k=function(r){for(var n=r[0],a=1;a<r.length;++a)r[a]>n&&(n=r[a]);return n},E=function(r,n,a){var e=n/8|0;return(r[e]|r[e+1]<<8)>>(7&n)&a},m=function(r,n){var a=n/8|0;return(r[a]|r[a+1]<<8|r[a+2]<<16)>>(7&n)},x=function(r){return(r/8|0)+(7&r&&1)},z=function(e,t,i){(null==t||t<0)&&(t=0),(null==i||i>e.length)&&(i=e.length);var f=new(e instanceof n?n:e instanceof a?a:r)(i-t);return f.set(e.subarray(t,i)),f},A=["unexpected EOF","invalid block type","invalid length/literal","invalid distance"],S=function(r,n,a){var e=new Error(n||A[r]);if(e.code=r,Error.captureStackTrace&&Error.captureStackTrace(e,S),!a)throw e;return e},U=function(n,a,f){var o=n.length;if(!o||f&&!f.l&&o<5)return a||new r(0);var u=!a||f,l=!f||f.i;f||(f={}),a||(a=new r(3*o));var s=function(n){var e=a.length;if(n>e){var t=new r(Math.max(2*e,n));t.set(a),a=t}},w=f.f||0,b=f.p||0,h=f.b||0,p=f.l,A=f.d,U=f.m,T=f.n,F=8*o;do{if(!p){f.f=w=E(n,b,1);var M=E(n,b+1,3);if(b+=3,!M){var O=n[(L=x(b)+4)-4]|n[L-3]<<8,j=L+O;if(j>o){l&&S(0);break}u&&s(h+O),a.set(n.subarray(L,j),h),f.b=h+=O,f.p=b=8*j;continue}if(1==M)p=y,A=g,U=9,T=5;else if(2==M){var q=E(n,b,31)+257,B=E(n,b+10,15)+4,C=q+E(n,b+5,31)+1;b+=14;for(var D=new r(C),G=new r(19),H=0;H<B;++H)G[i[H]]=E(n,b+3*H,7);b+=3*B;var I=k(G),J=(1<<I)-1,K=d(G,I,1);for(H=0;H<C;){var L,N=K[E(n,b,J)];if(b+=15&N,(L=N>>>4)<16)D[H++]=L;else{var P=0,Q=0;for(16==L?(Q=3+E(n,b,3),b+=2,P=D[H-1]):17==L?(Q=3+E(n,b,7),b+=3):18==L&&(Q=11+E(n,b,127),b+=7);Q--;)D[H++]=P}}var R=D.subarray(0,q),V=D.subarray(q);U=k(R),T=k(V),p=d(R,U,1),A=d(V,T,1)}else S(1);if(b>F){l&&S(0);break}}u&&s(h+131072);for(var W=(1<<U)-1,X=(1<<T)-1,Y=b;;Y=b){var Z=(P=p[m(n,b)&W])>>>4;if((b+=15&P)>F){l&&S(0);break}if(P||S(2),Z<256)a[h++]=Z;else{if(256==Z){Y=b,p=null;break}var $=Z-254;if(Z>264){var _=e[H=Z-257];$=E(n,b,(1<<_)-1)+v[H],b+=_}var rr=A[m(n,b)&X],nr=rr>>>4;rr||S(3),b+=15&rr;V=c[nr];if(nr>3){_=t[nr];V+=m(n,b)&(1<<_)-1,b+=_}if(b>F){l&&S(0);break}u&&s(h+131072);for(var ar=h+$;h<ar;h+=4)a[h]=a[h-V],a[h+1]=a[h+1-V],a[h+2]=a[h+2-V],a[h+3]=a[h+3-V];h=ar}}f.l=p,f.p=Y,f.b=h,p&&(w=1,f.m=U,f.d=A,f.n=T)}while(!w);return h==a.length?a:z(a,0,h)},T=function(r){(8!=(15&r[0])||r[0]>>>4>7||(r[0]<<8|r[1])%31)&&S(6,"invalid zlib data"),32&r[1]&&S(6,"invalid zlib data: preset dictionaries not supported")};function F(r,n){return U((T(r),r.subarray(2,-4)),n)}exports.unzlibSync=F
3.2kB ESM build of unzlibSync
"use strict";var r=Uint8Array,n=Uint16Array,a=Uint32Array,e=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),t=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),i=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(r,e){for(var t=new n(31),i=0;i<31;++i)t[i]=e+=1<<r[i-1];var f=new a(t[30]);for(i=1;i<30;++i)for(var o=t[i];o<t[i+1];++o)f[o]=o-t[i]<<5|i;return[t,f]},o=f(e,2),v=o[0],u=o[1];v[28]=258,u[258]=28;for(var l=f(t,0),c=l[0],s=(l[1],new n(32768)),w=0;w<32768;++w){var b=(43690&w)>>>1|(21845&w)<<1;b=(61680&(b=(52428&b)>>>2|(13107&b)<<2))>>>4|(3855&b)<<4,s[w]=((65280&b)>>>8|(255&b)<<8)>>>1}var d=function(r,a,e){for(var t=r.length,i=0,f=new n(a);i<t;++i)++f[r[i]-1];var o,v=new n(a);for(i=0;i<a;++i)v[i]=v[i-1]+f[i-1]<<1;if(e){o=new n(1<<a);var u=15-a;for(i=0;i<t;++i)if(r[i])for(var l=i<<4|r[i],c=a-r[i],w=v[r[i]-1]++<<c,b=w|(1<<c)-1;w<=b;++w)o[s[w]>>>u]=l}else for(o=new n(t),i=0;i<t;++i)r[i]&&(o[i]=s[v[r[i]-1]++]>>>15-r[i]);return o},h=new r(288);for(w=0;w<144;++w)h[w]=8;for(w=144;w<256;++w)h[w]=9;for(w=256;w<280;++w)h[w]=7;for(w=280;w<288;++w)h[w]=8;var p=new r(32);for(w=0;w<32;++w)p[w]=5;var y=d(h,9,1),g=d(p,5,1),k=function(r){for(var n=r[0],a=1;a<r.length;++a)r[a]>n&&(n=r[a]);return n},E=function(r,n,a){var e=n/8|0;return(r[e]|r[e+1]<<8)>>(7&n)&a},m=function(r,n){var a=n/8|0;return(r[a]|r[a+1]<<8|r[a+2]<<16)>>(7&n)},x=function(r){return(r/8|0)+(7&r&&1)},z=function(e,t,i){(null==t||t<0)&&(t=0),(null==i||i>e.length)&&(i=e.length);var f=new(e instanceof n?n:e instanceof a?a:r)(i-t);return f.set(e.subarray(t,i)),f},A=["unexpected EOF","invalid block type","invalid length/literal","invalid distance"],S=function(r,n,a){var e=new Error(n||A[r]);if(e.code=r,Error.captureStackTrace&&Error.captureStackTrace(e,S),!a)throw e;return e},U=function(n,a,f){var o=n.length;if(!o||f&&!f.l&&o<5)return a||new r(0);var u=!a||f,l=!f||f.i;f||(f={}),a||(a=new r(3*o));var s=function(n){var e=a.length;if(n>e){var t=new r(Math.max(2*e,n));t.set(a),a=t}},w=f.f||0,b=f.p||0,h=f.b||0,p=f.l,A=f.d,U=f.m,T=f.n,F=8*o;do{if(!p){f.f=w=E(n,b,1);var M=E(n,b+1,3);if(b+=3,!M){var O=n[(L=x(b)+4)-4]|n[L-3]<<8,j=L+O;if(j>o){l&&S(0);break}u&&s(h+O),a.set(n.subarray(L,j),h),f.b=h+=O,f.p=b=8*j;continue}if(1==M)p=y,A=g,U=9,T=5;else if(2==M){var q=E(n,b,31)+257,B=E(n,b+10,15)+4,C=q+E(n,b+5,31)+1;b+=14;for(var D=new r(C),G=new r(19),H=0;H<B;++H)G[i[H]]=E(n,b+3*H,7);b+=3*B;var I=k(G),J=(1<<I)-1,K=d(G,I,1);for(H=0;H<C;){var L,N=K[E(n,b,J)];if(b+=15&N,(L=N>>>4)<16)D[H++]=L;else{var P=0,Q=0;for(16==L?(Q=3+E(n,b,3),b+=2,P=D[H-1]):17==L?(Q=3+E(n,b,7),b+=3):18==L&&(Q=11+E(n,b,127),b+=7);Q--;)D[H++]=P}}var R=D.subarray(0,q),V=D.subarray(q);U=k(R),T=k(V),p=d(R,U,1),A=d(V,T,1)}else S(1);if(b>F){l&&S(0);break}}u&&s(h+131072);for(var W=(1<<U)-1,X=(1<<T)-1,Y=b;;Y=b){var Z=(P=p[m(n,b)&W])>>>4;if((b+=15&P)>F){l&&S(0);break}if(P||S(2),Z<256)a[h++]=Z;else{if(256==Z){Y=b,p=null;break}var $=Z-254;if(Z>264){var _=e[H=Z-257];$=E(n,b,(1<<_)-1)+v[H],b+=_}var rr=A[m(n,b)&X],nr=rr>>>4;rr||S(3),b+=15&rr;V=c[nr];if(nr>3){_=t[nr];V+=m(n,b)&(1<<_)-1,b+=_}if(b>F){l&&S(0);break}u&&s(h+131072);for(var ar=h+$;h<ar;h+=4)a[h]=a[h-V],a[h+1]=a[h+1-V],a[h+2]=a[h+2-V],a[h+3]=a[h+3-V];h=ar}}f.l=p,f.p=Y,f.b=h,p&&(w=1,f.m=U,f.d=A,f.n=T)}while(!w);return h==a.length?a:z(a,0,h)},T=function(r){(8!=(15&r[0])||r[0]>>>4>7||(r[0]<<8|r[1])%31)&&S(6,"invalid zlib data"),32&r[1]&&S(6,"invalid zlib data: preset dictionaries not supported")};function F(r,n){return U((T(r),r.subarray(2,-4)),n)};export{F as unzlibSync}

Note that strFromU8 is basically a wrapper for TextEncoder if it is supported, or JS-based text encoding if it isn't. If you need both unzlibSync and strFromU8:

3.9kB CommonJS build of unzlibSync and strFromU8
"use strict";var r=Uint8Array,n=Uint16Array,e=Uint32Array,a=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),t=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(r,a){for(var t=new n(31),o=0;o<31;++o)t[o]=a+=1<<r[o-1];var f=new e(t[30]);for(o=1;o<30;++o)for(var i=t[o];i<t[o+1];++i)f[i]=i-t[o]<<5|o;return[t,f]},i=f(a,2),u=i[0],v=i[1];u[28]=258,v[258]=28;for(var l=f(t,0),c=l[0],d=(l[1],new n(32768)),s=0;s<32768;++s){var w=(43690&s)>>>1|(21845&s)<<1;w=(61680&(w=(52428&w)>>>2|(13107&w)<<2))>>>4|(3855&w)<<4,d[s]=((65280&w)>>>8|(255&w)<<8)>>>1}var h=function(r,e,a){for(var t=r.length,o=0,f=new n(e);o<t;++o)++f[r[o]-1];var i,u=new n(e);for(o=0;o<e;++o)u[o]=u[o-1]+f[o-1]<<1;if(a){i=new n(1<<e);var v=15-e;for(o=0;o<t;++o)if(r[o])for(var l=o<<4|r[o],c=e-r[o],s=u[r[o]-1]++<<c,w=s|(1<<c)-1;s<=w;++s)i[d[s]>>>v]=l}else for(i=new n(t),o=0;o<t;++o)r[o]&&(i[o]=d[u[r[o]-1]++]>>>15-r[o]);return i},b=new r(288);for(s=0;s<144;++s)b[s]=8;for(s=144;s<256;++s)b[s]=9;for(s=256;s<280;++s)b[s]=7;for(s=280;s<288;++s)b[s]=8;var g=new r(32);for(s=0;s<32;++s)g[s]=5;var p=h(b,9,1),y=h(g,5,1),C=function(r){for(var n=r[0],e=1;e<r.length;++e)r[e]>n&&(n=r[e]);return n},m=function(r,n,e){var a=n/8|0;return(r[a]|r[a+1]<<8)>>(7&n)&e},k=function(r,n){var e=n/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(7&n)},S=function(r){return(r/8|0)+(7&r&&1)},x=function(a,t,o){(null==t||t<0)&&(t=0),(null==o||o>a.length)&&(o=a.length);var f=new(a instanceof n?n:a instanceof e?e:r)(o-t);return f.set(a.subarray(t,o)),f},E=["unexpected EOF","invalid block type","invalid length/literal","invalid distance"],T=function(r,n,e){var a=new Error(n||E[r]);if(a.code=r,Error.captureStackTrace&&Error.captureStackTrace(a,T),!e)throw a;return a},U=function(n,e,f){var i=n.length;if(!i||f&&!f.l&&i<5)return e||new r(0);var v=!e||f,l=!f||f.i;f||(f={}),e||(e=new r(3*i));var d=function(n){var a=e.length;if(n>a){var t=new r(Math.max(2*a,n));t.set(e),e=t}},s=f.f||0,w=f.p||0,b=f.b||0,g=f.l,E=f.d,U=f.m,z=f.n,A=8*i;do{if(!g){f.f=s=m(n,w,1);var F=m(n,w+1,3);if(w+=3,!F){var M=n[(L=S(w)+4)-4]|n[L-3]<<8,O=L+M;if(O>i){l&&T(0);break}v&&d(b+M),e.set(n.subarray(L,O),b),f.b=b+=M,f.p=w=8*O;continue}if(1==F)g=p,E=y,U=9,z=5;else if(2==F){var j=m(n,w,31)+257,q=m(n,w+10,15)+4,B=j+m(n,w+5,31)+1;w+=14;for(var D=new r(B),G=new r(19),H=0;H<q;++H)G[o[H]]=m(n,w+3*H,7);w+=3*q;var I=C(G),J=(1<<I)-1,K=h(G,I,1);for(H=0;H<B;){var L,N=K[m(n,w,J)];if(w+=15&N,(L=N>>>4)<16)D[H++]=L;else{var P=0,Q=0;for(16==L?(Q=3+m(n,w,3),w+=2,P=D[H-1]):17==L?(Q=3+m(n,w,7),w+=3):18==L&&(Q=11+m(n,w,127),w+=7);Q--;)D[H++]=P}}var R=D.subarray(0,j),V=D.subarray(j);U=C(R),z=C(V),g=h(R,U,1),E=h(V,z,1)}else T(1);if(w>A){l&&T(0);break}}v&&d(b+131072);for(var W=(1<<U)-1,X=(1<<z)-1,Y=w;;Y=w){var Z=(P=g[k(n,w)&W])>>>4;if((w+=15&P)>A){l&&T(0);break}if(P||T(2),Z<256)e[b++]=Z;else{if(256==Z){Y=w,g=null;break}var $=Z-254;if(Z>264){var _=a[H=Z-257];$=m(n,w,(1<<_)-1)+u[H],w+=_}var rr=E[k(n,w)&X],nr=rr>>>4;rr||T(3),w+=15&rr;V=c[nr];if(nr>3){_=t[nr];V+=k(n,w)&(1<<_)-1,w+=_}if(w>A){l&&T(0);break}v&&d(b+131072);for(var er=b+$;b<er;b+=4)e[b]=e[b-V],e[b+1]=e[b+1-V],e[b+2]=e[b+2-V],e[b+3]=e[b+3-V];b=er}}f.l=g,f.p=Y,f.b=b,g&&(s=1,f.m=U,f.d=E,f.n=z)}while(!s);return b==e.length?e:x(e,0,b)},z=function(r){(8!=(15&r[0])||r[0]>>>4>7||(r[0]<<8|r[1])%31)&&T(6,"invalid zlib data"),32&r[1]&&T(6,"invalid zlib data: preset dictionaries not supported")};function A(r,n){return U((z(r),r.subarray(2,-4)),n)}var F=function(r){for(var n="",e=0;;){var a=r[e++],t=(a>127)+(a>223)+(a>239);if(e+t>r.length)return[n,x(r,e-1)];t?3==t?(a=((15&a)<<18|(63&r[e++])<<12|(63&r[e++])<<6|63&r[e++])-65536,n+=String.fromCharCode(55296|a>>10,56320|1023&a)):n+=1&t?String.fromCharCode((31&a)<<6|63&r[e++]):String.fromCharCode((15&a)<<12|(63&r[e++])<<6|63&r[e++]):n+=String.fromCharCode(a)}};var M=null!=typeof TextEncoder&&new TextEncoder;function O(r,n){if(n){for(var e="",a=0;a<r.length;a+=16384)e+=String.fromCharCode.apply(null,r.subarray(a,a+16384));return e}if(M)return M.decode(r);var t=F(r),o=t[0];return t[1].length&&T(8),o}exports.strFromU8=O;exports.unzlibSync=A
3.9kB ESM build of unzlibSync and strFromU8
"use strict";var r=Uint8Array,n=Uint16Array,e=Uint32Array,a=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),t=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),o=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f=function(r,a){for(var t=new n(31),o=0;o<31;++o)t[o]=a+=1<<r[o-1];var f=new e(t[30]);for(o=1;o<30;++o)for(var i=t[o];i<t[o+1];++i)f[i]=i-t[o]<<5|o;return[t,f]},i=f(a,2),u=i[0],v=i[1];u[28]=258,v[258]=28;for(var l=f(t,0),c=l[0],d=(l[1],new n(32768)),s=0;s<32768;++s){var w=(43690&s)>>>1|(21845&s)<<1;w=(61680&(w=(52428&w)>>>2|(13107&w)<<2))>>>4|(3855&w)<<4,d[s]=((65280&w)>>>8|(255&w)<<8)>>>1}var h=function(r,e,a){for(var t=r.length,o=0,f=new n(e);o<t;++o)++f[r[o]-1];var i,u=new n(e);for(o=0;o<e;++o)u[o]=u[o-1]+f[o-1]<<1;if(a){i=new n(1<<e);var v=15-e;for(o=0;o<t;++o)if(r[o])for(var l=o<<4|r[o],c=e-r[o],s=u[r[o]-1]++<<c,w=s|(1<<c)-1;s<=w;++s)i[d[s]>>>v]=l}else for(i=new n(t),o=0;o<t;++o)r[o]&&(i[o]=d[u[r[o]-1]++]>>>15-r[o]);return i},b=new r(288);for(s=0;s<144;++s)b[s]=8;for(s=144;s<256;++s)b[s]=9;for(s=256;s<280;++s)b[s]=7;for(s=280;s<288;++s)b[s]=8;var g=new r(32);for(s=0;s<32;++s)g[s]=5;var p=h(b,9,1),y=h(g,5,1),C=function(r){for(var n=r[0],e=1;e<r.length;++e)r[e]>n&&(n=r[e]);return n},m=function(r,n,e){var a=n/8|0;return(r[a]|r[a+1]<<8)>>(7&n)&e},k=function(r,n){var e=n/8|0;return(r[e]|r[e+1]<<8|r[e+2]<<16)>>(7&n)},S=function(r){return(r/8|0)+(7&r&&1)},x=function(a,t,o){(null==t||t<0)&&(t=0),(null==o||o>a.length)&&(o=a.length);var f=new(a instanceof n?n:a instanceof e?e:r)(o-t);return f.set(a.subarray(t,o)),f},E=["unexpected EOF","invalid block type","invalid length/literal","invalid distance"],T=function(r,n,e){var a=new Error(n||E[r]);if(a.code=r,Error.captureStackTrace&&Error.captureStackTrace(a,T),!e)throw a;return a},U=function(n,e,f){var i=n.length;if(!i||f&&!f.l&&i<5)return e||new r(0);var v=!e||f,l=!f||f.i;f||(f={}),e||(e=new r(3*i));var d=function(n){var a=e.length;if(n>a){var t=new r(Math.max(2*a,n));t.set(e),e=t}},s=f.f||0,w=f.p||0,b=f.b||0,g=f.l,E=f.d,U=f.m,z=f.n,A=8*i;do{if(!g){f.f=s=m(n,w,1);var F=m(n,w+1,3);if(w+=3,!F){var M=n[(L=S(w)+4)-4]|n[L-3]<<8,O=L+M;if(O>i){l&&T(0);break}v&&d(b+M),e.set(n.subarray(L,O),b),f.b=b+=M,f.p=w=8*O;continue}if(1==F)g=p,E=y,U=9,z=5;else if(2==F){var j=m(n,w,31)+257,q=m(n,w+10,15)+4,B=j+m(n,w+5,31)+1;w+=14;for(var D=new r(B),G=new r(19),H=0;H<q;++H)G[o[H]]=m(n,w+3*H,7);w+=3*q;var I=C(G),J=(1<<I)-1,K=h(G,I,1);for(H=0;H<B;){var L,N=K[m(n,w,J)];if(w+=15&N,(L=N>>>4)<16)D[H++]=L;else{var P=0,Q=0;for(16==L?(Q=3+m(n,w,3),w+=2,P=D[H-1]):17==L?(Q=3+m(n,w,7),w+=3):18==L&&(Q=11+m(n,w,127),w+=7);Q--;)D[H++]=P}}var R=D.subarray(0,j),V=D.subarray(j);U=C(R),z=C(V),g=h(R,U,1),E=h(V,z,1)}else T(1);if(w>A){l&&T(0);break}}v&&d(b+131072);for(var W=(1<<U)-1,X=(1<<z)-1,Y=w;;Y=w){var Z=(P=g[k(n,w)&W])>>>4;if((w+=15&P)>A){l&&T(0);break}if(P||T(2),Z<256)e[b++]=Z;else{if(256==Z){Y=w,g=null;break}var $=Z-254;if(Z>264){var _=a[H=Z-257];$=m(n,w,(1<<_)-1)+u[H],w+=_}var rr=E[k(n,w)&X],nr=rr>>>4;rr||T(3),w+=15&rr;V=c[nr];if(nr>3){_=t[nr];V+=k(n,w)&(1<<_)-1,w+=_}if(w>A){l&&T(0);break}v&&d(b+131072);for(var er=b+$;b<er;b+=4)e[b]=e[b-V],e[b+1]=e[b+1-V],e[b+2]=e[b+2-V],e[b+3]=e[b+3-V];b=er}}f.l=g,f.p=Y,f.b=b,g&&(s=1,f.m=U,f.d=E,f.n=z)}while(!s);return b==e.length?e:x(e,0,b)},z=function(r){(8!=(15&r[0])||r[0]>>>4>7||(r[0]<<8|r[1])%31)&&T(6,"invalid zlib data"),32&r[1]&&T(6,"invalid zlib data: preset dictionaries not supported")};function A(r,n){return U((z(r),r.subarray(2,-4)),n)}var F=function(r){for(var n="",e=0;;){var a=r[e++],t=(a>127)+(a>223)+(a>239);if(e+t>r.length)return[n,x(r,e-1)];t?3==t?(a=((15&a)<<18|(63&r[e++])<<12|(63&r[e++])<<6|63&r[e++])-65536,n+=String.fromCharCode(55296|a>>10,56320|1023&a)):n+=1&t?String.fromCharCode((31&a)<<6|63&r[e++]):String.fromCharCode((15&a)<<12|(63&r[e++])<<6|63&r[e++]):n+=String.fromCharCode(a)}};var M=null!=typeof TextEncoder&&new TextEncoder;function O(r,n){if(n){for(var e="",a=0;a<r.length;a+=16384)e+=String.fromCharCode.apply(null,r.subarray(a,a+16384));return e}if(M)return M.decode(r);var t=F(r),o=t[0];return t[1].length&&T(8),o};export{O as strFromU8,A as unzlibSync}

BTW, the reason tree shaking isn't working ATM is the require statement imports all of fflate, but you need an ES6 import statement to just import what is necessary.

// In the shared deps file
import { unzlibSync, strFromU8 } from 'fflate';
export const Fflate = { unzlibSync, strFromU8 };

I've found DecompressionStream is faster for 20MB+ inputs, but otherwise fflate actually tends to be equal or faster. If it matters DecompressionStream requires modern browsers while fflate is ES3 for unzlibSync.

lizozom added a commit that referenced this pull request Jun 1, 2021
* Move inspector adapter integration into search source

* docs and ts

* Move other bucket to search source

* test ts + delete unused tabilfy function

* hierarchical param in aggconfig.
ts improvements
more inspector tests

* fix jest

* separate inspect
more tests

* jest

* inspector

* Error handling and more tests

* put the fun in functional tests

* delete client side legacy msearch code

* ts

* override to sync search in search source

* delete more legacy code

* ts

* delete moarrrr

* deflate bfetch chunks

* update tests
use only zlib

* ts

* extract getInflatedResponse

* tests

* Use fflate in attempt to reduce package size

* use node streams, fflate and hex encoding.

* DISABLE_SEARCH_COMPRESSION UI Settings
Use base64 and async compression

* i18n

* Code review
Use custom header for compression
Promisify once

* use custom headers

* Update jest

* fix tests

* code review, baby!

* integration

* tests

* limit

* limit

* limit

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	packages/kbn-optimizer/limits.yml
@lizozom lizozom mentioned this pull request Jun 2, 2021
9 tasks
lizozom added a commit to lizozom/kibana that referenced this pull request Jun 30, 2021
* Move inspector adapter integration into search source

* docs and ts

* Move other bucket to search source

* test ts + delete unused tabilfy function

* hierarchical param in aggconfig.
ts improvements
more inspector tests

* fix jest

* separate inspect
more tests

* jest

* inspector

* Error handling and more tests

* put the fun in functional tests

* delete client side legacy msearch code

* ts

* override to sync search in search source

* delete more legacy code

* ts

* delete moarrrr

* deflate bfetch chunks

* update tests
use only zlib

* ts

* extract getInflatedResponse

* tests

* Use fflate in attempt to reduce package size

* use node streams, fflate and hex encoding.

* DISABLE_SEARCH_COMPRESSION UI Settings
Use base64 and async compression

* i18n

* Code review
Use custom header for compression
Promisify once

* use custom headers

* Update jest

* fix tests

* code review, baby!

* integration

* tests

* limit

* limit

* limit

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	packages/kbn-optimizer/limits.yml
#	test/api_integration/apis/search/bsearch.ts
lizozom added a commit that referenced this pull request Jun 30, 2021
* Move inspector adapter integration into search source

* docs and ts

* Move other bucket to search source

* test ts + delete unused tabilfy function

* hierarchical param in aggconfig.
ts improvements
more inspector tests

* fix jest

* separate inspect
more tests

* jest

* inspector

* Error handling and more tests

* put the fun in functional tests

* delete client side legacy msearch code

* ts

* override to sync search in search source

* delete more legacy code

* ts

* delete moarrrr

* deflate bfetch chunks

* update tests
use only zlib

* ts

* extract getInflatedResponse

* tests

* Use fflate in attempt to reduce package size

* use node streams, fflate and hex encoding.

* DISABLE_SEARCH_COMPRESSION UI Settings
Use base64 and async compression

* i18n

* Code review
Use custom header for compression
Promisify once

* use custom headers

* Update jest

* fix tests

* code review, baby!

* integration

* tests

* limit

* limit

* limit

Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	packages/kbn-optimizer/limits.yml
#	test/api_integration/apis/search/bsearch.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) release_note:fix v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kibana not compressing some HTTP responses