-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Remove file-type dependency via jimp #137214
Conversation
Updated jimp to 0.16.1. Updated light & dark dashboard baseline screenshots to resolve failure due to resize degradation.
…luding file-type. Eliminates quality degradation from image resizing.
Fixed sharp resize to fit and not truncate the original image.
…ling issues in CI testing.
…G reporting tests to force failure and collect CI screenshots.
…r dashboard screenshots to 1% for investigation of remaining screens.
Change of forced container width size in large dashboard layout test.
Adjusted forced container width in large dashboard layout test for troubleshooting.
…ting. Replaced references to dedundant image service with existing, more adopted reporting service. Ideally, the PNG functions of the reporting service would be merged with the screenshot service as an image service.
…r specific teams to investigate.
…NG compare testing. Removed redundant implementations and references.
@elasticmachine merge upstream |
merge conflict between base and head |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - I pulled the PR locally and ran some screenshot tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kibana-gis changes LGTM
code review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this refactor @jeramysoucy ! It's looking really great. LGTM from AppServices
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: cc @jeramysoucy |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
* Removed file-type from package.json deps. Updated jimp to 0.16.1. Updated light & dark dashboard baseline screenshots to resolve failure due to resize degradation. * Replaced jimp with sharp and pixelmatch. Eliminates several deps, including file-type. Eliminates quality degradation from image resizing. * Fixed copy paste error, which lead to pass positives and errors. * Integrated updateBaselines flag into dashboards report testing. Fixed sharp resize to fit and not truncate the original image. * Removed accidental '.only' * Reverted area chart baseline. * Removed explicit declaration of sharp from package.json. * Adjusted dashboard screenshot size in attempt to eliminate layout scaling issues in CI testing. * Reverted dashboard screenshot size. Lowered tolerance in dashboard PNG reporting tests to force failure and collect CI screenshots. * Changed session save location for dashboard report images for better CI reporting. * Fixed small dashboard baseline screenshot with correct aspect ratio. * Updated 2 basline screenshots from CI. Lowered PNG match tolerance for dashboard screenshots to 1% for investigation of remaining screens. * Update of dashboard controls light mode baseline. Change of forced container width size in large dashboard layout test. * Updated dashboard controls dark mode baseline screenshot. Adjusted forced container width in large dashboard layout test for troubleshooting. * Lowering tolerance of PNG compare tests from 9% to 1% for troubleshooting. Replaced references to dedundant image service with existing, more adopted reporting service. Ideally, the PNG functions of the reporting service would be merged with the screenshot service as an image service. * Reverting tolerance of PNG compares to 0.09. Will create GH issues for specific teams to investigate. * Implemented PngService to provide an accessible single reference to PNG compare testing. Removed redundant implementations and references. * Updated service reference and call to png compare function left out of last commit. * Updated another missed PNG reference. * Removed superfluous parameter. * Update after bootstrap * Updated area chart baseline to match new render with panel filters. * Reverted limits in dashboard snapshot tests to original values. * Merge and rebuild. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Removed file-type from package.json deps. Updated jimp to 0.16.1. Updated light & dark dashboard baseline screenshots to resolve failure due to resize degradation. * Replaced jimp with sharp and pixelmatch. Eliminates several deps, including file-type. Eliminates quality degradation from image resizing. * Fixed copy paste error, which lead to pass positives and errors. * Integrated updateBaselines flag into dashboards report testing. Fixed sharp resize to fit and not truncate the original image. * Removed accidental '.only' * Reverted area chart baseline. * Removed explicit declaration of sharp from package.json. * Adjusted dashboard screenshot size in attempt to eliminate layout scaling issues in CI testing. * Reverted dashboard screenshot size. Lowered tolerance in dashboard PNG reporting tests to force failure and collect CI screenshots. * Changed session save location for dashboard report images for better CI reporting. * Fixed small dashboard baseline screenshot with correct aspect ratio. * Updated 2 basline screenshots from CI. Lowered PNG match tolerance for dashboard screenshots to 1% for investigation of remaining screens. * Update of dashboard controls light mode baseline. Change of forced container width size in large dashboard layout test. * Updated dashboard controls dark mode baseline screenshot. Adjusted forced container width in large dashboard layout test for troubleshooting. * Lowering tolerance of PNG compare tests from 9% to 1% for troubleshooting. Replaced references to dedundant image service with existing, more adopted reporting service. Ideally, the PNG functions of the reporting service would be merged with the screenshot service as an image service. * Reverting tolerance of PNG compares to 0.09. Will create GH issues for specific teams to investigate. * Implemented PngService to provide an accessible single reference to PNG compare testing. Removed redundant implementations and references. * Updated service reference and call to png compare function left out of last commit. * Updated another missed PNG reference. * Removed superfluous parameter. * Update after bootstrap * Updated area chart baseline to match new render with panel filters. * Reverted limits in dashboard snapshot tests to original values. * Merge and rebuild. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit de9b7c6) # Conflicts: # package.json # test/functional/screenshots/baseline/area_chart.png # x-pack/test/reporting_functional/reporting_and_timeout/index.ts # yarn.lock
* Removed file-type from package.json deps. Updated jimp to 0.16.1. Updated light & dark dashboard baseline screenshots to resolve failure due to resize degradation. * Replaced jimp with sharp and pixelmatch. Eliminates several deps, including file-type. Eliminates quality degradation from image resizing. * Fixed copy paste error, which lead to pass positives and errors. * Integrated updateBaselines flag into dashboards report testing. Fixed sharp resize to fit and not truncate the original image. * Removed accidental '.only' * Reverted area chart baseline. * Removed explicit declaration of sharp from package.json. * Adjusted dashboard screenshot size in attempt to eliminate layout scaling issues in CI testing. * Reverted dashboard screenshot size. Lowered tolerance in dashboard PNG reporting tests to force failure and collect CI screenshots. * Changed session save location for dashboard report images for better CI reporting. * Fixed small dashboard baseline screenshot with correct aspect ratio. * Updated 2 basline screenshots from CI. Lowered PNG match tolerance for dashboard screenshots to 1% for investigation of remaining screens. * Update of dashboard controls light mode baseline. Change of forced container width size in large dashboard layout test. * Updated dashboard controls dark mode baseline screenshot. Adjusted forced container width in large dashboard layout test for troubleshooting. * Lowering tolerance of PNG compare tests from 9% to 1% for troubleshooting. Replaced references to dedundant image service with existing, more adopted reporting service. Ideally, the PNG functions of the reporting service would be merged with the screenshot service as an image service. * Reverting tolerance of PNG compares to 0.09. Will create GH issues for specific teams to investigate. * Implemented PngService to provide an accessible single reference to PNG compare testing. Removed redundant implementations and references. * Updated service reference and call to png compare function left out of last commit. * Updated another missed PNG reference. * Removed superfluous parameter. * Update after bootstrap * Updated area chart baseline to match new render with panel filters. * Reverted limits in dashboard snapshot tests to original values. * Merge and rebuild. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit de9b7c6) # Conflicts: # package.json # test/functional/screenshots/baseline/area_chart.png # test/functional/screenshots/baseline/dashboard_controls_dark.png # test/functional/screenshots/baseline/dashboard_controls_light.png # test/functional/services/lib/compare_pngs.ts # x-pack/test/functional/apps/dashboard/group3/reporting/reports/baseline/small_dashboard_preserve_layout.png # x-pack/test/functional/apps/dashboard/reporting/screenshots.ts # x-pack/test/functional/apps/maps/group3/reports/index.ts # x-pack/test/functional/services/index.ts # x-pack/test/reporting_functional/reporting_and_timeout/index.ts # x-pack/test/reporting_functional/services/scenarios.ts # yarn.lock
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
Looks like this PR has backport PRs but they still haven't been merged. Please merge them ASAP to keep the branches relatively in sync. |
* Remove file-type dependency via jimp (#137214) * Removed file-type from package.json deps. Updated jimp to 0.16.1. Updated light & dark dashboard baseline screenshots to resolve failure due to resize degradation. * Replaced jimp with sharp and pixelmatch. Eliminates several deps, including file-type. Eliminates quality degradation from image resizing. * Fixed copy paste error, which lead to pass positives and errors. * Integrated updateBaselines flag into dashboards report testing. Fixed sharp resize to fit and not truncate the original image. * Removed accidental '.only' * Reverted area chart baseline. * Removed explicit declaration of sharp from package.json. * Adjusted dashboard screenshot size in attempt to eliminate layout scaling issues in CI testing. * Reverted dashboard screenshot size. Lowered tolerance in dashboard PNG reporting tests to force failure and collect CI screenshots. * Changed session save location for dashboard report images for better CI reporting. * Fixed small dashboard baseline screenshot with correct aspect ratio. * Updated 2 basline screenshots from CI. Lowered PNG match tolerance for dashboard screenshots to 1% for investigation of remaining screens. * Update of dashboard controls light mode baseline. Change of forced container width size in large dashboard layout test. * Updated dashboard controls dark mode baseline screenshot. Adjusted forced container width in large dashboard layout test for troubleshooting. * Lowering tolerance of PNG compare tests from 9% to 1% for troubleshooting. Replaced references to dedundant image service with existing, more adopted reporting service. Ideally, the PNG functions of the reporting service would be merged with the screenshot service as an image service. * Reverting tolerance of PNG compares to 0.09. Will create GH issues for specific teams to investigate. * Implemented PngService to provide an accessible single reference to PNG compare testing. Removed redundant implementations and references. * Updated service reference and call to png compare function left out of last commit. * Updated another missed PNG reference. * Removed superfluous parameter. * Update after bootstrap * Updated area chart baseline to match new render with panel filters. * Reverted limits in dashboard snapshot tests to original values. * Merge and rebuild. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> * Update to dashboard screen test area chart baseline. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Remove file-type dependency via jimp (#137214) * Removed file-type from package.json deps. Updated jimp to 0.16.1. Updated light & dark dashboard baseline screenshots to resolve failure due to resize degradation. * Replaced jimp with sharp and pixelmatch. Eliminates several deps, including file-type. Eliminates quality degradation from image resizing. * Fixed copy paste error, which lead to pass positives and errors. * Integrated updateBaselines flag into dashboards report testing. Fixed sharp resize to fit and not truncate the original image. * Removed accidental '.only' * Reverted area chart baseline. * Removed explicit declaration of sharp from package.json. * Adjusted dashboard screenshot size in attempt to eliminate layout scaling issues in CI testing. * Reverted dashboard screenshot size. Lowered tolerance in dashboard PNG reporting tests to force failure and collect CI screenshots. * Changed session save location for dashboard report images for better CI reporting. * Fixed small dashboard baseline screenshot with correct aspect ratio. * Updated 2 basline screenshots from CI. Lowered PNG match tolerance for dashboard screenshots to 1% for investigation of remaining screens. * Update of dashboard controls light mode baseline. Change of forced container width size in large dashboard layout test. * Updated dashboard controls dark mode baseline screenshot. Adjusted forced container width in large dashboard layout test for troubleshooting. * Lowering tolerance of PNG compare tests from 9% to 1% for troubleshooting. Replaced references to dedundant image service with existing, more adopted reporting service. Ideally, the PNG functions of the reporting service would be merged with the screenshot service as an image service. * Reverting tolerance of PNG compares to 0.09. Will create GH issues for specific teams to investigate. * Implemented PngService to provide an accessible single reference to PNG compare testing. Removed redundant implementations and references. * Updated service reference and call to png compare function left out of last commit. * Updated another missed PNG reference. * Removed superfluous parameter. * Update after bootstrap * Updated area chart baseline to match new render with panel filters. * Reverted limits in dashboard snapshot tests to original values. * Merge and rebuild. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit de9b7c6) # Conflicts: # package.json # test/functional/screenshots/baseline/area_chart.png # test/functional/screenshots/baseline/dashboard_controls_dark.png # test/functional/screenshots/baseline/dashboard_controls_light.png # test/functional/services/lib/compare_pngs.ts # x-pack/test/functional/apps/dashboard/group3/reporting/reports/baseline/small_dashboard_preserve_layout.png # x-pack/test/functional/apps/dashboard/reporting/screenshots.ts # x-pack/test/functional/apps/maps/group3/reports/index.ts # x-pack/test/functional/services/index.ts # x-pack/test/reporting_functional/reporting_and_timeout/index.ts # x-pack/test/reporting_functional/services/scenarios.ts # yarn.lock * [CI] Auto-commit changed files from 'yarn kbn run build -i @kbn/pm' * Update to dashboard screenshot functional tests to correct merge errors. * Removed unintentionally added test. Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
* Removed file-type from package.json deps. Updated jimp to 0.16.1. Updated light & dark dashboard baseline screenshots to resolve failure due to resize degradation. * Replaced jimp with sharp and pixelmatch. Eliminates several deps, including file-type. Eliminates quality degradation from image resizing. * Fixed copy paste error, which lead to pass positives and errors. * Integrated updateBaselines flag into dashboards report testing. Fixed sharp resize to fit and not truncate the original image. * Removed accidental '.only' * Reverted area chart baseline. * Removed explicit declaration of sharp from package.json. * Adjusted dashboard screenshot size in attempt to eliminate layout scaling issues in CI testing. * Reverted dashboard screenshot size. Lowered tolerance in dashboard PNG reporting tests to force failure and collect CI screenshots. * Changed session save location for dashboard report images for better CI reporting. * Fixed small dashboard baseline screenshot with correct aspect ratio. * Updated 2 basline screenshots from CI. Lowered PNG match tolerance for dashboard screenshots to 1% for investigation of remaining screens. * Update of dashboard controls light mode baseline. Change of forced container width size in large dashboard layout test. * Updated dashboard controls dark mode baseline screenshot. Adjusted forced container width in large dashboard layout test for troubleshooting. * Lowering tolerance of PNG compare tests from 9% to 1% for troubleshooting. Replaced references to dedundant image service with existing, more adopted reporting service. Ideally, the PNG functions of the reporting service would be merged with the screenshot service as an image service. * Reverting tolerance of PNG compares to 0.09. Will create GH issues for specific teams to investigate. * Implemented PngService to provide an accessible single reference to PNG compare testing. Removed redundant implementations and references. * Updated service reference and call to png compare function left out of last commit. * Updated another missed PNG reference. * Removed superfluous parameter. * Update after bootstrap * Updated area chart baseline to match new render with panel filters. * Reverted limits in dashboard snapshot tests to original values. * Merge and rebuild. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
In the process of updating the dependencies I discovered a couple of issues:
The font spacing in CI screenshots differs significantly from (at least my own) local machines. The new image comparison method appears to be more sensitive than what jimp offered, and without changing the acceptable tolerances, some of the dashboard snapshot tests were failing. After consulting with QA, we determined that that new baselines would be generated from CI's screenshots of the failing tests.
Due to a difference in default resizing options between jimp and sharp, some of the dashboard reporting tests were failing. I tracked this down to an aspect ratio difference, which lead to some further investigation. The tolerance for some of the report tests was set to 9%, which is rather high and allows for false passes for images containing a lot of white/empty space. I experimented with lowering this tolerance and also discovered that the large dashboard layout report image was getting generated with defects when rendered by CI. I will be creating issues for the tests contained in the following files, which all include 9% compare tolerances...