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.15] Fix issue with incorrect policy response attachment. (#113430) #113851

Merged
merged 1 commit into from
Oct 4, 2021

Conversation

kibanamachine
Copy link
Contributor

Backports the following commits to 7.15:

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@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/ml/feature_controls/ml_spaces·ts.machine learning feature controls spaces space with no features disabled can navigate to app

Link to Jenkins

Standard Out

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

[00:00:00]     │
[00:00:23]       └-: machine learning
[00:00:23]         └-> "before all" hook in "machine learning"
[00:00:23]         └-: 
[00:00:23]           └-> "before all" hook in ""
[00:00:23]           └-> "before all" hook in ""
[00:00:23]             │ debg creating role ft_ml_source
[00:00:23]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_source]
[00:00:23]             │ debg creating role ft_ml_source_readonly
[00:00:23]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_source_readonly]
[00:00:23]             │ debg creating role ft_ml_dest
[00:00:23]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_dest]
[00:00:23]             │ debg creating role ft_ml_dest_readonly
[00:00:23]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_dest_readonly]
[00:00:23]             │ debg creating role ft_ml_ui_extras
[00:00:23]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_ml_ui_extras]
[00:00:23]             │ debg creating role ft_default_space_ml_all
[00:00:23]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space_ml_all]
[00:00:23]             │ debg creating role ft_default_space1_ml_all
[00:00:23]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space1_ml_all]
[00:00:23]             │ debg creating role ft_all_spaces_ml_all
[00:00:23]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_all_spaces_ml_all]
[00:00:24]             │ debg creating role ft_default_space_ml_read
[00:00:24]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space_ml_read]
[00:00:24]             │ debg creating role ft_default_space1_ml_read
[00:00:24]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space1_ml_read]
[00:00:24]             │ debg creating role ft_all_spaces_ml_read
[00:00:24]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_all_spaces_ml_read]
[00:00:24]             │ debg creating role ft_default_space_ml_none
[00:00:24]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [node-01] added role [ft_default_space_ml_none]
[00:00:24]             │ debg creating user ft_ml_poweruser
[00:00:24]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_poweruser]
[00:00:24]             │ debg created user ft_ml_poweruser
[00:00:24]             │ debg creating user ft_ml_poweruser_spaces
[00:00:24]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_poweruser_spaces]
[00:00:24]             │ debg created user ft_ml_poweruser_spaces
[00:00:24]             │ debg creating user ft_ml_poweruser_space1
[00:00:24]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_poweruser_space1]
[00:00:24]             │ debg created user ft_ml_poweruser_space1
[00:00:24]             │ debg creating user ft_ml_poweruser_all_spaces
[00:00:24]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_poweruser_all_spaces]
[00:00:24]             │ debg created user ft_ml_poweruser_all_spaces
[00:00:24]             │ debg creating user ft_ml_viewer
[00:00:24]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_viewer]
[00:00:24]             │ debg created user ft_ml_viewer
[00:00:24]             │ debg creating user ft_ml_viewer_spaces
[00:00:24]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_viewer_spaces]
[00:00:24]             │ debg created user ft_ml_viewer_spaces
[00:00:24]             │ debg creating user ft_ml_viewer_space1
[00:00:25]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_viewer_space1]
[00:00:25]             │ debg created user ft_ml_viewer_space1
[00:00:25]             │ debg creating user ft_ml_viewer_all_spaces
[00:00:25]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_viewer_all_spaces]
[00:00:25]             │ debg created user ft_ml_viewer_all_spaces
[00:00:25]             │ debg creating user ft_ml_unauthorized
[00:00:25]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_unauthorized]
[00:00:25]             │ debg created user ft_ml_unauthorized
[00:00:25]             │ debg creating user ft_ml_unauthorized_spaces
[00:00:25]             │ info [o.e.x.s.a.u.TransportPutUserAction] [node-01] added user [ft_ml_unauthorized_spaces]
[00:00:25]             │ debg created user ft_ml_unauthorized_spaces
[00:00:25]           └-: feature controls
[00:00:25]             └-> "before all" hook in "feature controls"
[00:01:20]             └-: spaces
[00:01:20]               └-> "before all" hook in "spaces"
[00:01:20]               └-: space with no features disabled
[00:01:20]                 └-> "before all" hook for "shows Machine Learning navlink"
[00:01:20]                 └-> "before all" hook for "shows Machine Learning navlink"
[00:01:20]                   │ debg creating space
[00:01:21]                   │ debg created space
[00:01:21]                 └-> shows Machine Learning navlink
[00:01:21]                   └-> "before each" hook: global before each for "shows Machine Learning navlink"
[00:01:21]                   │ debg navigating to home url: http://localhost:61201/s/custom_space/app/home#/
[00:01:21]                   │ debg navigate to: http://localhost:61201/s/custom_space/app/home#/
[00:01:21]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/login?next=%2Fs%2Fcustom_space%2Fapp%2Fhome%3F_t%3D1633383685941#/ 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:01:21]                   │
[00:01:21]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:01:21]                   │ debg ... sleep(700) start
[00:01:22]                   │ERROR browser[SEVERE] http://localhost:61201/s/custom_space/api/licensing/info - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:01:22]                   │ debg ... sleep(700) end
[00:01:22]                   │ debg returned from get, calling refresh
[00:01:22]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/login?next=%2Fs%2Fcustom_space%2Fapp%2Fhome%3F_t%3D1633383685941#/ 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:01:22]                   │
[00:01:22]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:01:22]                   │ debg currentUrl = http://localhost:61201/s/custom_space/login?next=%2Fs%2Fcustom_space%2Fapp%2Fhome%3F_t%3D1633383685941#/
[00:01:22]                   │          appUrl = http://localhost:61201/s/custom_space/app/home#/
[00:01:22]                   │ debg TestSubjects.find(kibanaChrome)
[00:01:22]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:01:23]                   │ debg Found login page
[00:01:23]                   │ debg TestSubjects.setValue(loginUsername, test_user)
[00:01:23]                   │ debg TestSubjects.click(loginUsername)
[00:01:23]                   │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:01:23]                   │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:01:23]                   │ERROR browser[SEVERE] http://localhost:61201/s/custom_space/api/licensing/info - Failed to load resource: the server responded with a status of 401 (Unauthorized)
[00:01:23]                   │ debg TestSubjects.setValue(loginPassword, changeme)
[00:01:23]                   │ debg TestSubjects.click(loginPassword)
[00:01:23]                   │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:01:23]                   │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:01:24]                   │ debg TestSubjects.click(loginSubmit)
[00:01:24]                   │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:01:24]                   │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:01:24]                   │ debg Find.waitForDeletedByCssSelector('.kibanaWelcomeLogo') with timeout=10000
[00:01:24]                   │ proc [kibana]   log   [21:41:28.939] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:01:24]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:01:24]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"] nav:not(.ng-hide)') with timeout=60000
[00:01:27]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/app/home?_t=1633383685941#/ 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:01:27]                   │
[00:01:27]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:01:28]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/app/home?_t=1633383692421#/ 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:01:28]                   │
[00:01:28]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:01:28]                   │ debg Finished login process currentUrl = http://localhost:61201/s/custom_space/app/home#/
[00:01:28]                   │ debg ... sleep(501) start
[00:01:29]                   │ debg ... sleep(501) end
[00:01:29]                   │ debg in navigateTo url = http://localhost:61201/s/custom_space/app/home#/
[00:01:29]                   │ debg isGlobalLoadingIndicatorVisible
[00:01:29]                   │ debg TestSubjects.exists(globalLoadingIndicator)
[00:01:29]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:01:30]                   │ debg --- retry.tryForTime error: [data-test-subj="globalLoadingIndicator"] is not displayed
[00:01:31]                   │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:01:31]                   │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:01:31]                   │ debg TestSubjects.exists(collapsibleNav)
[00:01:31]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=2500
[00:01:33]                   │ debg --- retry.tryForTime error: [data-test-subj="collapsibleNav"] is not displayed
[00:01:34]                   │ debg TestSubjects.click(toggleNavButton)
[00:01:34]                   │ debg Find.clickByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:01:34]                   │ debg Find.findByCssSelector('[data-test-subj="toggleNavButton"]') with timeout=10000
[00:01:34]                   │ debg TestSubjects.find(collapsibleNav)
[00:01:34]                   │ debg Find.findByCssSelector('[data-test-subj="collapsibleNav"]') with timeout=10000
[00:01:34]                   │ debg Find.existsByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=2500
[00:01:34]                   │ debg Find.findByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:01:34]                   │ debg Find.clickByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:01:34]                   │ debg Find.findByCssSelector('[data-test-subj=collapsibleNav] > button') with timeout=10000
[00:01:34]                   └- ✓ pass  (13.6s) "machine learning  feature controls spaces space with no features disabled shows Machine Learning navlink"
[00:01:34]                 └-> can navigate to app
[00:01:34]                   └-> "before each" hook: global before each for "can navigate to app"
[00:01:34]                   │ debg navigating to ml url: http://localhost:61201/s/custom_space/app/ml
[00:01:34]                   │ debg navigate to: http://localhost:61201/s/custom_space/app/ml
[00:01:34]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/app/ml?_t=1633383699499 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:01:34]                   │
[00:01:34]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:01:34]                   │ debg ... sleep(700) start
[00:01:35]                   │ debg ... sleep(700) end
[00:01:35]                   │ debg returned from get, calling refresh
[00:01:36]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/app/ml?_t=1633383699499 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:01:36]                   │
[00:01:36]                   │ debg browser[INFO] http://localhost:61201/s/custom_space/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:01:36]                   │ debg currentUrl = http://localhost:61201/s/custom_space/app/ml
[00:01:36]                   │          appUrl = http://localhost:61201/s/custom_space/app/ml
[00:01:36]                   │ debg TestSubjects.find(kibanaChrome)
[00:01:36]                   │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:01:36]                   │ debg ... sleep(501) start
[00:01:36]                   │ERROR browser[SEVERE] http://localhost:61201/44154/bundles/plugin/ml/8.0.0/ml.chunk.3.js - Failed to load resource: net::ERR_NETWORK_CHANGED
[00:01:36]                   │ERROR browser[SEVERE] http://localhost:61201/44154/bundles/core/core.entry.js 12:46852 ChunkLoadError: Loading chunk 3 failed.
[00:01:36]                   │      (error: http://localhost:61201/44154/bundles/plugin/ml/8.0.0/ml.chunk.3.js)
[00:01:36]                   │          at Function.__webpack_require__.e (http://localhost:61201/44154/bundles/plugin/ml/8.0.0/ml.plugin.js:2:1646)
[00:01:36]                   │          at Object.mount (http://localhost:61201/44154/bundles/plugin/ml/8.0.0/ml.plugin.js:2:58652)
[00:01:37]                   │ debg ... sleep(501) end
[00:01:37]                   │ debg in navigateTo url = http://localhost:61201/s/custom_space/app/ml
[00:01:37]                   │ debg TestSubjects.exists(mlPageOverview)
[00:01:37]                   │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="mlPageOverview"]') with timeout=120000
[00:01:39]                   │ debg --- retry.tryForTime error: [data-test-subj="mlPageOverview"] is not displayed
[00:01:42]                   │ debg --- retry.tryForTime failed again with the same message...
[00:01:45]                   │ debg --- retry.tryForTime failed again with the same message...
[00:01:48]                   │ debg --- retry.tryForTime failed again with the same message...
[00:01:51]                   │ debg --- retry.tryForTime failed again with the same message...
[00:01:55]                   │ debg --- retry.tryForTime failed again with the same message...
[00:01:58]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:01]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:04]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:07]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:10]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:13]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:16]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:19]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:22]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:25]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:28]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:31]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:34]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:37]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:40]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:43]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:46]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:49]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:52]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:55]                   │ debg --- retry.tryForTime failed again with the same message...
[00:02:58]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:01]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:05]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:08]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:11]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:14]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:17]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:20]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:23]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:26]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:29]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:32]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:35]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:38]                   │ debg --- retry.tryForTime failed again with the same message...
[00:03:39]                   │ info Taking screenshot "/dev/shm/workspace/parallel/20/kibana/x-pack/test/functional/screenshots/failure/machine learning  feature controls spaces space with no features disabled can navigate to app.png"
[00:03:39]                   │ info Current URL is: http://localhost:61201/s/custom_space/app/ml
[00:03:39]                   │ info Saving page source to: /dev/shm/workspace/parallel/20/kibana/x-pack/test/functional/failure_debug/html/machine learning  feature controls spaces space with no features disabled can navigate to app.html
[00:03:39]                   └- ✖ fail: machine learning  feature controls spaces space with no features disabled can navigate to app
[00:03:39]                   │      Error: expected testSubject(mlPageOverview) to exist
[00:03:39]                   │       at TestSubjects.existOrFail (/dev/shm/workspace/parallel/20/kibana/test/functional/services/common/test_subjects.ts:45:13)
[00:03:39]                   │       at Context.<anonymous> (test/functional/apps/ml/feature_controls/ml_spaces.ts:44:9)
[00:03:39]                   │       at Object.apply (/dev/shm/workspace/parallel/20/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
[00:03:39]                   │ 
[00:03:39]                   │ 

Stack Trace

Error: expected testSubject(mlPageOverview) to exist
    at TestSubjects.existOrFail (/dev/shm/workspace/parallel/20/kibana/test/functional/services/common/test_subjects.ts:45:13)
    at Context.<anonymous> (test/functional/apps/ml/feature_controls/ml_spaces.ts:44:9)
    at Object.apply (/dev/shm/workspace/parallel/20/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

Metrics [docs]

✅ unchanged

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

cc @pjhampton

@kibanamachine kibanamachine merged commit ff5915a into elastic:7.15 Oct 4, 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