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

[Watcher] Fix flaky functional test #56393

Merged
merged 9 commits into from
Feb 11, 2020

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented Jan 30, 2020

Summary

Fixes #56014 introduced with #54752.

Additional Context

See meta this issue: #55985

Related Issues:

Previous work:

TODOs before review

Currently this PR is still trying to figure out the cause of the flakiness and is not ready to be merged. Consider the current changes all to be tentative (i.e., this should be a draft PR).

@jloleysens jloleysens added Feature:Watcher v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes v7.7.0 labels Jan 30, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@jloleysens jloleysens requested review from sebelga and removed request for sebelga January 30, 2020 15:39
Also only update data (and call serializer) on a success response, not on an error response.
@cuff-links cuff-links self-requested a review January 31, 2020 17:58
@cuff-links
Copy link
Contributor

i appreciate you getting the jump on this issue, @jloleysens.

@@ -35,6 +35,8 @@ export default function({ getService, getPageObjects }) {
await browser.setWindowSize(1600, 1000);
// TODO: Remove the retry.try wrapper once https://github.com/elastic/kibana/issues/55985 is resolved
retry.try(async () => {
// Try to give the license time to come through.
await PageObjects.common.sleep(2000);
Copy link
Contributor

@cuff-links cuff-links Jan 31, 2020

Choose a reason for hiding this comment

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

We need to remove this hard coded sleep. It's been my experience that this sometimes fails in CI. We might want to try using the retry.waitFor() function and figure out a reasonable condition to wait for. We can wait for anything that can return true of false so if we need to wait for a license to be changed or something, we can hit the license API using the ES client. What do you think about that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @cuff-links , that sounds reasonable :)

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

//
// See this issue https://github.com/elastic/kibana/issues/55985 for future resolution.
await retry.waitFor('watcher to display in management UI', async () => {
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi, Jean-Louis. This is looking good so far. You can remove this extra try because retry.waitFor() is just a wrapper function around try. So you don't need the second one. Other than that, we I think we are looking good.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh. Gotcha. I reran the test and you are correct. LGTM.

@jloleysens
Copy link
Contributor Author

jloleysens commented Feb 10, 2020 via email

@cuff-links cuff-links self-requested a review February 11, 2020 00:39
//
// See this issue https://github.com/elastic/kibana/issues/55985 for future resolution.
await retry.waitFor('watcher to display in management UI', async () => {
try {
Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh. Gotcha. I reran the test and you are correct. LGTM.

@cuff-links
Copy link
Contributor

@elasticmachine merge upstream

@jloleysens jloleysens merged commit b67b1c3 into elastic:master Feb 11, 2020
@jloleysens jloleysens deleted the fix/watcher/flaky-test branch February 11, 2020 08:39
jloleysens added a commit to jloleysens/kibana that referenced this pull request Feb 11, 2020
* Give a bit more time for machines on CI

* Remove unnecessary sleep

* Dummy error logs [do not commit to master]

* Revert "Dummy error logs [do not commit to master]"

Also only update data (and call serializer) on a success response, not on an error response.

* Remove common.sleep and rewrite the comment explaining the use of retry.waitFor

* Fix typo

Co-authored-by: Elastic Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

jloleysens added a commit that referenced this pull request Feb 11, 2020
* Give a bit more time for machines on CI

* Remove unnecessary sleep

* Dummy error logs [do not commit to master]

* Revert "Dummy error logs [do not commit to master]"

Also only update data (and call serializer) on a success response, not on an error response.

* Remove common.sleep and rewrite the comment explaining the use of retry.waitFor

* Fix typo

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Watcher release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.7.0 v8.0.0
Projects
None yet
4 participants