Skip to content

[upgrade] Fix dashboard smoke test#143110

Merged
liza-mae merged 7 commits intoelastic:mainfrom
liza-mae:liza/fix-upgrade-dashboard
Oct 13, 2022
Merged

[upgrade] Fix dashboard smoke test#143110
liza-mae merged 7 commits intoelastic:mainfrom
liza-mae:liza/fix-upgrade-dashboard

Conversation

@liza-mae
Copy link
Copy Markdown
Contributor

Fixes dashboard smoke tests failing to find data-test-subj.

@liza-mae liza-mae added release_note:skip Skip the PR/issue when compiling release notes v8.6.0 labels Oct 11, 2022
@liza-mae liza-mae self-assigned this Oct 11, 2022
@liza-mae liza-mae requested a review from a team October 11, 2022 16:12
Copy link
Copy Markdown
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Changes make sense and LGTM! Left one question.

@LeeDr
Copy link
Copy Markdown

LeeDr commented Oct 11, 2022

@liza-mae would you mind including this other change to the same file from my PR? Otherwise I'll need to reopen or remake mine;
https://github.com/elastic/kibana/pull/143126/files#diff-efa3a72754b01d710ddd3fba30b386c743b5df561bb9013c6400587485e3431aR44

@liza-mae
Copy link
Copy Markdown
Contributor Author

Sure I will add it

Copy link
Copy Markdown

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

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

Please also remove these lines so we just look at last 1 year;

            const todayYearMonthDay = moment().format('MMM D, YYYY');
            const fromTime = `${todayYearMonthDay} @ 00:00:00.000`;
            const toTime = `${todayYearMonthDay} @ 23:59:59.999`;
            await PageObjects.timePicker.setAbsoluteRange(fromTime, toTime);

@liza-mae
Copy link
Copy Markdown
Contributor Author

@LeeDr why did we change the time frame to year? It seems I have a test failure now, that I did not have before, so I can't merge until I find a root cause. It would help to know why you need to do this.

@LeeDr
Copy link
Copy Markdown

LeeDr commented Oct 12, 2022

@LeeDr why did we change the time frame to year? It seems I have a test failure now, that I did not have before, so I can't merge until I find a root cause. It would help to know why you need to do this.

I described it in my duplicated PR that I closed. We're running these same Cloud upgrade tests in an on-prem configuration, but instead of running the pre-upgrade version every time, we run it once and save a snapshot. Then the "current version" test restores the Elasticsearch snapshot before starting Kibana. So Kibana sees it as an upgrade and does the saved object migrations, etc. I don't know how often we'll create a new pre-upgrade snapshot but the only way these tests would pass in this case is if we either use a longer timespan, or the specific timespan which includes the data (easiest to just use a long timespan). The long timespan would impact a screenshot type of test. But I wouldn't think it would impact this test.

@liza-mae
Copy link
Copy Markdown
Contributor Author

Okay then I need to see why it is failing, maybe some other change is causing it. I will add it back and do some more testing/debugging.

Copy link
Copy Markdown

@LeeDr LeeDr left a comment

Choose a reason for hiding this comment

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

LGTM - Let me know if Last_1 year doesn't work and you can merge without that change and I'll come up with another solution. The test could query the index for the min and max timestamps of the data and set the timepicker to that. But that's a bit more complicated and I'd rather avoid it if a simple solution can work.

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

cc @liza-mae

@liza-mae
Copy link
Copy Markdown
Contributor Author

Okay so the root cause appears to be the run time fields mapping for hour of day, it has changed in recent versions and I guess it does not execute each time, so that is why I am getting failures sporadically. I will go ahead and fix that, the changes here seem fine.

@liza-mae liza-mae merged commit 825f61b into elastic:main Oct 13, 2022
@kibanamachine kibanamachine added the backport:skip This PR does not require backporting label Oct 13, 2022
@liza-mae liza-mae deleted the liza/fix-upgrade-dashboard branch October 13, 2022 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes v8.6.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants