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

Hybrid index pattern test #43498

Merged
merged 64 commits into from
Oct 18, 2019
Merged

Conversation

cuff-links
Copy link
Contributor

@cuff-links cuff-links commented Aug 16, 2019

Fixes #41946
Fixes #43559

Have a few items to address.

For this test we are going to

  • Load data via ES API
  • Create Rollup Job for Kibana to recognize rollup data and add rollup index pattern option
  • Create hybrid index (which includes rollup index and other indices) via UI.
  • Verify hits in discover.

@cuff-links cuff-links added the release_note:skip Skip the PR/issue when compiling release notes label Aug 16, 2019
@elasticmachine
Copy link
Contributor

💔 Build Failed

John Dorlus added 2 commits August 26, 2019 13:59
…fied data for the rollups to use a simple data structure rather than using makelogs.
…o wait for the rollup to run. Added future data to be rolled into hybrid index pattern. Added some custom handling for creating different types of index patterns.
@elasticmachine
Copy link
Contributor

💔 Build Failed

…e dropdown due to rollup data being present and to handle that case. Changed assertion for rollup job test to ensure that there is one index created with the proper name from the rollup job. Made adjustment to cron expression to run every 10 seconds. Added deletion clauses for all rollup jobs, index patterns and indices to ensure proper teardown.
@elasticmachine
Copy link
Contributor

💔 Build Failed

…Pattern_Test

# Conflicts:
#	x-pack/test/functional/page_objects/index_management_page.ts
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cuff-links
Copy link
Contributor Author

retest

@cuff-links
Copy link
Contributor Author

jenkins test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cuff-links
Copy link
Contributor Author

retest

@cuff-links
Copy link
Contributor Author

jenkins test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cuff-links cuff-links dismissed LeeDr’s stale review October 15, 2019 21:32

Made all requested changes.

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Do we need the hamlet/data.json file? it's not clear where it's being used so I wonder if it's being used at all.

In addition to my new comments, there are two unaddressed comments from my original review:

John Dorlus added 2 commits October 16, 2019 12:23
…was created. Some refactorings. Changed Math.floor() to Date.now() for avoidance of name collisions.
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cuff-links
Copy link
Contributor Author

jenkins test this

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Good work @cuff-links! I had a number of suggestions and nits that I suggest you address but nothing worth blocking this on.


await PageObjects.settings.clickKibanaIndexPatterns();
const indexPatternList = await PageObjects.settings.getIndexPatternList();
expect(indexPatternList.length).to.be(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why aren't we looking for the specific name of the index pattern we created? It's a bit of an edge case, but I'm thinking that this test can pass even if we fail to create the index pattern, as long as some other test has created an index pattern.

x-pack/test/functional/apps/rollup_job/rollup_jobs.js Outdated Show resolved Hide resolved
x-pack/test/functional/apps/rollup_job/rollup_jobs.js Outdated Show resolved Hide resolved
@elasticmachine
Copy link
Contributor

💔 Build Failed

@cuff-links
Copy link
Contributor Author

jenkins test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cuff-links
Copy link
Contributor Author

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

💔 Build Failed

@cuff-links
Copy link
Contributor Author

Test failure is not related to changes made.

@cuff-links cuff-links merged commit 7cdd0b2 into elastic:master Oct 18, 2019
cuff-links pushed a commit to cuff-links/kibana that referenced this pull request Oct 24, 2019
* Added 5 second sleep to let thte page load before checking for title.

* Made changes to Rollups page object, added data test subjects to some elements, added function to get Indices to indexmanagement page.

* Removed 5 second wait from old commit,

* Updated home page for a more simplified create rollups method. Simplified data for the rollups to use a simple data structure rather than using makelogs.

* Added stop to the previous rollup job that ran. Added some timeouts to wait for the rollup to run. Added future data to be rolled into hybrid index pattern. Added some custom handling for creating different types of index patterns.

* Added forking condition for if the create index pattern button has the dropdown due to rollup data being present and to handle that case. Changed assertion for rollup job test to ensure that there is one index created with the proper name from the rollup job. Made adjustment to cron expression to run every 10 seconds. Added deletion clauses for all rollup jobs, index patterns and indices to ensure proper teardown.

* Added navigate to the discover page and verify the number of hits.

* Fixed assertion: Not supposed to contain hits.

* Fixing the button that's being searched for.

* Made adjustment to setings page due to test failures.

* Made adjustment to setings page due to test failures.

* Made a change to the order of the parameters for createIndexPattern which was causing non rollup index patterns to break. Also added new conditional and function to click on rollup index pattern button.

* Changed ciGroup and also added logging statements to rollup jobs test.

* Trying an additional wait to see if there is a race condition.

* Changed timing of when rollup job is stopped. It was getting stopped before having triggered.

* Added  waitlogic for condition rather than hardcoded skeep. Used cheerio methods to parse table instead of bluebird's map async. Updated tests assertiuons to ensure the rollup has triggered and produced the right number of documents. Tested many times with Throttling and headless mode enabled.

* Returned the method reloadIndicesButton back to the page object instead of modifying it.

* Changed CI job to run test repeatedly.

* Forgot some script omissions.

* Reverting the script changes. Did not work.

* Readded config to run tests repeatedly per Dima.

* Added additional config for running CI tests.

* Fixed config error.

* Removed extra rollup cration step.

* Made edits per review and added some comments to clarify functions purposes.

* Added explanation of assertion and change that the rollup_info file was renamed.

* Adjusted assertion to compensate for CI's slow network.

* Split the hybrid index pattern test out and rollup job to be in separate files. Mocked out rollups and cleaned up log statements.

* Added load empty kibana to reset kibana to an empty state.

* Removed duplicate file and move method over from it. Updated references.

* Renamed test suite to hybrid index pattern as that's what the test entails

* Fixed missed reference rename.

* Fixed mistaken async keyword causing unhandled rejection error. Also deleted rollup job in hybrid index pattern test in after hook. Renoved log statements.

* Reverted changes to build scripts to normal.

* Fixed jobs file to match upstream due to a missed fix in a merge conflict.

* Added remainder of CI groups to job.

* Removed whitespace error.

* Made fixes per CJs review. Fixed clashing variable names. Reverted rollup job test to assert using rollups table. Changed group back to ciGroup1. Removed duplicate teardown index deletion calls.

* Created more concrete assertion for checking if hybrid index pattern was created. Some refactorings. Changed Math.floor() to Date.now() for avoidance of name collisions.

* Removed the data.json file.

* Addressed nits.
alisonelizabeth pushed a commit to alisonelizabeth/kibana that referenced this pull request Oct 24, 2019
* Added 5 second sleep to let thte page load before checking for title.

* Made changes to Rollups page object, added data test subjects to some elements, added function to get Indices to indexmanagement page.

* Removed 5 second wait from old commit,

* Updated home page for a more simplified create rollups method. Simplified data for the rollups to use a simple data structure rather than using makelogs.

* Added stop to the previous rollup job that ran. Added some timeouts to wait for the rollup to run. Added future data to be rolled into hybrid index pattern. Added some custom handling for creating different types of index patterns.

* Added forking condition for if the create index pattern button has the dropdown due to rollup data being present and to handle that case. Changed assertion for rollup job test to ensure that there is one index created with the proper name from the rollup job. Made adjustment to cron expression to run every 10 seconds. Added deletion clauses for all rollup jobs, index patterns and indices to ensure proper teardown.

* Added navigate to the discover page and verify the number of hits.

* Fixed assertion: Not supposed to contain hits.

* Fixing the button that's being searched for.

* Made adjustment to setings page due to test failures.

* Made adjustment to setings page due to test failures.

* Made a change to the order of the parameters for createIndexPattern which was causing non rollup index patterns to break. Also added new conditional and function to click on rollup index pattern button.

* Changed ciGroup and also added logging statements to rollup jobs test.

* Trying an additional wait to see if there is a race condition.

* Changed timing of when rollup job is stopped. It was getting stopped before having triggered.

* Added  waitlogic for condition rather than hardcoded skeep. Used cheerio methods to parse table instead of bluebird's map async. Updated tests assertiuons to ensure the rollup has triggered and produced the right number of documents. Tested many times with Throttling and headless mode enabled.

* Returned the method reloadIndicesButton back to the page object instead of modifying it.

* Changed CI job to run test repeatedly.

* Forgot some script omissions.

* Reverting the script changes. Did not work.

* Readded config to run tests repeatedly per Dima.

* Added additional config for running CI tests.

* Fixed config error.

* Removed extra rollup cration step.

* Made edits per review and added some comments to clarify functions purposes.

* Added explanation of assertion and change that the rollup_info file was renamed.

* Adjusted assertion to compensate for CI's slow network.

* Split the hybrid index pattern test out and rollup job to be in separate files. Mocked out rollups and cleaned up log statements.

* Added load empty kibana to reset kibana to an empty state.

* Removed duplicate file and move method over from it. Updated references.

* Renamed test suite to hybrid index pattern as that's what the test entails

* Fixed missed reference rename.

* Fixed mistaken async keyword causing unhandled rejection error. Also deleted rollup job in hybrid index pattern test in after hook. Renoved log statements.

* Reverted changes to build scripts to normal.

* Fixed jobs file to match upstream due to a missed fix in a merge conflict.

* Added remainder of CI groups to job.

* Removed whitespace error.

* Made fixes per CJs review. Fixed clashing variable names. Reverted rollup job test to assert using rollups table. Changed group back to ciGroup1. Removed duplicate teardown index deletion calls.

* Created more concrete assertion for checking if hybrid index pattern was created. Some refactorings. Changed Math.floor() to Date.now() for avoidance of name collisions.

* Removed the data.json file.

* Addressed nits.
@elasticmachine
Copy link
Contributor

💔 Build Failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes test-matrix Use this label to ensure PRs are tested with matrix jobs v8.0.0
Projects
None yet
5 participants