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.10] [Fleet] Fix POLICY_CHANGE action creation for new policy (#81236) #81273

Merged
merged 1 commit into from
Oct 21, 2020

Conversation

nchaulet
Copy link
Member

Backports the following commits to 7.10:

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/monitoring/elasticsearch/index_detail·js.Monitoring app Elasticsearch index detail Deleted Index "before all" hook for "should have an index summary with NA for deleted index"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:04:27]         └-: Monitoring app
[00:04:27]           └-> "before all" hook
[00:12:21]           └-: Elasticsearch index detail
[00:12:21]             └-> "before all" hook
[00:12:54]             └-: Deleted Index
[00:12:54]               └-> "before all" hook
[00:12:54]               └-> "before all" hook
[00:12:55]                 │ info [monitoring/singlecluster-red-platinum] Loading "mappings.json"
[00:12:55]                 │ info [monitoring/singlecluster-red-platinum] Loading "data.json.gz"
[00:12:55]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1603250869727762248] [.monitoring-es-6-2017.10.06] creating index, cause [api], templates [], shards [1]/[1]
[00:12:55]                 │ info [monitoring/singlecluster-red-platinum] Created index ".monitoring-es-6-2017.10.06"
[00:12:55]                 │ debg [monitoring/singlecluster-red-platinum] ".monitoring-es-6-2017.10.06" settings {"index":{"codec":"best_compression","format":"6","number_of_replicas":"1","number_of_shards":"1"}}
[00:12:55]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1603250869727762248] [.monitoring-kibana-6-2017.10.06] creating index, cause [api], templates [], shards [1]/[1]
[00:12:55]                 │ info [monitoring/singlecluster-red-platinum] Created index ".monitoring-kibana-6-2017.10.06"
[00:12:55]                 │ debg [monitoring/singlecluster-red-platinum] ".monitoring-kibana-6-2017.10.06" settings {"index":{"codec":"best_compression","format":"6","number_of_replicas":"1","number_of_shards":"1"}}
[00:12:55]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xxl-1603250869727762248] [.monitoring-alerts-6] creating index, cause [api], templates [], shards [1]/[1]
[00:12:55]                 │ info [monitoring/singlecluster-red-platinum] Created index ".monitoring-alerts-6"
[00:12:55]                 │ debg [monitoring/singlecluster-red-platinum] ".monitoring-alerts-6" settings {"index":{"codec":"best_compression","format":"6","number_of_replicas":"1","number_of_shards":"1"}}
[00:12:55]                 │ info [monitoring/singlecluster-red-platinum] Indexed 2024 docs into ".monitoring-es-6-2017.10.06"
[00:12:55]                 │ info [monitoring/singlecluster-red-platinum] Indexed 135 docs into ".monitoring-kibana-6-2017.10.06"
[00:12:55]                 │ info [monitoring/singlecluster-red-platinum] Indexed 1 docs into ".monitoring-alerts-6"
[00:12:55]                 │ debg replacing kibana config doc: {}
[00:12:56]                 │ debg creating user basic_monitoring_user
[00:12:56]                 │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-16-tests-xxl-1603250869727762248] added user [basic_monitoring_user]
[00:12:56]                 │ debg created user basic_monitoring_user
[00:12:56]                 │ debg SecurityPage.forceLogout
[00:12:56]                 │ debg Find.existsByDisplayedByCssSelector('.login-form') with timeout=100
[00:12:56]                 │ debg Already on the login page, not forcing anything
[00:12:56]                 │ debg TestSubjects.setValue(loginUsername, basic_monitoring_user)
[00:12:56]                 │ debg TestSubjects.click(loginUsername)
[00:12:56]                 │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:12:56]                 │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:12:56]                 │ debg TestSubjects.setValue(loginPassword, monitoring_user_password)
[00:12:56]                 │ debg TestSubjects.click(loginPassword)
[00:12:56]                 │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:12:56]                 │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:12:57]                 │ debg TestSubjects.click(loginSubmit)
[00:12:57]                 │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:12:57]                 │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:12:57]                 │ debg Find.waitForDeletedByCssSelector('.kibanaWelcomeLogo') with timeout=10000
[00:12:57]                 │ proc [kibana]   log   [04:10:18.064] [info][plugins][routes][security] Logging in with provider "basic" (basic)
[00:12:57]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:12:58]                 │ debg navigating to monitoring url: http://localhost:61201/app/monitoring
[00:12:58]                 │ debg navigate to: http://localhost:61201/app/monitoring
[00:12:58]                 │ debg browser[INFO] http://localhost:61201/app/home 341 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:12:58]                 │
[00:12:58]                 │ debg browser[INFO] http://localhost:61201/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:12:58]                 │ debg browser[INFO] http://localhost:61201/app/monitoring?_t=1603253418879 341 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:12:58]                 │
[00:12:58]                 │ debg browser[INFO] http://localhost:61201/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:12:58]                 │ debg ... sleep(700) start
[00:12:58]                 │ debg ... sleep(700) end
[00:12:58]                 │ debg returned from get, calling refresh
[00:12:59]                 │ERROR browser[SEVERE] http://localhost:61201/35809/bundles/core/core.entry.js 12:233392 TypeError: Failed to fetch
[00:12:59]                 │          at Fetch._callee3$ (http://localhost:61201/35809/bundles/core/core.entry.js:6:58583)
[00:12:59]                 │          at l (http://localhost:61201/35809/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:380:1740519)
[00:12:59]                 │          at Generator._invoke (http://localhost:61201/35809/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:380:1740272)
[00:12:59]                 │          at Generator.forEach.e.<computed> [as throw] (http://localhost:61201/35809/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:380:1740876)
[00:12:59]                 │          at fetch_asyncGeneratorStep (http://localhost:61201/35809/bundles/core/core.entry.js:6:52652)
[00:12:59]                 │          at _throw (http://localhost:61201/35809/bundles/core/core.entry.js:6:53060)
[00:12:59]                 │ debg browser[INFO] http://localhost:61201/app/monitoring?_t=1603253418879 341 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:12:59]                 │
[00:12:59]                 │ debg browser[INFO] http://localhost:61201/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:13:00]                 │ debg currentUrl = http://localhost:61201/app/monitoring
[00:13:00]                 │          appUrl = http://localhost:61201/app/monitoring
[00:13:00]                 │ debg TestSubjects.find(kibanaChrome)
[00:13:00]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:13:00]                 │ debg ... sleep(501) start
[00:13:00]                 │ERROR browser[SEVERE] http://localhost:61201/api/monitoring/v1/elasticsearch_settings/check/cluster - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:13:00]                 │ERROR browser[SEVERE] http://localhost:61201/api/monitoring/v1/elasticsearch_settings/check/nodes - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:13:00]                 │ debg ... sleep(501) end
[00:13:00]                 │ debg in navigateTo url = http://localhost:61201/app/monitoring#/no-data?_g=(filters:!(),refreshInterval:(pause:!f,value:10000),time:(from:now-1h,to:now))
[00:13:00]                 │ debg --- retry.try error: URL changed, waiting for it to settle
[00:13:01]                 │ debg ... sleep(501) start
[00:13:01]                 │ debg ... sleep(501) end
[00:13:01]                 │ debg in navigateTo url = http://localhost:61201/app/monitoring#/no-data?_g=(filters:!(),refreshInterval:(pause:!f,value:10000),time:(from:now-1h,to:now))
[00:13:01]                 │ debg TestSubjects.exists(statusPageContainer)
[00:13:01]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:13:04]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:13:04]                 │ debg pauseAutoRefresh
[00:13:04]                 │ debg openQuickSelectTimeMenu
[00:13:04]                 │ debg TestSubjects.exists(superDatePickerQuickMenu)
[00:13:04]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerQuickMenu"]') with timeout=2500
[00:13:07]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerQuickMenu"] is not displayed
[00:13:07]                 │ debg opening quick select menu
[00:13:07]                 │ debg TestSubjects.click(superDatePickerToggleQuickMenuButton)
[00:13:07]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:13:07]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:13:08]                 │ debg TestSubjects.getAttribute(superDatePickerRefreshIntervalInput, value)
[00:13:08]                 │ debg TestSubjects.find(superDatePickerRefreshIntervalInput)
[00:13:08]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerRefreshIntervalInput"]') with timeout=10000
[00:13:08]                 │ debg TestSubjects.find(superDatePickerRefreshIntervalUnitsSelect)
[00:13:08]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerRefreshIntervalUnitsSelect"]') with timeout=10000
[00:13:08]                 │ debg Find.allDescendantDisplayedByCssSelector('option')
[00:13:08]                 │ debg TestSubjects.getVisibleText(superDatePickerToggleRefreshButton)
[00:13:08]                 │ debg TestSubjects.find(superDatePickerToggleRefreshButton)
[00:13:08]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerToggleRefreshButton"]') with timeout=10000
[00:13:08]                 │ debg pause auto refresh
[00:13:08]                 │ debg TestSubjects.click(superDatePickerToggleRefreshButton)
[00:13:08]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerToggleRefreshButton"]') with timeout=10000
[00:13:08]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerToggleRefreshButton"]') with timeout=10000
[00:13:08]                 │ debg closeQuickSelectTimeMenu
[00:13:08]                 │ debg TestSubjects.exists(superDatePickerQuickMenu)
[00:13:08]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerQuickMenu"]') with timeout=2500
[00:13:08]                 │ debg closing quick select menu
[00:13:08]                 │ debg TestSubjects.click(superDatePickerToggleQuickMenuButton)
[00:13:08]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:13:08]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:13:08]                 │ debg closeQuickSelectTimeMenu
[00:13:08]                 │ debg TestSubjects.exists(superDatePickerQuickMenu)
[00:13:08]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerQuickMenu"]') with timeout=2500
[00:13:08]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerQuickMenu"] is not displayed
[00:13:11]                 │ debg --- retry.tryForTime failed again with the same message...
[00:13:12]                 │ debg Setting absolute range to Oct 6, 2017 @ 19:53:06.748 to Oct 6, 2017 @ 20:15:30.212
[00:13:12]                 │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:13:12]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:13:12]                 │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:13:12]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:13:12]                 │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:13:12]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:13:12]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:13:12]                 │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:13:12]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:13:12]                 │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:13:12]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:13:12]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:13:12]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:13:12]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:13:12]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:13:12]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:13:12]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:13:12]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:13:12]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:13:12]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Oct 6, 2017 @ 20:15:30.212)
[00:13:12]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:13:12]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:13:12]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:13:13]                 │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:13:13]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:13:13]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:13:13]                 │ debg Find.waitForElementStale with timeout=10000
[00:13:13]                 │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:13:13]                 │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:13:13]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:13:13]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:13:13]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:13:13]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:13:13]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:13:13]                 │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Oct 6, 2017 @ 19:53:06.748)
[00:13:13]                 │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:13:13]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:13:13]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:13:13]                 │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:13:13]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:13:16]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:13:16]                 │ debg TestSubjects.click(querySubmitButton)
[00:13:16]                 │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:13:16]                 │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:13:17]                 │ debg Find.waitForElementStale with timeout=10000
[00:13:17]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:13:17]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:14:57]                 │ info Taking screenshot "/dev/shm/workspace/parallel/20/kibana/x-pack/test/functional/screenshots/failure/Monitoring app Elasticsearch index detail Deleted Index _before all_ hook.png"
[00:14:57]                 │ info Current URL is: http://localhost:61201/app/monitoring#/home?_g=(cluster_uuid:%271LYuyvCCQFS3FAO_h65PQw%27,refreshInterval:(pause:!t,value:10000),time:(from:%272017-10-06T19:53:06.748Z%27,to:%272017-10-06T20:15:30.212Z%27))
[00:14:57]                 │ info Saving page source to: /dev/shm/workspace/parallel/20/kibana/x-pack/test/functional/failure_debug/html/Monitoring app Elasticsearch index detail Deleted Index _before all_ hook.html
[00:14:57]                 └- ✖ fail: Monitoring app Elasticsearch index detail Deleted Index "before all" hook for "should have an index summary with NA for deleted index"
[00:14:57]                 │      Error: expected testSubject(globalLoadingIndicator-hidden) to exist
[00:14:57]                 │       at TestSubjects.existOrFail (/dev/shm/workspace/parallel/20/kibana/test/functional/services/common/test_subjects.ts:62:15)
[00:14:57]                 │       at process._tickCallback (internal/process/next_tick.js:68:7)
[00:14:57]                 │ 
[00:14:57]                 │ 

Stack Trace

Error: expected testSubject(globalLoadingIndicator-hidden) to exist
    at TestSubjects.existOrFail (/dev/shm/workspace/parallel/20/kibana/test/functional/services/common/test_subjects.ts:62:15)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Metrics [docs]

✅ unchanged

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

@nchaulet nchaulet merged commit 3204bac into elastic:7.10 Oct 21, 2020
@nchaulet nchaulet deleted the backport/7.10/pr-81236 branch October 21, 2020 11:22
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