Skip to content

[7.17] Remove file-type dependency via jimp (#137214)#139436

Merged
jeramysoucy merged 6 commits intoelastic:7.17from
jeramysoucy:backport/7.17/pr-137214
Aug 29, 2022
Merged

[7.17] Remove file-type dependency via jimp (#137214)#139436
jeramysoucy merged 6 commits intoelastic:7.17from
jeramysoucy:backport/7.17/pr-137214

Conversation

@jeramysoucy
Copy link
Copy Markdown
Contributor

Backport

This will backport the following commits from main to 7.17:

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>
(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
@jeramysoucy jeramysoucy added the backport This PR is a backport of another PR label Aug 24, 2022
@jeramysoucy jeramysoucy enabled auto-merge (squash) August 24, 2022 20:30
@jeramysoucy
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
apm 1158 1159 +1
enterpriseSearch 1502 1503 +1
fileUpload 138 139 +1
lists 293 294 +1
securitySolution 2745 2746 +1
total +5

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
apm 2.7MB 2.7MB +6.2KB
enterpriseSearch 1.4MB 1.4MB +6.2KB
fileUpload 660.9KB 667.1KB +6.2KB
lists 142.2KB 148.4KB +6.2KB
securitySolution 4.6MB 4.6MB +6.2KB
total +31.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
kbnUiSharedDeps-npmDll 5.1MB 5.1MB +91.0B
kbnUiSharedDeps-srcJs 3.8MB 3.8MB +19.2KB
total +19.2KB

History

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

@jeramysoucy jeramysoucy merged commit a32d08f into elastic:7.17 Aug 29, 2022
@jeramysoucy jeramysoucy deleted the backport/7.17/pr-137214 branch February 2, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants