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

[QA][refactor] Use ui settings - discover histogram #114997

Merged
merged 2 commits into from
Nov 16, 2021

Conversation

wayneseymour
Copy link
Member

@wayneseymour wayneseymour commented Oct 14, 2021

[skip-ci]

Use ui settings instead of setting absolute range
for timepicker.

Helps with: [meta] [refactor] use ui settings instead of timepicker ui

@wayneseymour wayneseymour added v8.0.0 release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v7.16.0 buildkite-ci labels Oct 14, 2021
@wayneseymour wayneseymour self-assigned this Oct 14, 2021
@wayneseymour wayneseymour changed the title [QA][refactor] Use ui settings - sample data [QA][refactor] Use ui settings - discover histogram Oct 14, 2021
@wayneseymour wayneseymour force-pushed the refactor/timepicker-use-discover-histogram branch 6 times, most recently from 682b64b to 3f73477 Compare October 20, 2021 10:51
@wayneseymour wayneseymour force-pushed the refactor/timepicker-use-discover-histogram branch from 3f73477 to 35fa1b5 Compare October 25, 2021 09:54
@wayneseymour
Copy link
Member Author

Runs fine on my local, so running on the flaky runner 40x:

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/89#fccfee81-8ed6-4fae-bc88-b338b1ae0fec

@wayneseymour
Copy link
Member Author

I noticed the following while debugging this test on my local:

       │ debg browser[WARNING] http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js 4843:20 "Deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.
       │      Arguments:
       │      [0] _isAMomentObject: true, _isUTC: false, _useUTC: false, _l: undefined, _i: Jan 1, 2010 @ 00:00:00.000, _f: undefined, _strict: undefined, _locale: [object Object]
       │      Error
       │          at Function.createFromInputFallback (http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:4880:25)
       │          at configFromString (http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:7097:19)
       │          at configFromInput (http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:7539:13)
       │          at prepareConfig (http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:7522:13)
       │          at createFromConfig (http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:7489:44)
       │          at createLocalOrUTC (http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:7583:16)
       │          at createLocal (http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:7587:16)
       │          at hooks (http://localhost:5620/9007199254740991/bundles/kbn-ui-shared-deps-npm/kbn-ui-shared-deps-npm.dll.js:4577:29)
       │          at Object.parse (http://localhost:5620/9007199254740991/bundles/plugin/data/kibana/data.plugin.js:1042:12)
       │          at validateTimeRange (http://localhost:5620/9007199254740991/bundles/plugin/data/kibana/data.plugin.js:38075:83)"

There are 5 it blocks in this test, and they all have this warning.

This makes sense, because before this pr, the ui was used to set the time.

Without a time format, and in strict mode, the time strings are not valid:
RFC 2822 date time format

With a time format, and in strict mode, they are valid:
Screenshot 2021-10-25 at 12 23 02

I got the correct format from the documentation of setAbsoluteRange in the time_picker page object.
I'll be following up soon.

@wayneseymour
Copy link
Member Author

@wayneseymour
Copy link
Member Author

Seems best to:

  • Investigate whether it's best to format before calling PageObjects.common.setTime({ from, to })
    • since the ui settings call is an http request, I think we'd need to modify a very general request...injecting a condition where it probably should not live

@wayneseymour wayneseymour force-pushed the refactor/timepicker-use-discover-histogram branch from 35fa1b5 to 5542bd5 Compare October 26, 2021 16:29
@wayneseymour
Copy link
Member Author

@wayneseymour wayneseymour force-pushed the refactor/timepicker-use-discover-histogram branch 3 times, most recently from a6f3d42 to 470199e Compare October 29, 2021 10:37
@LeeDr LeeDr added the v8.1.0 label Nov 3, 2021
@wayneseymour wayneseymour force-pushed the refactor/timepicker-use-discover-histogram branch from 470199e to fdab38a Compare November 4, 2021 10:17
@wayneseymour wayneseymour requested a review from LeeDr November 4, 2021 13:52
@wayneseymour wayneseymour marked this pull request as ready for review November 4, 2021 13:52
@wayneseymour wayneseymour requested a review from a team as a code owner November 4, 2021 13:52
@wayneseymour
Copy link
Member Author

ci grp 6 40x

@wayneseymour
Copy link
Member Author

ci grp 6 40x

Hrmm, had one failure

Use ui settings instead of setting absolute range
for timepicker.

Stacked on top of: #114530
@wayneseymour wayneseymour force-pushed the refactor/timepicker-use-discover-histogram branch from 6a058d0 to 76745be Compare November 15, 2021 10:24
@wayneseymour
Copy link
Member Author

wayneseymour commented Nov 15, 2021

40x again: https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/217

@LeeDr update: no failures on that run ^

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Test Failures

  • [job] [logs] Default CI Group #8 / performance reporting dashbaord downloaded PDF has OK status

Metrics [docs]

✅ unchanged

History

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

cc @wayneseymour

@elastic elastic deleted a comment from kibanamachine Nov 15, 2021
Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

Refactoring LGTM, didn't test

@LeeDr
Copy link

LeeDr commented Nov 16, 2021

Not having to do with this PR, but I'm really disappointed in the names of the first 3 tests vs what they are actually verifying. The make changed to the timepicker and then only verify that the chart exists. They don't verify the chart is showing the correct data or any data at all.

@LeeDr LeeDr merged commit d94b656 into main Nov 16, 2021
@LeeDr LeeDr deleted the refactor/timepicker-use-discover-histogram branch November 16, 2021 17:58
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 16, 2021
* [QA][refactor] Use ui settings - discover histogram

Use ui settings instead of setting absolute range
for timepicker.

Stacked on top of: elastic#114530

* Use TimeStrings interface.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Nov 16, 2021
* [QA][refactor] Use ui settings - discover histogram

Use ui settings instead of setting absolute range
for timepicker.

Stacked on top of: elastic#114530

* Use TimeStrings interface.
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
8.0
7.16

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Nov 16, 2021
* [QA][refactor] Use ui settings - discover histogram

Use ui settings instead of setting absolute range
for timepicker.

Stacked on top of: #114530

* Use TimeStrings interface.

Co-authored-by: Tre <[email protected]>
kibanamachine added a commit that referenced this pull request Nov 16, 2021
* [QA][refactor] Use ui settings - discover histogram

Use ui settings instead of setting absolute range
for timepicker.

Stacked on top of: #114530

* Use TimeStrings interface.

Co-authored-by: Tre <[email protected]>
dmlemeshko pushed a commit that referenced this pull request Nov 29, 2021
* [QA][refactor] Use ui settings - discover histogram

Use ui settings instead of setting absolute range
for timepicker.

Stacked on top of: #114530

* Use TimeStrings interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed buildkite-ci release_note:skip Skip the PR/issue when compiling release notes test_ui_functional v7.16.0 v8.0.0 v8.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants