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

Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/saved_objects_management/spaces_integration·ts - Saved objects management spaces integration redirects to correct url when inspecting an object from a non-default space #115303

Closed
kibanamachine opened this issue Oct 17, 2021 · 16 comments · Fixed by #132015
Labels
failed-test A test failure on a tracked branch, potentially flaky-test impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:small Small Level of Effort Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@kibanamachine
Copy link
Contributor

kibanamachine commented Oct 17, 2021

A test failed on a tracked branch

Error: expected false to equal true
    at Assertion.assert (/opt/local-ssd/buildkite/builds/kb-cigroup-6-350c9431c8e92fb2/elastic/kibana-hourly/kibana/node_modules/@kbn/expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (/opt/local-ssd/buildkite/builds/kb-cigroup-6-350c9431c8e92fb2/elastic/kibana-hourly/kibana/node_modules/@kbn/expect/expect.js:227:8)
    at Assertion.be (/opt/local-ssd/buildkite/builds/kb-cigroup-6-350c9431c8e92fb2/elastic/kibana-hourly/kibana/node_modules/@kbn/expect/expect.js:69:22)
    at Context.<anonymous> (test/functional/apps/saved_objects_management/spaces_integration.ts:57:44)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Object.apply (/opt/local-ssd/buildkite/builds/kb-cigroup-6-350c9431c8e92fb2/elastic/kibana-hourly/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

First failure: CI Build - master

@kibanamachine kibanamachine added the failed-test A test failure on a tracked branch, potentially flaky-test label Oct 17, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Oct 17, 2021
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 7.x

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - 7.x

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - master

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - master

@azasypkin azasypkin added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! labels Oct 18, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Oct 18, 2021
@kibanamachine
Copy link
Contributor Author

New failure: CI Build - master

@legrego
Copy link
Member

legrego commented Oct 18, 2021

A possible cause is a timeout waiting for search results to appear:

image

@kibanamachine
Copy link
Contributor Author

New failure: CI Build - master

@jportner
Copy link
Contributor

I'm taking a look at this now

@mistic
Copy link
Member

mistic commented Oct 18, 2021

This test keeps failing. I'm skipping it for now.

master/8.0: 08dbb54
7.x/7.16: c227af5

@jportner
Copy link
Contributor

Here are the debug logs for the first CI failure:

  [00:07:56]       └-: Saved objects management
  [00:07:56]         └-> \"before all\" hook in \"Saved objects management\"
  [00:07:56]         └-: spaces integration
  [00:07:56]           └-> \"before all\" hook for \"redirects to correct url when inspecting an object from a non-default space\"
  [00:07:56]           └-> \"before all\" hook for \"redirects to correct url when inspecting an object from a non-default space\"
  [00:07:56]             │ debg creating space
  [00:07:56]             │ debg created space
  [00:07:56]             │ debg resolved import for x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/spaces_integration to /opt/local-ssd/buildkite/builds/kb-cigroup-6-b375125aacb2753b/elastic/kibana-hourly/kibana/x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/spaces_integration.json
  [00:07:56]             │ info importing 2 saved objects { space: 'space_1' }
  [00:07:56]             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/WTiBe3ecSTaawFrNcl24YQ] update_mapping [_doc]
  [00:07:56]             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_8.0.0_001/WTiBe3ecSTaawFrNcl24YQ] update_mapping [_doc]
  [00:07:57]             │ succ import success
  [00:07:57]           └-> redirects to correct url when inspecting an object from a non-default space
  [00:07:57]             └-> \"before each\" hook: global before each for \"redirects to correct url when inspecting an object from a non-default space\"
  [00:07:57]             └-> \"before each\" hook for \"redirects to correct url when inspecting an object from a non-default space\"
  [00:07:57]               │ debg navigateToUrl http://localhost:6101/s/space_1/app/management/kibana/objects
  [00:07:58]               │ debg browser[INFO] http://localhost:6101/s/space_1/app/management/kibana/objects?_t=1634549819689 281 Refused to execute inline script because it violates the following Content Security Policy directive: \"script-src 'unsafe-eval' 'self'\". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
  [00:07:58]               │
  [00:07:58]               │ debg browser[INFO] http://localhost:6101/s/space_1/bootstrap.js 41:19 \"^ A single error about an inline script not firing due to content security policy is expected!\"
  [00:07:58]               │ debg currentUrl = http://localhost:6101/s/space_1/app/management/kibana/objects
  [00:07:58]               │          appUrl = http://localhost:6101/s/space_1/app/management/kibana/objects
  [00:07:58]               │ debg TestSubjects.find(kibanaChrome)
  [00:07:58]               │ debg Find.findByCssSelector('[data-test-subj=\"kibanaChrome\"]') with timeout=60000
  [00:07:59]               │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj=\"savedObjectsTable\"] :not(.euiBasicTable-loading)') with timeout=2500
  [00:08:00]             │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj=\"savedObjectsTable\"] :not(.euiBasicTable-loading)') with timeout=2500
  [00:08:01]             │ debg TestSubjects.find(savedObjectsTable)
  [00:08:01]             │ debg Find.findByCssSelector('[data-test-subj=\"savedObjectsTable\"]') with timeout=10000
  [00:08:01]             │ info Taking screenshot \"/opt/local-ssd/buildkite/builds/kb-cigroup-6-b375125aacb2753b/elastic/kibana-hourly/kibana/x-pack/test/functional/screenshots/failure/Saved objects management spaces integration redirects to correct url when inspecting an object from a non-default space.png\"
  [00:08:01]             │ info Current URL is: http://localhost:6101/s/space_1/app/management/kibana/objects
  [00:08:01]             │ info Saving page source to: /opt/local-ssd/buildkite/builds/kb-cigroup-6-b375125aacb2753b/elastic/kibana-hourly/kibana/x-pack/test/functional/failure_debug/html/Saved objects management spaces integration redirects to correct url when inspecting an object from a non-default space.html
  [00:08:01]             └- ✖ fail: Saved objects management spaces integration redirects to correct url when inspecting an object from a non-default space
  [00:08:01]             │      Error: expected false to equal true
  [00:08:01]             │       at Assertion.assert (/opt/local-ssd/buildkite/builds/kb-cigroup-6-b375125aacb2753b/elastic/kibana-hourly/kibana/node_modules/@kbn/expect/expect.js:100:11)
  [00:08:01]             │       at Assertion.be.Assertion.equal (/opt/local-ssd/buildkite/builds/kb-cigroup-6-b375125aacb2753b/elastic/kibana-hourly/kibana/node_modules/@kbn/expect/expect.js:227:8)
  [00:08:01]             │       at Assertion.be (/opt/local-ssd/buildkite/builds/kb-cigroup-6-b375125aacb2753b/elastic/kibana-hourly/kibana/node_modules/@kbn/expect/expect.js:69:22)
  [00:08:01]             │       at Context.<anonymous> (test/functional/apps/saved_objects_management/spaces_integration.ts:57:44)
  [00:08:01]             │       at runMicrotasks (<anonymous>)
  [00:08:01]             │       at processTicksAndRejections (node:internal/process/task_queues:96:5)
  [00:08:01]             │       at Object.apply (/opt/local-ssd/buildkite/builds/kb-cigroup-6-b375125aacb2753b/elastic/kibana-hourly/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

The second CI failure looks identical.
The objects appear to have been successfully imported, I'm not sure why the table is not showing them other than what @legrego suggested.

For reference, here are the debug logs from a successful run locally:

 └-: Saved objects management
   └-> "before all" hook in "Saved objects management"
   └-: spaces integration
     └-> "before all" hook for "redirects to correct url when inspecting an object from a non-default space"
     └-> "before all" hook for "redirects to correct url when inspecting an object from a non-default space"
       │ debg creating space
       │ debg created space
       │ debg resolved import for x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/spaces_integration to /Users/joe/GitHub/kibana-4/x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/spaces_integration.json
       │ info importing 2 saved objects { space: 'space_1' }
       │ succ import success
     └-> redirects to correct url when inspecting an object from a non-default space
       └-> "before each" hook: global before each for "redirects to correct url when inspecting an object from a non-default space"
       └-> "before each" hook for "redirects to correct url when inspecting an object from a non-default space"
         │ debg navigateToUrl http://localhost:5620/s/space_1/app/management/kibana/objects
         │ debg browser[DEBUG] http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.js 133989:16 "Reporting application usage for uptime, main"
         │ debg browser[INFO] http://localhost:5620/s/space_1/app/management/kibana/objects?_t=1634569633986 281 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
         │
         │ debg browser[INFO] http://localhost:5620/s/space_1/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
         │ debg currentUrl = http://localhost:5620/s/space_1/app/management/kibana/objects
         │          appUrl = http://localhost:5620/s/space_1/app/management/kibana/objects
         │ debg TestSubjects.find(kibanaChrome)
         │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
         │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj="savedObjectsTable"] :not(.euiBasicTable-loading)') with timeout=2500
         │ debg browser[INFO] http://localhost:5620/9007199254740991/bundles/core/core.entry.js 17846:18 "Plugin monitoring is using asynchronous setup lifecycle. Asynchronous plugins support will be removed in a later version."
         │ debg browser[DEBUG] http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-src/kbn-ui-shared-deps-src.js 133989:16 "Reporting user-agent."
         │ debg --- retry.tryForTime error: stale element reference: element is not attached to the page document
         │        (Session info: chrome=94.0.4606.81)
       │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj="savedObjectsTable"] :not(.euiBasicTable-loading)') with timeout=2500
       │ debg TestSubjects.find(savedObjectsTable)
       │ debg Find.findByCssSelector('[data-test-subj="savedObjectsTable"]') with timeout=10000
       │ debg TestSubjects.findAll(~savedObjectsTableRow)
       │ debg Find.allByCssSelector('[data-test-subj~="savedObjectsTableRow"]') with timeout=10000
       │ debg Find.findByCssSelector('.euiContextMenuPanel') with timeout=10000
       │ debg Find.findByClassName('kibanaCodeEditor') with timeout=10000
       └- ✓ pass  (1.8s)
     └-> "after all" hook for "redirects to correct url when inspecting an object from a non-default space"
       │ debg deleting space: space_1
       │ debg deleted space: space_1
     └-> "after all" hook for "redirects to correct url when inspecting an object from a non-default space"
   └-> "after all" hook in "Saved objects management"

@jbudz
Copy link
Member

jbudz commented Oct 18, 2021

If it helps - https://buildkite.com/elastic/kibana-hourly/builds/1518#0a6ce9d5-daf5-438d-a63a-0f760a5d5e38 looks slightly different. I'm not familiar with the test, but if it's waiting for the list to render it may be too early?

@jportner
Copy link
Contributor

If it helps - https://buildkite.com/elastic/kibana-hourly/builds/1518#0a6ce9d5-daf5-438d-a63a-0f760a5d5e38 looks slightly different. I'm not familiar with the test, but if it's waiting for the list to render it may be too early?

That is missing the debug log messages, if you go to the Artifacts tab you can look at the JSON that includes debug logs

Looks the same as the previous CI failure to me:

  [00:07:53]       └-: Saved objects management
  [00:07:53]         └-> \"before all\" hook in \"Saved objects management\"
  [00:07:53]         └-: spaces integration
  [00:07:53]           └-> \"before all\" hook for \"redirects to correct url when inspecting an object from a non-default space\"
  [00:07:53]           └-> \"before all\" hook for \"redirects to correct url when inspecting an object from a non-default space\"
  [00:07:53]             │ debg creating space
  [00:07:53]             │ debg created space
  [00:07:53]             │ debg resolved import for x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/spaces_integration to /opt/local-ssd/buildkite/builds/kb-cigroup-6-3879f280a6a21e6b/elastic/kibana-hourly/kibana/x-pack/test/functional/fixtures/kbn_archiver/saved_objects_management/spaces_integration.json
  [00:07:53]             │ info importing 2 saved objects { space: 'space_1' }
  [00:07:53]             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/wMABX01mTCGJFzjnocRlqg] update_mapping [_doc]
  [00:07:53]             │ info [o.e.c.m.MetadataMappingService] [node-01] [.kibana_7.16.0_001/wMABX01mTCGJFzjnocRlqg] update_mapping [_doc]
  [00:07:54]             │ succ import success
  [00:07:54]           └-> redirects to correct url when inspecting an object from a non-default space
  [00:07:54]             └-> \"before each\" hook: global before each for \"redirects to correct url when inspecting an object from a non-default space\"
  [00:07:54]             └-> \"before each\" hook for \"redirects to correct url when inspecting an object from a non-default space\"
  [00:07:54]               │ debg navigateToUrl http://localhost:6101/s/space_1/app/management/kibana/objects
  [00:07:56]               │ debg browser[INFO] http://localhost:6101/s/space_1/app/management/kibana/objects?_t=1634474137955 281 Refused to execute inline script because it violates the following Content Security Policy directive: \"script-src 'unsafe-eval' 'self'\". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
  [00:07:56]               │
  [00:07:56]               │ debg browser[INFO] http://localhost:6101/s/space_1/bootstrap.js 41:19 \"^ A single error about an inline script not firing due to content security policy is expected!\"
  [00:07:56]               │ debg currentUrl = http://localhost:6101/s/space_1/app/management/kibana/objects
  [00:07:56]               │          appUrl = http://localhost:6101/s/space_1/app/management/kibana/objects
  [00:07:56]               │ debg TestSubjects.find(kibanaChrome)
  [00:07:56]               │ debg Find.findByCssSelector('[data-test-subj=\"kibanaChrome\"]') with timeout=60000
  [00:07:57]               │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj=\"savedObjectsTable\"] :not(.euiBasicTable-loading)') with timeout=2500
  [00:07:58]             │ debg Find.existsByDisplayedByCssSelector('*[data-test-subj=\"savedObjectsTable\"] :not(.euiBasicTable-loading)') with timeout=2500
  [00:07:58]             │ debg TestSubjects.find(savedObjectsTable)
  [00:07:58]             │ debg Find.findByCssSelector('[data-test-subj=\"savedObjectsTable\"]') with timeout=10000
  [00:07:58]             │ info Taking screenshot \"/opt/local-ssd/buildkite/builds/kb-cigroup-6-3879f280a6a21e6b/elastic/kibana-hourly/kibana/x-pack/test/functional/screenshots/failure/Saved objects management spaces integration redirects to correct url when inspecting an object from a non-default space.png\"
  [00:07:58]             │ info Current URL is: http://localhost:6101/s/space_1/app/management/kibana/objects
  [00:07:58]             │ info Saving page source to: /opt/local-ssd/buildkite/builds/kb-cigroup-6-3879f280a6a21e6b/elastic/kibana-hourly/kibana/x-pack/test/functional/failure_debug/html/Saved objects management spaces integration redirects to correct url when inspecting an object from a non-default space.html
  [00:07:59]             └- ✖ fail: Saved objects management spaces integration redirects to correct url when inspecting an object from a non-default space
  [00:07:59]             │      Error: expected false to equal true
  [00:07:59]             │       at Assertion.assert (/opt/local-ssd/buildkite/builds/kb-cigroup-6-3879f280a6a21e6b/elastic/kibana-hourly/kibana/node_modules/@kbn/expect/expect.js:100:11)
  [00:07:59]             │       at Assertion.be.Assertion.equal (/opt/local-ssd/buildkite/builds/kb-cigroup-6-3879f280a6a21e6b/elastic/kibana-hourly/kibana/node_modules/@kbn/expect/expect.js:227:8)
  [00:07:59]             │       at Assertion.be (/opt/local-ssd/buildkite/builds/kb-cigroup-6-3879f280a6a21e6b/elastic/kibana-hourly/kibana/node_modules/@kbn/expect/expect.js:69:22)
  [00:07:59]             │       at Context.<anonymous> (test/functional/apps/saved_objects_management/spaces_integration.ts:52:44)
  [00:07:59]             │       at runMicrotasks (<anonymous>)
  [00:07:59]             │       at processTicksAndRejections (node:internal/process/task_queues:96:5)
  [00:07:59]             │       at Object.apply (/opt/local-ssd/buildkite/builds/kb-cigroup-6-3879f280a6a21e6b/elastic/kibana-hourly/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

@jbudz
Copy link
Member

jbudz commented Oct 18, 2021

Ah sorry - I was reference the screenshot, which had partially loaded rows.

image

@jportner
Copy link
Contributor

Oh my. Nice catch! I wonder if any other pages with EuiTable elements are failing?

@legrego legrego added EnableJiraSync and removed Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Nov 4, 2021
@exalate-issue-sync exalate-issue-sync bot added the impact:critical This issue should be addressed immediately due to a critical level of impact on the product. label Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test impact:critical This issue should be addressed immediately due to a critical level of impact on the product. loe:small Small Level of Effort Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants