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

[Maps] update sample data functional test to use a longer time range to ensure stable results #132744

Merged
merged 14 commits into from
Jun 6, 2022

Conversation

nreese
Copy link
Contributor

@nreese nreese commented May 23, 2022

#91205 re-enabled Maps sample_data functional tests. The PR also switched the logic for setting the time range from setting the absolute range from 6 months in past to 6 months in the future to set a quick select time range 30 days in the past and 40 days in the future

Screen Shot 2022-05-23 at 1 26 23 PM

The problem with this change is that the data sets extend into the future more than 40 days. Since sample data is shifted to be relative to current time, this can cause different results between runs. The screen shot below shows how web logs sample data set extends past 40 days in the future. Having a time range long enough to include all sample data ensures the results are the same between test runs.

Screen Shot 2022-05-23 at 1 09 32 PM

The PR also

  • removes unused quick times to highlight the one used by the test.
  • Fixes same problem copied to upgrade test

@liza-mae liza-mae self-requested a review May 23, 2022 20:50
@liza-mae
Copy link
Contributor

@nreese when this one is ready, I can run against cloud CI to get those results, let me know.

@nreese nreese marked this pull request as ready for review May 24, 2022 17:46
@nreese nreese requested a review from a team as a code owner May 24, 2022 17:46
@nreese nreese added [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels May 24, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@nreese nreese requested a review from nickpeihl May 24, 2022 17:47
@nreese nreese added the v8.3.0 label May 24, 2022
Copy link
Member

@nickpeihl nickpeihl left a comment

Choose a reason for hiding this comment

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

lgtm! 🤞

code review

@nreese
Copy link
Contributor Author

nreese commented May 25, 2022

@elasticmachine merge upstream

@liza-mae
Copy link
Contributor

Results from cloud: https://internal-ci.elastic.co/view/Stack%20Tests/job/elastic+estf-cloud-upgrade-snapshot-tests+main/11/testReport/

Looks like an improvement for web logs, but still needs a small tolerance increase and some others are failing for ElementClickInterceptedError need to investigate.

[Kibana Core Tests1.x-pack/test/upgrade/apps/maps/maps_smoke_tests·ts.upgrade upgrade maps smoke tests space: automation, name: web logs should load saved object and display layers](https://internal-ci.elastic.co/view/Stack%20Tests/job/elastic+estf-cloud-upgrade-snapshot-tests+main/11/JOB=upgradeTest5n,TASK=kibana_upgrade_tests,node=ess-testing/testReport/Kibana%20Core%20Tests1/x-pack_test_upgrade_apps_maps_maps_smoke_tests%C2%B7ts/upgrade_upgrade_maps_smoke_tests_space__automation__name__web_logs_should_load_saved_object_and_display_layers/)
[ Stack Trace](javascript:hideFailureSummary('id1239215-stacktrace'))
Error: expected '0.032' to be below 0.031
    at Assertion.assert (/var/lib/jenkins/workspace/elastic+estf-cloud-upgrade-snapshot-tests+main/JOB/upgradeTest5n/TASK/kibana_upgrade_tests/node/ess-testing/ci/upgrade/kibana/build/kibana/node_modules/@kbn/expect/expect.js:100:11)
    at Assertion.lessThan.Assertion.below (/var/lib/jenkins/workspace/elastic+estf-cloud-upgrade-snapshot-tests+main/JOB/upgradeTest5n/TASK/kibana_upgrade_tests/node/ess-testing/ci/upgrade/kibana/build/kibana/node_modules/@kbn/expect/expect.js:336:8)
    at Function.lessThan (/var/lib/jenkins/workspace/elastic+estf-cloud-upgrade-snapshot-tests+main/JOB/upgradeTest5n/TASK/kibana_upgrade_tests/node/ess-testing/ci/upgrade/kibana/build/kibana/node_modules/@kbn/expect/expect.js:531:15)
    at Context.<anonymous> (test/upgrade/apps/maps/maps_smoke_tests.ts:133:54)
    at Object.apply (/var/lib/jenkins/workspace/elastic+estf-cloud-upgrade-snapshot-tests+main/JOB/upgradeTest5n/TASK/kibana_upgrade_tests/node/ess-testing/ci/upgrade/kibana/build/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

However a larger difference is now seen for flights in some cases:

[Kibana Core Tests1.x-pack/test/upgrade/apps/maps/maps_smoke_tests·ts.upgrade upgrade maps smoke tests space: default, name: flights should load saved object and display layers](https://internal-ci.elastic.co/view/Stack%20Tests/job/elastic+estf-cloud-upgrade-snapshot-tests+main/11/JOB=upgradeTest5d,TASK=kibana_upgrade_tests,node=ess-testing/testReport/Kibana%20Core%20Tests1/x-pack_test_upgrade_apps_maps_maps_smoke_tests%C2%B7ts/upgrade_upgrade_maps_smoke_tests_space__default__name__flights_should_load_saved_object_and_display_layers/)
[ Stack Trace](javascript:hideFailureSummary('id1239004-stacktrace'))
Error: expected '0.054' to be below 0.031
    at Assertion.assert (/var/lib/jenkins/workspace/elastic+estf-cloud-upgrade-snapshot-tests+main/JOB/upgradeTest5d/TASK/kibana_upgrade_tests/node/ess-testing/ci/upgrade/kibana/build/kibana/node_modules/@kbn/expect/expect.js:100:11)
    at Assertion.lessThan.Assertion.below (/var/lib/jenkins/workspace/elastic+estf-cloud-upgrade-snapshot-tests+main/JOB/upgradeTest5d/TASK/kibana_upgrade_tests/node/ess-testing/ci/upgrade/kibana/build/kibana/node_modules/@kbn/expect/expect.js:336:8)
    at Function.lessThan (/var/lib/jenkins/workspace/elastic+estf-cloud-upgrade-snapshot-tests+main/JOB/upgradeTest5d/TASK/kibana_upgrade_tests/node/ess-testing/ci/upgrade/kibana/build/kibana/node_modules/@kbn/expect/expect.js:531:15)
    at Context.<anonymous> (test/upgrade/apps/maps/maps_smoke_tests.ts:108:54)
    at Object.apply (/var/lib/jenkins/workspace/elastic+estf-cloud-upgrade-snapshot-tests+main/JOB/upgradeTest5d/TASK/kibana_upgrade_tests/node/ess-testing/ci/upgrade/kibana/build/kibana/node_modules/@kbn/test/target_node/functional_test_runner/lib/mocha/wrap_function.js:87:16)

@nreese
Copy link
Contributor Author

nreese commented May 25, 2022

@liza-mae

It looks like the screen sizes are different then the baselines. Could this be caused by cloud tests not using buildkite? Below are the diffs for those 2 tests. Maybe instead of a screen shot comparison, the tests could be updated to make sure data is successfully pulled and there are not unexpected errors?

Diff for flights test
Screen Shot 2022-05-25 at 1 39 25 PM

Diff for e-commerce test
Screen Shot 2022-05-25 at 1 39 31 PM

@liza-mae
Copy link
Contributor

@nreese yes the upgrade tests are still in Jenkins. My goal right now is to unblock the 8.3 snapshot testing (which was recently added), so for me increasing the tolerance is okay for the existing tests.

Then later in another PR, I can pair up with you or someone from GIS team to see the best way to handle maps testing in upgrade feature. We can certainly change the testing, but I would need to understand what you mean by verify data is successfully pulled versus using screenshots, I expect the data to be dynamic. Since, I am not too familiar with maps tests and would need to get some additional information before rewriting the tests, it is going to hold up stabilizing the test runs for 8.3 while I do this.

Would you be okay with reverting the upgrade maps smoke test changes in this PR and I will add the existing screenshots to upgrade directory with the tolerance increase in the PR I have open now? Afterwards I will schedule a pair session to rewrite maps tests for upgrade.

Copy link
Contributor

@liza-mae liza-mae left a comment

Choose a reason for hiding this comment

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

Let's revert the changes in x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts in this PR and just increase the tolerance on the existing screenshots in #132374. We will do another PR later to rewrite the maps smoke tests for upgrade testing.

@nreese
Copy link
Contributor Author

nreese commented May 25, 2022

Let's revert the changes in x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts in this PR and just increase the tolerance on the existing screenshots in #132374. We will do another PR later to rewrite the maps smoke tests for upgrade testing.

I have reverted changes to x-pack/test/upgrade/apps/maps/maps_smoke_tests.ts

Copy link
Contributor

@liza-mae liza-mae left a comment

Choose a reason for hiding this comment

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

LGTM

@nreese nreese added v8.4.0 and removed v8.3.0 labels Jun 6, 2022
@nreese
Copy link
Contributor Author

nreese commented Jun 6, 2022

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@nreese nreese merged commit d6cf39d into elastic:main Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation Feature:Maps release_note:skip Skip the PR/issue when compiling release notes v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants