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 map report image test threshold for new EMS styles #167162

Merged
merged 10 commits into from
Sep 28, 2023

Conversation

jsanz
Copy link
Member

@jsanz jsanz commented Sep 25, 2023

Updated EMS Styles are waiting to be put into production. They are already available in Elastic staging environment (preview). This PR is a safe measure to ensure that this change do not break our CI tests.

The process has been as follows:

  1. Momentarily replaces the EMS Tile Service tileApiUrl by our staging server to force the use of the new styles and check which tests break with the slightly different basemaps at 12481c6
  2. Look for related broken tests
Error: expected 0.030813687704837327 to be below 0.03
  1. Adjust the threshold for the dashboard report, since the new value was slightly over the limit e655b84
  2. Wait for a green CI (this took a few days because of unrelated issues with Kibana CI)
  3. Revert the tileApiUrl change to its original value c0030bc

@jsanz
Copy link
Member Author

jsanz commented Sep 26, 2023

@elasticmachine merge upstream

@jsanz
Copy link
Member Author

jsanz commented Sep 26, 2023

@elasticmachine merge upstream

@jsanz jsanz added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development release_note:skip Skip the PR/issue when compiling release notes labels Sep 27, 2023
@jsanz
Copy link
Member Author

jsanz commented Sep 28, 2023

OK so finally 🙌 tests passed so I can remove the hardcoded link to staging EMS Styles and the only threshold to raise is at

expect(percentDiff).to.be.lessThan(0.03);

So next, I will remove the hardoced URL to let the tests run again against just that threshold change so we can merge this safely.

Later, once the styles have been deployed to production we can update the report image if it feels necessary to revert to the original value

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #5 / Journey[many_fields_lens_editor] Open existing Lens visualization

Metrics [docs]

✅ unchanged

History

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

@jsanz jsanz marked this pull request as ready for review September 28, 2023 13:44
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@jsanz jsanz requested a review from a team September 28, 2023 13:44
@jsanz jsanz changed the title [Maps] Override the EMS tile server to staging to test the changes in styles [Maps] Update map report image test threshold for new EMS styles Sep 28, 2023
@@ -226,7 +226,7 @@ export default function ({
updateBaselines
);

expect(percentDiff).to.be.lessThan(0.03);
expect(percentDiff).to.be.lessThan(0.035);
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of changing percentage, how about updating snapshots?

Copy link
Member Author

Choose a reason for hiding this comment

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

The problem of updating the snapshot is that there will be an unknown interval between this PR is merged and the styles go to production. During that time tests would fail.

That's why I would only update the snapshot and revert this change after the styles are in production.

Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

thanks for explaining. LGTM
code review only

@jsanz jsanz merged commit 274fe1e into elastic:main Sep 28, 2023
@jsanz jsanz deleted the maps/new-ems-styles-test branch September 28, 2023 15:34
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 28, 2023
…stic#167162)

Updated EMS Styles are waiting to be put into production. They are
already available in Elastic staging environment
([preview](maps-staging.elastic.co/?manifest=testing)). This PR is a
safe measure to ensure that this change do not break our CI tests.

The process has been as follows:

1. Momentarily replaces the EMS Tile Service `tileApiUrl` by our staging
server to force the use of the new styles and check which tests break
with the slightly different basemaps at
[12481c6](elastic@12481c6)
2. Look for related [broken
tests](https://buildkite.com/elastic/kibana-pull-request/builds/161870)
```
Error: expected 0.030813687704837327 to be below 0.03
```
4. Adjust the threshold for the dashboard report, since the new value
was slightly over the limit
[e655b84](elastic@e655b84)
5. Wait for a green CI (this took a few days because of unrelated issues
with Kibana CI)
6. Revert the `tileApiUrl` change to its original value
[c0030bc](elastic@c0030bc)

---------

Co-authored-by: Kibana Machine <[email protected]>
(cherry picked from commit 274fe1e)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
7.17 Backport failed because of merge conflicts
8.10

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 167162

Questions ?

Please refer to the Backport tool documentation

@jsanz
Copy link
Member Author

jsanz commented Sep 28, 2023

@nreese backport to 7.17 failed because the change is in a test that does not exist in 7.17 screenshots.ts.

Just to be sure, I will open a new draft PR against 7.17 with the same check I did to ensure no new tests fail.

kibanamachine added a commit that referenced this pull request Oct 2, 2023
…es (#167162) (#167534)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[Maps] Update map report image test threshold for new EMS styles
(#167162)](#167162)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Jorge
Sanz","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-09-28T15:34:15Z","message":"[Maps]
Update map report image test threshold for new EMS styles
(#167162)\n\nUpdated EMS Styles are waiting to be put into production.
They are\r\nalready available in Elastic staging
environment\r\n([preview](maps-staging.elastic.co/?manifest=testing)).
This PR is a\r\nsafe measure to ensure that this change do not break our
CI tests.\r\n\r\nThe process has been as follows:\r\n\r\n1. Momentarily
replaces the EMS Tile Service `tileApiUrl` by our staging\r\nserver to
force the use of the new styles and check which tests break\r\nwith the
slightly different basemaps
at\r\n[12481c6](https://github.com/elastic/kibana/pull/167162/commits/12481c6ada986cda258f37108f5f0dd6c85f7689)\r\n2.
Look for related
[broken\r\ntests](https://buildkite.com/elastic/kibana-pull-request/builds/161870)\r\n```\r\nError:
expected 0.030813687704837327 to be below 0.03\r\n```\r\n4. Adjust the
threshold for the dashboard report, since the new value\r\nwas slightly
over the
limit\r\n[e655b84](https://github.com/elastic/kibana/pull/167162/commits/e655b845695788c67356de115ab6e4627a42b07b)\r\n5.
Wait for a green CI (this took a few days because of unrelated
issues\r\nwith Kibana CI)\r\n6. Revert the `tileApiUrl` change to its
original
value\r\n[c0030bc](https://github.com/elastic/kibana/pull/167162/commits/c0030bcff1a1de14860a05c27f26af45fda5e240)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"274fe1e9d04241aa99b2ad2c44e97f39e2a3f891","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Presentation","release_note:skip","backport:prev-MAJOR","Feature:Maps","v8.11.0"],"number":167162,"url":"https://github.com/elastic/kibana/pull/167162","mergeCommit":{"message":"[Maps]
Update map report image test threshold for new EMS styles
(#167162)\n\nUpdated EMS Styles are waiting to be put into production.
They are\r\nalready available in Elastic staging
environment\r\n([preview](maps-staging.elastic.co/?manifest=testing)).
This PR is a\r\nsafe measure to ensure that this change do not break our
CI tests.\r\n\r\nThe process has been as follows:\r\n\r\n1. Momentarily
replaces the EMS Tile Service `tileApiUrl` by our staging\r\nserver to
force the use of the new styles and check which tests break\r\nwith the
slightly different basemaps
at\r\n[12481c6](https://github.com/elastic/kibana/pull/167162/commits/12481c6ada986cda258f37108f5f0dd6c85f7689)\r\n2.
Look for related
[broken\r\ntests](https://buildkite.com/elastic/kibana-pull-request/builds/161870)\r\n```\r\nError:
expected 0.030813687704837327 to be below 0.03\r\n```\r\n4. Adjust the
threshold for the dashboard report, since the new value\r\nwas slightly
over the
limit\r\n[e655b84](https://github.com/elastic/kibana/pull/167162/commits/e655b845695788c67356de115ab6e4627a42b07b)\r\n5.
Wait for a green CI (this took a few days because of unrelated
issues\r\nwith Kibana CI)\r\n6. Revert the `tileApiUrl` change to its
original
value\r\n[c0030bc](https://github.com/elastic/kibana/pull/167162/commits/c0030bcff1a1de14860a05c27f26af45fda5e240)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"274fe1e9d04241aa99b2ad2c44e97f39e2a3f891"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/167162","number":167162,"mergeCommit":{"message":"[Maps]
Update map report image test threshold for new EMS styles
(#167162)\n\nUpdated EMS Styles are waiting to be put into production.
They are\r\nalready available in Elastic staging
environment\r\n([preview](maps-staging.elastic.co/?manifest=testing)).
This PR is a\r\nsafe measure to ensure that this change do not break our
CI tests.\r\n\r\nThe process has been as follows:\r\n\r\n1. Momentarily
replaces the EMS Tile Service `tileApiUrl` by our staging\r\nserver to
force the use of the new styles and check which tests break\r\nwith the
slightly different basemaps
at\r\n[12481c6](https://github.com/elastic/kibana/pull/167162/commits/12481c6ada986cda258f37108f5f0dd6c85f7689)\r\n2.
Look for related
[broken\r\ntests](https://buildkite.com/elastic/kibana-pull-request/builds/161870)\r\n```\r\nError:
expected 0.030813687704837327 to be below 0.03\r\n```\r\n4. Adjust the
threshold for the dashboard report, since the new value\r\nwas slightly
over the
limit\r\n[e655b84](https://github.com/elastic/kibana/pull/167162/commits/e655b845695788c67356de115ab6e4627a42b07b)\r\n5.
Wait for a green CI (this took a few days because of unrelated
issues\r\nwith Kibana CI)\r\n6. Revert the `tileApiUrl` change to its
original
value\r\n[c0030bc](https://github.com/elastic/kibana/pull/167162/commits/c0030bcff1a1de14860a05c27f26af45fda5e240)\r\n\r\n---------\r\n\r\nCo-authored-by:
Kibana Machine
<[email protected]>","sha":"274fe1e9d04241aa99b2ad2c44e97f39e2a3f891"}}]}]
BACKPORT-->

Co-authored-by: Jorge Sanz <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.18, 8.17, 8.16) the previous major branch and other branches in development Feature:Maps release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.10.3 v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants