[upgrade] Fix dashboard smoke test#143110
Conversation
ThomThomson
left a comment
There was a problem hiding this comment.
Changes make sense and LGTM! Left one question.
|
@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; |
|
Sure I will add it |
LeeDr
left a comment
There was a problem hiding this comment.
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);
|
@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. |
|
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. |
LeeDr
left a comment
There was a problem hiding this comment.
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.
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @liza-mae |
|
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. |
Fixes dashboard smoke tests failing to find data-test-subj.