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

[Workplace Search] Migrate Objects and assets from Source settings to Synchronization section #113982

Merged

Conversation

scottybollinger
Copy link
Contributor

@scottybollinger scottybollinger commented Oct 5, 2021

closes https://github.com/elastic/workplace-search-team/issues/2041
closes https://github.com/elastic/workplace-search-team/issues/2059

Summary

This PR is part of adding Sync Scheduling to the Workplace Search admin dashboard. This PR:

  1. Moves 'Objects and assets' from Settings section to new sub-nav item for Sync.
  2. Wires up the main toggle for enabling synchronization
  3. Wires up a fallback when nextStart is in the past

Not done

  • Placeholder copy in place for descriptions
  • TODOs for link hrefs
  • 100% unit test coverage. Stubbed out methods will be replaced with Kea actions and tested later
  • a11y testing. Will do this once the entire feature is wired up
2021-10-05_12-57-00.mp4

Checklist

We have to set the source from the sync logic file and this naming makes more sense
Because we have a child logic file, SynchronizationLogic, we have to pass the content source into it for reading its values from SourceLogic. There are 3 ways to do this:

1. Access the source directly at SourceLogic.values.contentSource
  - This how we normally do it. The problem here is that SourceLogic is not mounted when the default values are set in the reducers. This caused the UI to break and I could not find a way to safely mount SourceLogic before this logic file needed it.

2. Use the connect property and connect to Sourcelogic to access contentSource
  - This actually worked great but our test helper does not work well with it and after an hour or so trying to make it work, I punted and decided to go with #3 below.

3. Pass the contentSource as a prop
  - This works great and is easy to test. The only drawback is that all other components that use the SynchronizationLogic file have to also pass in the content source. This commit does just that.
This is slightly beyond the scope of this PR but trying to make the final PR more manageable.

There is an edge case where a running job lists the nextStart in the past if it is is running. After a lengthy Slack convo, it was decided to catch these in the UI and show a fallback string instead of something like “Next run 3 hours ago”
From previous PR feedback
@scottybollinger scottybollinger added release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated: Automatically backport this PR after it's merged v7.16.0 labels Oct 5, 2021
@scottybollinger scottybollinger requested a review from a team as a code owner October 5, 2021 17:59
Copy link
Contributor

@yakhinvadim yakhinvadim left a comment

Choose a reason for hiding this comment

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

LGTM! Just 1 minor typo:

@@ -711,3 +711,17 @@ export const SYNC_DISABLED_MESSAGE = i18n.translate(
defaultMessage: 'Source synchronization disabled.',
}
);

export const SYNC_SETTINGS_UPDATED_MESSAGE = i18n.translate(
'xpack.enterpriseSearch.workplaceSearch.sources.sync_settings_updated_message',
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably use camelCase here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch!

@scottybollinger scottybollinger enabled auto-merge (squash) October 5, 2021 19:08
@scottybollinger scottybollinger merged commit 43588b5 into elastic:master Oct 5, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 5, 2021
… Synchronization section (elastic#113982)

* Rename method

We have to set the source from the sync logic file and this naming makes more sense

* Wire up Enable Synchronization toggle

* Remove sync controls from source settings

* Refactor to pass in contentSource as prop

Because we have a child logic file, SynchronizationLogic, we have to pass the content source into it for reading its values from SourceLogic. There are 3 ways to do this:

1. Access the source directly at SourceLogic.values.contentSource
  - This how we normally do it. The problem here is that SourceLogic is not mounted when the default values are set in the reducers. This caused the UI to break and I could not find a way to safely mount SourceLogic before this logic file needed it.

2. Use the connect property and connect to Sourcelogic to access contentSource
  - This actually worked great but our test helper does not work well with it and after an hour or so trying to make it work, I punted and decided to go with elastic#3 below.

3. Pass the contentSource as a prop
  - This works great and is easy to test. The only drawback is that all other components that use the SynchronizationLogic file have to also pass in the content source. This commit does just that.

* Add logic for Objects and assets view

* Add content to Objects and assets view

* Add fallback for `nextStart` that is in the past

This is slightly beyond the scope of this PR but trying to make the final PR more manageable.

There is an edge case where a running job lists the nextStart in the past if it is is running. After a lengthy Slack convo, it was decided to catch these in the UI and show a fallback string instead of something like “Next run 3 hours ago”

* reduce -> map

From previous PR feedback

* Fix casing on i18n ID
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Oct 5, 2021
… Synchronization section (#113982) (#114015)

* Rename method

We have to set the source from the sync logic file and this naming makes more sense

* Wire up Enable Synchronization toggle

* Remove sync controls from source settings

* Refactor to pass in contentSource as prop

Because we have a child logic file, SynchronizationLogic, we have to pass the content source into it for reading its values from SourceLogic. There are 3 ways to do this:

1. Access the source directly at SourceLogic.values.contentSource
  - This how we normally do it. The problem here is that SourceLogic is not mounted when the default values are set in the reducers. This caused the UI to break and I could not find a way to safely mount SourceLogic before this logic file needed it.

2. Use the connect property and connect to Sourcelogic to access contentSource
  - This actually worked great but our test helper does not work well with it and after an hour or so trying to make it work, I punted and decided to go with #3 below.

3. Pass the contentSource as a prop
  - This works great and is easy to test. The only drawback is that all other components that use the SynchronizationLogic file have to also pass in the content source. This commit does just that.

* Add logic for Objects and assets view

* Add content to Objects and assets view

* Add fallback for `nextStart` that is in the past

This is slightly beyond the scope of this PR but trying to make the final PR more manageable.

There is an edge case where a running job lists the nextStart in the past if it is is running. After a lengthy Slack convo, it was decided to catch these in the UI and show a fallback string instead of something like “Next run 3 hours ago”

* reduce -> map

From previous PR feedback

* Fix casing on i18n ID

Co-authored-by: Scotty Bollinger <scotty.bollinger@elastic.co>
ecezalp pushed a commit to ecezalp/kibana that referenced this pull request Oct 6, 2021
… Synchronization section (elastic#113982)

* Rename method

We have to set the source from the sync logic file and this naming makes more sense

* Wire up Enable Synchronization toggle

* Remove sync controls from source settings

* Refactor to pass in contentSource as prop

Because we have a child logic file, SynchronizationLogic, we have to pass the content source into it for reading its values from SourceLogic. There are 3 ways to do this:

1. Access the source directly at SourceLogic.values.contentSource
  - This how we normally do it. The problem here is that SourceLogic is not mounted when the default values are set in the reducers. This caused the UI to break and I could not find a way to safely mount SourceLogic before this logic file needed it.

2. Use the connect property and connect to Sourcelogic to access contentSource
  - This actually worked great but our test helper does not work well with it and after an hour or so trying to make it work, I punted and decided to go with elastic#3 below.

3. Pass the contentSource as a prop
  - This works great and is easy to test. The only drawback is that all other components that use the SynchronizationLogic file have to also pass in the content source. This commit does just that.

* Add logic for Objects and assets view

* Add content to Objects and assets view

* Add fallback for `nextStart` that is in the past

This is slightly beyond the scope of this PR but trying to make the final PR more manageable.

There is an edge case where a running job lists the nextStart in the past if it is is running. After a lengthy Slack convo, it was decided to catch these in the UI and show a fallback string instead of something like “Next run 3 hours ago”

* reduce -> map

From previous PR feedback

* Fix casing on i18n ID
@kibanamachine
Copy link
Contributor

kibanamachine commented Oct 11, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/index_lifecycle_management/home_page·ts.Index Lifecycle Management app Home page Create new policy with all Phases

Link to Jenkins

Standard Out

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

[00:00:00]     │
[00:57:04]       └-: Index Lifecycle Management app
[00:57:04]         └-> "before all" hook in "Index Lifecycle Management app"
[00:57:33]         └-: Home page
[00:57:33]           └-> "before all" hook for "Loads the app"
[00:57:33]           └-> "before all" hook for "Loads the app"
[00:57:33]             │ debg navigating to indexLifecycleManagement url: http://localhost:6171/app/management/data/index_lifecycle_management
[00:57:33]             │ debg navigate to: http://localhost:6171/app/management/data/index_lifecycle_management
[00:57:34]             │ debg browser[INFO] http://localhost:6171/app/management/data/index_lifecycle_management?_t=1633975150055 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:57:34]             │
[00:57:34]             │ debg browser[INFO] http://localhost:6171/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:57:34]             │ debg ... sleep(700) start
[00:57:35]             │ debg ... sleep(700) end
[00:57:35]             │ debg returned from get, calling refresh
[00:57:36]             │ debg browser[INFO] http://localhost:6171/app/management/data/index_lifecycle_management?_t=1633975150055 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:57:36]             │
[00:57:36]             │ debg browser[INFO] http://localhost:6171/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:57:36]             │ debg currentUrl = http://localhost:6171/app/management/data/index_lifecycle_management
[00:57:36]             │          appUrl = http://localhost:6171/app/management/data/index_lifecycle_management
[00:57:36]             │ debg TestSubjects.find(kibanaChrome)
[00:57:36]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:57:36]             │ debg ... sleep(501) start
[00:57:37]             │ debg ... sleep(501) end
[00:57:37]             │ debg in navigateTo url = http://localhost:6171/app/management/data/index_lifecycle_management/policies
[00:57:37]             │ debg --- retry.tryForTime error: URL changed, waiting for it to settle
[00:57:37]             │ debg ... sleep(501) start
[00:57:38]             │ debg ... sleep(501) end
[00:57:38]             │ debg in navigateTo url = http://localhost:6171/app/management/data/index_lifecycle_management/policies
[00:57:38]           └-> Loads the app
[00:57:38]             └-> "before each" hook: global before each for "Loads the app"
[00:57:38]             │ debg Checking for page header
[00:57:38]             │ debg TestSubjects.getVisibleText(ilmPageHeader)
[00:57:38]             │ debg TestSubjects.find(ilmPageHeader)
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="ilmPageHeader"]') with timeout=10000
[00:57:38]             │ debg TestSubjects.find(createPolicyButton)
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="createPolicyButton"]') with timeout=10000
[00:57:38]             └- ✓ pass  (62ms) "Index Lifecycle Management app Home page Loads the app"
[00:57:38]           └-> Create new policy with all Phases
[00:57:38]             └-> "before each" hook: global before each for "Create new policy with all Phases"
[00:57:38]             │ debg TestSubjects.click(createPolicyButton)
[00:57:38]             │ debg Find.clickByCssSelector('[data-test-subj="createPolicyButton"]') with timeout=10000
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="createPolicyButton"]') with timeout=10000
[00:57:38]             │ debg TestSubjects.setValue(policyNameField, testPolicy1)
[00:57:38]             │ debg TestSubjects.click(policyNameField)
[00:57:38]             │ debg Find.clickByCssSelector('[data-test-subj="policyNameField"]') with timeout=10000
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="policyNameField"]') with timeout=10000
[00:57:38]             │ debg TestSubjects.click(enablePhaseSwitch-warm)
[00:57:38]             │ debg Find.clickByCssSelector('[data-test-subj="enablePhaseSwitch-warm"]') with timeout=10000
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="enablePhaseSwitch-warm"]') with timeout=10000
[00:57:38]             │ debg TestSubjects.setValue(warm-selectedMinimumAge, 10)
[00:57:38]             │ debg TestSubjects.click(warm-selectedMinimumAge)
[00:57:38]             │ debg Find.clickByCssSelector('[data-test-subj="warm-selectedMinimumAge"]') with timeout=10000
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="warm-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.click(enablePhaseSwitch-cold)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="enablePhaseSwitch-cold"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="enablePhaseSwitch-cold"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.setValue(cold-selectedMinimumAge, 15)
[00:57:39]             │ debg TestSubjects.click(cold-selectedMinimumAge)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="cold-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="cold-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.click(enablePhaseSwitch-frozen)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="enablePhaseSwitch-frozen"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="enablePhaseSwitch-frozen"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.setValue(frozen-selectedMinimumAge, 20)
[00:57:39]             │ debg TestSubjects.click(frozen-selectedMinimumAge)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="frozen-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="frozen-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.setValue(searchableSnapshotCombobox, test)
[00:57:39]             │ debg TestSubjects.click(searchableSnapshotCombobox)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="searchableSnapshotCombobox"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="searchableSnapshotCombobox"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.click(enableDeletePhaseButton)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="enableDeletePhaseButton"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="enableDeletePhaseButton"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.click(savePolicyButton)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="savePolicyButton"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="savePolicyButton"]') with timeout=10000
[00:57:40]             │ debg Waiting up to 20000ms for navigation back to home page....
[00:57:40]             │ debg TestSubjects.getVisibleText(ilmPageHeader)
[00:57:40]             │ debg TestSubjects.find(ilmPageHeader)
[00:57:40]             │ debg Find.findByCssSelector('[data-test-subj="ilmPageHeader"]') with timeout=10000
[00:57:50]             │ debg --- retry.waitFor error: Waiting for element to be located By(css selector, [data-test-subj="ilmPageHeader"])
[00:57:50]             │      Wait timed out after 10007ms
[00:57:50]             │ERROR browser[SEVERE] http://localhost:6171/api/index_lifecycle_management/policies - Failed to load resource: the server responded with a status of 400 (Bad Request)
[00:57:50]             │ debg TestSubjects.getVisibleText(ilmPageHeader)
[00:57:50]             │ debg TestSubjects.find(ilmPageHeader)
[00:57:50]             │ debg Find.findByCssSelector('[data-test-subj="ilmPageHeader"]') with timeout=10000
[00:58:00]             │ debg --- retry.waitFor error: Waiting for element to be located By(css selector, [data-test-subj="ilmPageHeader"])
[00:58:00]             │      Wait timed out after 10021ms
[00:58:01]             │ info Taking screenshot "/dev/shm/workspace/parallel/7/kibana/x-pack/test/functional/screenshots/failure/Index Lifecycle Management app Home page Create new policy with all Phases.png"
[00:58:01]             │ info Current URL is: http://localhost:6171/app/management/data/index_lifecycle_management/policies/edit
[00:58:01]             │ info Saving page source to: /dev/shm/workspace/parallel/7/kibana/x-pack/test/functional/failure_debug/html/Index Lifecycle Management app Home page Create new policy with all Phases.html
[00:58:01]             └- ✖ fail: Index Lifecycle Management app Home page Create new policy with all Phases
[00:58:01]             │      Error: timed out waiting for navigation back to home page. -- last error: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="ilmPageHeader"])
[00:58:01]             │ Wait timed out after 10021ms
[00:58:01]             │     at /dev/shm/workspace/parallel/7/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:58:01]             │     at runMicrotasks (<anonymous>)
[00:58:01]             │     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:58:01]             │       at onFailure (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry_for_truthy.ts:39:13)
[00:58:01]             │       at retryForSuccess (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry_for_success.ts:57:13)
[00:58:01]             │       at retryForTruthy (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry_for_truthy.ts:27:3)
[00:58:01]             │       at RetryService.waitFor (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry.ts:59:5)
[00:58:01]             │       at Context.<anonymous> (test/functional/apps/index_lifecycle_management/home_page.ts:46:7)
[00:58:01]             │       at Object.apply (/dev/shm/workspace/parallel/7/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
[00:58:01]             │ 
[00:58:01]             │ 

Stack Trace

Error: timed out waiting for navigation back to home page. -- last error: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="ilmPageHeader"])
Wait timed out after 10021ms
    at /dev/shm/workspace/parallel/7/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/7/kibana/test/common/services/retry/retry_for_truthy.ts:39:13)
    at retryForSuccess (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry_for_success.ts:57:13)
    at retryForTruthy (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry_for_truthy.ts:27:3)
    at RetryService.waitFor (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry.ts:59:5)
    at Context.<anonymous> (test/functional/apps/index_lifecycle_management/home_page.ts:46:7)
    at Object.apply (/dev/shm/workspace/parallel/7/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

Kibana Pipeline / general / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/index_lifecycle_management/home_page·ts.Index Lifecycle Management app Home page "after all" hook for "Create new policy with all Phases"

Link to Jenkins

Standard Out

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

[00:00:00]     │
[00:57:04]       └-: Index Lifecycle Management app
[00:57:04]         └-> "before all" hook in "Index Lifecycle Management app"
[00:57:33]         └-: Home page
[00:57:33]           └-> "before all" hook for "Loads the app"
[00:57:33]           └-> "before all" hook for "Loads the app"
[00:57:33]             │ debg navigating to indexLifecycleManagement url: http://localhost:6171/app/management/data/index_lifecycle_management
[00:57:33]             │ debg navigate to: http://localhost:6171/app/management/data/index_lifecycle_management
[00:57:34]             │ debg browser[INFO] http://localhost:6171/app/management/data/index_lifecycle_management?_t=1633975150055 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:57:34]             │
[00:57:34]             │ debg browser[INFO] http://localhost:6171/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:57:34]             │ debg ... sleep(700) start
[00:57:35]             │ debg ... sleep(700) end
[00:57:35]             │ debg returned from get, calling refresh
[00:57:36]             │ debg browser[INFO] http://localhost:6171/app/management/data/index_lifecycle_management?_t=1633975150055 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:57:36]             │
[00:57:36]             │ debg browser[INFO] http://localhost:6171/bootstrap.js 41:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:57:36]             │ debg currentUrl = http://localhost:6171/app/management/data/index_lifecycle_management
[00:57:36]             │          appUrl = http://localhost:6171/app/management/data/index_lifecycle_management
[00:57:36]             │ debg TestSubjects.find(kibanaChrome)
[00:57:36]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:57:36]             │ debg ... sleep(501) start
[00:57:37]             │ debg ... sleep(501) end
[00:57:37]             │ debg in navigateTo url = http://localhost:6171/app/management/data/index_lifecycle_management/policies
[00:57:37]             │ debg --- retry.tryForTime error: URL changed, waiting for it to settle
[00:57:37]             │ debg ... sleep(501) start
[00:57:38]             │ debg ... sleep(501) end
[00:57:38]             │ debg in navigateTo url = http://localhost:6171/app/management/data/index_lifecycle_management/policies
[00:57:38]           └-> Loads the app
[00:57:38]             └-> "before each" hook: global before each for "Loads the app"
[00:57:38]             │ debg Checking for page header
[00:57:38]             │ debg TestSubjects.getVisibleText(ilmPageHeader)
[00:57:38]             │ debg TestSubjects.find(ilmPageHeader)
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="ilmPageHeader"]') with timeout=10000
[00:57:38]             │ debg TestSubjects.find(createPolicyButton)
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="createPolicyButton"]') with timeout=10000
[00:57:38]             └- ✓ pass  (62ms) "Index Lifecycle Management app Home page Loads the app"
[00:57:38]           └-> Create new policy with all Phases
[00:57:38]             └-> "before each" hook: global before each for "Create new policy with all Phases"
[00:57:38]             │ debg TestSubjects.click(createPolicyButton)
[00:57:38]             │ debg Find.clickByCssSelector('[data-test-subj="createPolicyButton"]') with timeout=10000
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="createPolicyButton"]') with timeout=10000
[00:57:38]             │ debg TestSubjects.setValue(policyNameField, testPolicy1)
[00:57:38]             │ debg TestSubjects.click(policyNameField)
[00:57:38]             │ debg Find.clickByCssSelector('[data-test-subj="policyNameField"]') with timeout=10000
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="policyNameField"]') with timeout=10000
[00:57:38]             │ debg TestSubjects.click(enablePhaseSwitch-warm)
[00:57:38]             │ debg Find.clickByCssSelector('[data-test-subj="enablePhaseSwitch-warm"]') with timeout=10000
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="enablePhaseSwitch-warm"]') with timeout=10000
[00:57:38]             │ debg TestSubjects.setValue(warm-selectedMinimumAge, 10)
[00:57:38]             │ debg TestSubjects.click(warm-selectedMinimumAge)
[00:57:38]             │ debg Find.clickByCssSelector('[data-test-subj="warm-selectedMinimumAge"]') with timeout=10000
[00:57:38]             │ debg Find.findByCssSelector('[data-test-subj="warm-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.click(enablePhaseSwitch-cold)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="enablePhaseSwitch-cold"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="enablePhaseSwitch-cold"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.setValue(cold-selectedMinimumAge, 15)
[00:57:39]             │ debg TestSubjects.click(cold-selectedMinimumAge)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="cold-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="cold-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.click(enablePhaseSwitch-frozen)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="enablePhaseSwitch-frozen"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="enablePhaseSwitch-frozen"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.setValue(frozen-selectedMinimumAge, 20)
[00:57:39]             │ debg TestSubjects.click(frozen-selectedMinimumAge)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="frozen-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="frozen-selectedMinimumAge"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.setValue(searchableSnapshotCombobox, test)
[00:57:39]             │ debg TestSubjects.click(searchableSnapshotCombobox)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="searchableSnapshotCombobox"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="searchableSnapshotCombobox"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.click(enableDeletePhaseButton)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="enableDeletePhaseButton"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="enableDeletePhaseButton"]') with timeout=10000
[00:57:39]             │ debg TestSubjects.click(savePolicyButton)
[00:57:39]             │ debg Find.clickByCssSelector('[data-test-subj="savePolicyButton"]') with timeout=10000
[00:57:39]             │ debg Find.findByCssSelector('[data-test-subj="savePolicyButton"]') with timeout=10000
[00:57:40]             │ debg Waiting up to 20000ms for navigation back to home page....
[00:57:40]             │ debg TestSubjects.getVisibleText(ilmPageHeader)
[00:57:40]             │ debg TestSubjects.find(ilmPageHeader)
[00:57:40]             │ debg Find.findByCssSelector('[data-test-subj="ilmPageHeader"]') with timeout=10000
[00:57:50]             │ debg --- retry.waitFor error: Waiting for element to be located By(css selector, [data-test-subj="ilmPageHeader"])
[00:57:50]             │      Wait timed out after 10007ms
[00:57:50]             │ERROR browser[SEVERE] http://localhost:6171/api/index_lifecycle_management/policies - Failed to load resource: the server responded with a status of 400 (Bad Request)
[00:57:50]             │ debg TestSubjects.getVisibleText(ilmPageHeader)
[00:57:50]             │ debg TestSubjects.find(ilmPageHeader)
[00:57:50]             │ debg Find.findByCssSelector('[data-test-subj="ilmPageHeader"]') with timeout=10000
[00:58:00]             │ debg --- retry.waitFor error: Waiting for element to be located By(css selector, [data-test-subj="ilmPageHeader"])
[00:58:00]             │      Wait timed out after 10021ms
[00:58:01]             │ info Taking screenshot "/dev/shm/workspace/parallel/7/kibana/x-pack/test/functional/screenshots/failure/Index Lifecycle Management app Home page Create new policy with all Phases.png"
[00:58:01]             │ info Current URL is: http://localhost:6171/app/management/data/index_lifecycle_management/policies/edit
[00:58:01]             │ info Saving page source to: /dev/shm/workspace/parallel/7/kibana/x-pack/test/functional/failure_debug/html/Index Lifecycle Management app Home page Create new policy with all Phases.html
[00:58:01]             └- ✖ fail: Index Lifecycle Management app Home page Create new policy with all Phases
[00:58:01]             │      Error: timed out waiting for navigation back to home page. -- last error: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="ilmPageHeader"])
[00:58:01]             │ Wait timed out after 10021ms
[00:58:01]             │     at /dev/shm/workspace/parallel/7/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:58:01]             │     at runMicrotasks (<anonymous>)
[00:58:01]             │     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:58:01]             │       at onFailure (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry_for_truthy.ts:39:13)
[00:58:01]             │       at retryForSuccess (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry_for_success.ts:57:13)
[00:58:01]             │       at retryForTruthy (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry_for_truthy.ts:27:3)
[00:58:01]             │       at RetryService.waitFor (/dev/shm/workspace/parallel/7/kibana/test/common/services/retry/retry.ts:59:5)
[00:58:01]             │       at Context.<anonymous> (test/functional/apps/index_lifecycle_management/home_page.ts:46:7)
[00:58:01]             │       at Object.apply (/dev/shm/workspace/parallel/7/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
[00:58:01]             │ 
[00:58:01]             │ 
[00:58:01]           └-> "after all" hook for "Create new policy with all Phases"
[00:58:01]             │ info Taking screenshot "/dev/shm/workspace/parallel/7/kibana/x-pack/test/functional/screenshots/failure/Index Lifecycle Management app Home page _after all_ hook for _Create new policy with all Phases_.png"
[00:58:01]             │ info Current URL is: http://localhost:6171/app/management/data/index_lifecycle_management/policies/edit
[00:58:01]             │ info Saving page source to: /dev/shm/workspace/parallel/7/kibana/x-pack/test/functional/failure_debug/html/Index Lifecycle Management app Home page _after all_ hook for _Create new policy with all Phases_.html
[00:58:01]             └- ✖ fail: Index Lifecycle Management app Home page "after all" hook for "Create new policy with all Phases"
[00:58:01]             │      ResponseError: resource_not_found_exception: [resource_not_found_exception] Reason: Lifecycle policy not found: testPolicy1
[00:58:01]             │       at onBody (/dev/shm/workspace/parallel/7/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:361:23)
[00:58:01]             │       at IncomingMessage.onEnd (/dev/shm/workspace/parallel/7/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:285:11)
[00:58:01]             │       at endReadableNT (internal/streams/readable.js:1317:12)
[00:58:01]             │       at processTicksAndRejections (internal/process/task_queues.js:82:21)
[00:58:01]             │ 
[00:58:01]             │ 

Stack Trace

ResponseError: resource_not_found_exception: [resource_not_found_exception] Reason: Lifecycle policy not found: testPolicy1
    at onBody (/dev/shm/workspace/parallel/7/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:361:23)
    at IncomingMessage.onEnd (/dev/shm/workspace/parallel/7/kibana/node_modules/@elastic/elasticsearch/lib/Transport.js:285:11)
    at endReadableNT (internal/streams/readable.js:1317:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  meta: {
    body: { error: [Object], status: 404 },
    statusCode: 404,
    headers: {
      'x-elastic-product': 'Elasticsearch',
      'content-type': 'application/json;charset=utf-8',
      'content-length': '219'
    },
    meta: {
      context: null,
      request: [Object],
      name: 'elasticsearch-js',
      connection: [Object],
      attempts: 0,
      aborted: false
    }
  }
}

Kibana Pipeline / general / X-Pack API Integration Tests.x-pack/test/api_integration/apis/management/index_lifecycle_management/policies·js.apis management index lifecycle management policies list should add the indices linked to the policies

Link to Jenkins

Standard Out

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

[00:00:00]                 │
[00:00:00]                   └-: apis
[00:00:00]                     └-> "before all" hook in "apis"
[00:06:04]                     └-: management
[00:06:04]                       └-> "before all" hook in "management"
[00:06:29]                       └-: index lifecycle management
[00:06:29]                         └-> "before all" hook in "index lifecycle management"
[00:06:29]                         └-: policies
[00:06:29]                           └-> "before all" hook in "policies"
[00:06:29]                           └-: list
[00:06:29]                             └-> "before all" hook for "should have a default policy to manage the Watcher history indices"
[00:06:29]                             └-> should have a default policy to manage the Watcher history indices
[00:06:29]                               └-> "before each" hook: global before each for "should have a default policy to manage the Watcher history indices"
[00:06:29]                               └- ✓ pass  (21ms) "apis management index lifecycle management policies list should have a default policy to manage the Watcher history indices"
[00:06:29]                             └-> should add the indices linked to the policies
[00:06:29]                               └-> "before each" hook: global before each for "should add the indices linked to the policies"
[00:06:29]                               │ info [o.e.c.m.MetadataCreateIndexService] [node-01] [igvtfekvyyribuihq-1633972507789] creating index, cause [api], templates [], shards [1]/[1]
[00:06:29]                               └- ✖ fail: apis management index lifecycle management policies list should add the indices linked to the policies
[00:06:29]                               │      TypeError: Cannot read property 'indices' of undefined
[00:06:29]                               │       at Context.<anonymous> (test/api_integration/apis/management/index_lifecycle_management/policies.js:72:30)
[00:06:29]                               │       at runMicrotasks (<anonymous>)
[00:06:29]                               │       at processTicksAndRejections (internal/process/task_queues.js:95:5)
[00:06:29]                               │       at Object.apply (/dev/shm/workspace/parallel/13/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)
[00:06:29]                               │ 
[00:06:29]                               │ 

Stack Trace

TypeError: Cannot read property 'indices' of undefined
    at Context.<anonymous> (test/api_integration/apis/management/index_lifecycle_management/policies.js:72:30)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at Object.apply (/dev/shm/workspace/parallel/13/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

and 4 more failures, only showing the first 3.

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 +2.3KB

History

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

@scottybollinger scottybollinger deleted the scottybollinger/sync-sched-2 branch March 15, 2022 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated: Automatically backport this PR after it's merged release_note:skip Skip the PR/issue when compiling release notes v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants