Fix remote SVG bundling and non-interactive image rendering tests#2764
Open
itsfuad wants to merge 1 commit into
Open
Fix remote SVG bundling and non-interactive image rendering tests#2764itsfuad wants to merge 1 commit into
itsfuad wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
imgbundler/png/xgif: fix nondeterministic remote SVG bundling and non-interactive render paths
Summary
This fixes three issues that were showing up across CI and local runs:
Changes
lib/imgbundlerContent-Encodingfor remote image responses before embeddinglib/pnglib/xgife2etests-clichain_icon_importgolden output to match normalized embedded SVG contentRoot Cause
chain_icon_importwas flaky because we were embedding raw remote response bytes for SVG icons. When the server returned compressed content, snapshots could differ by environment even when the SVG itself had not changed.Local
go testfailures withfailed to read user input: EOFcame from prompting for Chromium installation in a non-interactive process.GIF failures came from integer division in frame count calculation, which could produce
0frames for short intervals such as10ms.Verification
GOTOOLCHAIN=go1.25.0 go test ./lib/imgbundler ./lib/xgif -count=1GOTOOLCHAIN=go1.25.0 go test ./e2etests-cli -count=1COLOR=1 ./make.shScreenshots