Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] [Workplace Search] Fix loading state bug and update button (#115068) #115094

Merged
merged 1 commit into from
Oct 14, 2021

Conversation

kibanamachine
Copy link
Contributor

Backports the following commits to 7.x:

…15068)

* Change source deletion to set entire page loading

Do this instead of having the button loading

* Replace text button with icon button for blocked windows
@kibanamachine
Copy link
Contributor Author

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/spaces/feature_controls/spaces_security·ts.Spaces app security feature controls Non default space and role specific privilege "before all" hook for "shows management navlink"

Link to Jenkins

Standard Out

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

[00:00:00]     │
[00:07:45]       └-: Spaces app
[00:07:45]         └-> "before all" hook in "Spaces app"
[00:08:47]         └-: security feature controls
[00:08:47]           └-> "before all" hook in "security feature controls"
[00:08:47]           └-> "before all" hook in "security feature controls"
[00:08:47]             │ info [x-pack/test/functional/es_archives/empty_kibana] Loading "mappings.json"
[00:08:47]             │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_task_manager_7.16.0_001/TodmIAb7S-qimrmxixY5-w] deleting index
[00:08:47]             │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_1/bJRj3NZoRQC-26CoBMwUJw] deleting index
[00:08:47]             │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_7.16.0_001/LZodWUfSRP6VgkeeaScUzA] deleting index
[00:08:47]             │ info [x-pack/test/functional/es_archives/empty_kibana] Deleted existing index ".kibana_task_manager_7.16.0_001"
[00:08:47]             │ info [x-pack/test/functional/es_archives/empty_kibana] Deleted existing index ".kibana_7.16.0_001"
[00:08:47]             │ info [x-pack/test/functional/es_archives/empty_kibana] Deleted existing index ".kibana_1"
[00:08:47]             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:08:47]             │ info [x-pack/test/functional/es_archives/empty_kibana] Created index ".kibana_1"
[00:08:47]             │ debg [x-pack/test/functional/es_archives/empty_kibana] ".kibana_1" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:08:47]             │ debg Migrating saved objects
[00:08:47]             │ proc [kibana]   log   [20:44:38.171] [info][savedobjects-service] [.kibana] INIT -> WAIT_FOR_YELLOW_SOURCE. took: 4ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.173] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET. took: 4ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.174] [info][savedobjects-service] [.kibana] WAIT_FOR_YELLOW_SOURCE -> CHECK_UNKNOWN_DOCUMENTS. took: 3ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.178] [info][savedobjects-service] [.kibana] CHECK_UNKNOWN_DOCUMENTS -> SET_SOURCE_WRITE_BLOCK. took: 4ms.
[00:08:47]             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_task_manager_7.16.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:08:47]             │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.kibana_task_manager_7.16.0_001]
[00:08:47]             │ info [o.e.c.m.MetadataIndexStateService] [node-01] adding block write to indices [[.kibana_1/Z_Gpet1YTdakhDYglInePQ]]
[00:08:47]             │ info [o.e.c.m.MetadataIndexStateService] [node-01] completed adding block write to indices [.kibana_1]
[00:08:47]             │ proc [kibana]   log   [20:44:38.270] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY. took: 97ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.287] [info][savedobjects-service] [.kibana] SET_SOURCE_WRITE_BLOCK -> CALCULATE_EXCLUDE_FILTERS. took: 109ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.291] [info][savedobjects-service] [.kibana] CALCULATE_EXCLUDE_FILTERS -> CREATE_REINDEX_TEMP. took: 4ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.315] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE. took: 45ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.316] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 147ms
[00:08:47]             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_7.16.0_reindex_temp] creating index, cause [api], templates [], shards [1]/[1]
[00:08:47]             │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.kibana_7.16.0_reindex_temp]
[00:08:47]             │ proc [kibana]   log   [20:44:38.376] [info][savedobjects-service] [.kibana] CREATE_REINDEX_TEMP -> REINDEX_SOURCE_TO_TEMP_OPEN_PIT. took: 85ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.379] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_OPEN_PIT -> REINDEX_SOURCE_TO_TEMP_READ. took: 3ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.383] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 4ms.
[00:08:47]             │ proc [kibana]   log   [20:44:38.385] [info][savedobjects-service] [.kibana] REINDEX_SOURCE_TO_TEMP_CLOSE_PIT -> SET_TEMP_WRITE_BLOCK. took: 2ms.
[00:08:47]             │ info [o.e.c.m.MetadataIndexStateService] [node-01] adding block write to indices [[.kibana_7.16.0_reindex_temp/Omdm82uMSJ6naleZ8YanwA]]
[00:08:48]             │ info [o.e.c.m.MetadataIndexStateService] [node-01] completed adding block write to indices [.kibana_7.16.0_reindex_temp]
[00:08:48]             │ proc [kibana]   log   [20:44:38.432] [info][savedobjects-service] [.kibana] SET_TEMP_WRITE_BLOCK -> CLONE_TEMP_TO_TARGET. took: 47ms.
[00:08:48]             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] applying create index request using existing index [.kibana_7.16.0_reindex_temp] metadata
[00:08:48]             │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [.kibana_7.16.0_001] creating index, cause [clone_index], templates [], shards [1]/[1]
[00:08:48]             │ info [o.e.c.r.a.AllocationService] [node-01] updating number_of_replicas to [0] for indices [.kibana_7.16.0_001]
[00:08:48]             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Xfv_wjBnTC64F_BTjsUmJA] create_mapping [_doc]
[00:08:48]             │ proc [kibana]   log   [20:44:38.537] [info][savedobjects-service] [.kibana] CLONE_TEMP_TO_TARGET -> REFRESH_TARGET. took: 105ms.
[00:08:48]             │ proc [kibana]   log   [20:44:38.540] [info][savedobjects-service] [.kibana] REFRESH_TARGET -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 3ms.
[00:08:48]             │ proc [kibana]   log   [20:44:38.543] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 3ms.
[00:08:48]             │ proc [kibana]   log   [20:44:38.548] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 5ms.
[00:08:48]             │ proc [kibana]   log   [20:44:38.551] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 3ms.
[00:08:48]             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Xfv_wjBnTC64F_BTjsUmJA] update_mapping [_doc]
[00:08:48]             │ proc [kibana]   log   [20:44:38.612] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 61ms.
[00:08:48]             │ info [o.e.t.LoggingTaskListener] [node-01] 17404 finished with response BulkByScrollResponse[took=1.7ms,timed_out=false,sliceId=null,updated=0,created=0,deleted=0,batches=0,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:08:48]             │ proc [kibana]   log   [20:44:38.717] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> MARK_VERSION_INDEX_READY. took: 105ms.
[00:08:48]             │ info [o.e.c.m.MetadataDeleteIndexService] [node-01] [.kibana_7.16.0_reindex_temp/Omdm82uMSJ6naleZ8YanwA] deleting index
[00:08:48]             │ proc [kibana]   log   [20:44:38.765] [info][savedobjects-service] [.kibana] MARK_VERSION_INDEX_READY -> DONE. took: 48ms.
[00:08:48]             │ proc [kibana]   log   [20:44:38.765] [info][savedobjects-service] [.kibana] Migration completed after 598ms
[00:08:48]             │ debg [x-pack/test/functional/es_archives/empty_kibana] Migrated Kibana index after loading Kibana data
[00:08:49]             │ debg [x-pack/test/functional/es_archives/empty_kibana] Ensured that default space exists in .kibana
[00:08:49]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","visualization:visualize:legacyPieChartsLibrary":true}
[00:08:49]             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Xfv_wjBnTC64F_BTjsUmJA] update_mapping [_doc]
[00:08:51]             │ debg creating space
[00:08:51]             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/Xfv_wjBnTC64F_BTjsUmJA] update_mapping [_doc]
[00:08:52]             │ debg created space
[00:09:42]           └-: Non default space and role specific privilege
[00:09:42]             └-> "before all" hook for "shows management navlink"
[00:09:42]             └-> "before all" hook for "shows management navlink"
[00:09:42]               │ debg creating role nondefault_space_specific_role
[00:09:42]               │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [nondefault_space_specific_role]
[00:09:42]               │ debg creating user nondefault_space_specific_user
[00:09:42]               │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [nondefault_space_specific_user]
[00:09:42]               │ debg created user nondefault_space_specific_user
[00:09:42]               │ debg SecurityPage.forceLogout
[00:09:42]               │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=100
[00:09:42]               │ debg Already on the login page, not forcing anything
[00:09:42]               │ debg TestSubjects.exists(loginForm)
[00:09:42]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:09:42]               │ debg Waiting for Login Form to appear.
[00:09:42]               │ debg Waiting up to 100000ms for login form...
[00:09:42]               │ debg TestSubjects.exists(loginForm)
[00:09:42]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:09:42]               │ debg TestSubjects.setValue(loginUsername, nondefault_space_specific_user)
[00:09:42]               │ debg TestSubjects.click(loginUsername)
[00:09:42]               │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:09:42]               │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:09:42]               │ debg TestSubjects.setValue(loginPassword, nondefault_space_specific_role-password)
[00:09:42]               │ debg TestSubjects.click(loginPassword)
[00:09:42]               │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:09:42]               │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:09:42]               │ debg TestSubjects.click(loginSubmit)
[00:09:42]               │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:09:42]               │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:09:42]               │ debg Waiting for login result, expected: undefined.
[00:09:42]               │ debg Waiting up to 20000ms for logout button visible...
[00:09:42]               │ debg TestSubjects.exists(userMenuButton)
[00:09:42]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:09:42]               │ proc [kibana]   log   [20:45:33.260] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:09:45]               │ warn browser[SEVERE] http://localhost:61101/app/management/kibana/spaces/edit/default?_t=1634244328468 - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:09:45]               │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:09:46]               │ debg TestSubjects.exists(userMenuButton)
[00:09:46]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:09:48]               │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_task_manager_7.16.0_001/JYYn9CnwSyWp5iTJY3gX6A] update_mapping [_doc]
[00:09:48]               │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:09:49]               │ debg TestSubjects.exists(userMenuButton)
[00:09:49]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:09:52]               │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:09:53]               │ debg TestSubjects.exists(userMenuButton)
[00:09:53]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:09:56]               │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:09:57]               │ debg TestSubjects.exists(userMenuButton)
[00:09:57]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:09:59]               │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:10:00]               │ debg TestSubjects.exists(userMenuButton)
[00:10:00]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:10:03]               │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:10:04]               │ info Taking screenshot "/dev/shm/workspace/parallel/10/kibana/x-pack/test/functional/screenshots/failure/Spaces app security feature controls Non default space and role specific privilege _before all_ hook for _shows management navlink_.png"
[00:10:04]               │ info Current URL is: http://localhost:61101/app/management/kibana/spaces/edit/default
[00:10:04]               │ info Saving page source to: /dev/shm/workspace/parallel/10/kibana/x-pack/test/functional/failure_debug/html/Spaces app security feature controls Non default space and role specific privilege _before all_ hook for _shows management navlink_.html
[00:10:04]               └- ✖ fail: Spaces app security feature controls Non default space and role specific privilege "before all" hook for "shows management navlink"
[00:10:04]               │      Error: timed out waiting for logout button visible
[00:10:04]               │       at onFailure (/dev/shm/workspace/parallel/10/kibana/test/common/services/retry/retry_for_truthy.ts:39:13)
[00:10:04]               │       at retryForSuccess (/dev/shm/workspace/parallel/10/kibana/test/common/services/retry/retry_for_success.ts:59:13)
[00:10:04]               │       at retryForTruthy (/dev/shm/workspace/parallel/10/kibana/test/common/services/retry/retry_for_truthy.ts:27:3)
[00:10:04]               │       at RetryService.waitFor (/dev/shm/workspace/parallel/10/kibana/test/common/services/retry/retry.ts:59:5)
[00:10:04]               │       at SecurityPageObject.login (test/functional/page_objects/security_page.ts:247:5)
[00:10:04]               │       at Context.<anonymous> (test/functional/apps/spaces/feature_controls/spaces_security.ts:206:9)
[00:10:04]               │       at Object.apply (/dev/shm/workspace/parallel/10/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
[00:10:04]               │ 
[00:10:04]               │ 

Stack Trace

Error: timed out waiting for logout button visible
    at onFailure (/dev/shm/workspace/parallel/10/kibana/test/common/services/retry/retry_for_truthy.ts:39:13)
    at retryForSuccess (/dev/shm/workspace/parallel/10/kibana/test/common/services/retry/retry_for_success.ts:59:13)
    at retryForTruthy (/dev/shm/workspace/parallel/10/kibana/test/common/services/retry/retry_for_truthy.ts:27:3)
    at RetryService.waitFor (/dev/shm/workspace/parallel/10/kibana/test/common/services/retry/retry.ts:59:5)
    at SecurityPageObject.login (test/functional/page_objects/security_page.ts:247:5)
    at Context.<anonymous> (test/functional/apps/spaces/feature_controls/spaces_security.ts:206:9)
    at Object.apply (/dev/shm/workspace/parallel/10/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

Metrics [docs]

Async chunks

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

id before after diff
enterpriseSearch 1.4MB 1.4MB +50.0B

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

cc @scottybollinger

@kibanamachine kibanamachine merged commit 7464156 into elastic:7.x Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants