Repository navigation
Remove regional locale shims from browser images (BLOCKED) - #447
Draft
tnsardesai wants to merge 1 commit into
Draft
tnsardesai wants to merge 1 commit into
tnsardesai wants to merge 1 commit into
Conversation
Drop the locales package, the locale-gen step and the en-CA/en-IE/en-SG copies of en-GB.pak added for regional browser locale. tzdata and fonts stay. The startup regional test is split: timezone coverage runs on every image under C.UTF-8, and locale coverage runs on kernel-browser images, where the browser supplies the regional locale at startup from --lang and at runtime from native location updates.
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.
Caution
BLOCKED — do not merge. Removing these shims is unsafe until all of the following hold:
--lang/--accept-langflags.LANG/LC_ALLis removed or disproven. Production still sendsLANG/LC_ALL=en_SG.UTF-8and similar for each metro (kernelbrowserEnvironment), and after this change those locales no longer exist in the image.summary
Stacked on #399. Removes only the regional locale shims added in #357, from both the headful and headless images:
localespackagelocale-gen en_US en_GB en_CA en_IE en_SGstepen-GB.pakin the Chrome for Testing installtzdataand all fonts stay.test changes
TestRegionalBrowserLocationis replaced by tests that cover the same values honestly after the removal:TestRegionalBrowserTimezone(every image, headful and headless):TZ/KERNEL_BROWSER_TIMEZONE=Asia/SingaporewithLANG/LC_ALL=C.UTF-8. Checkslocale charmapis UTF-8, the system offset from/etc/localtime(env -u TZ date) is +0800, and the browser timezone isAsia/Singapore.TestRegionalBrowserLocale(kernel-browser images,E2E_KERNEL_BROWSER=1, headful and headless):startup: production's flags (--lang=en-SG --accept-lang=en-SG,en) withLANG/LC_ALL=en_SG.UTF-8. Asserts the regional POSIX locale is absent, then that the first page reportsen-SG/en-SG/Asia/Singapore.native: starts in en-US underC.UTF-8, applies an en-SG/Singapore bundle through the lease-reset endpoint, waits forapplied, and asserts the OS (UTF-8, +0800) and a new page (en-SG/en-SG/Asia/Singapore).Why the locale assertions moved off stock images: #399's old test fails on the cleaned Chrome for Testing image (
Intllocaleen-GBinstead ofen-SG), so on stock images the pack copies were what made--lang=en-SGwork. The kernel-browser build ships its ownen-CA/en-IE/en-SGpacks.Warning
Stock CI images (Chrome for Testing 152) skip
TestRegionalBrowserLocale, so CI no longer checks regional locale. It was validated locally against the exact #92 artifact (below); CI coverage returns only when CI builds kernel-browser images.findings from the cleaned images
LANG/LC_*variables (the launcher'srunuserpath drops them), so the browser's locale does not come from guest POSIX locales.locale charmapcheck never exerciseden_SG: commands run through/process/exec(and the image API, pulseaudio and Xvfb) seeLC_ALL=C.UTF-8even when the container is started withLC_ALL=en_SG.UTF-8. The source of that override was not identified. supervisord andchromium-launcherstill receiveen_SG.UTF-8.localesand runs the samelocale-genbut does not copy packs. Mirroring this cleanup there is a separate follow-up after the blockers clear.validation
localesnot installed; onlyC,C.utf8,POSIX; no copied packs;tzdata2026c present; fonts present (headless 52, headful 706).TestRegionalBrowserTimezone(both),TestBrowserTimezoneFollowsLocaltimepass;TestRegionalBrowserLocaleskips.chromiumsha256e4cd799a…4434957) installed at/usr/lib/chromium, as kernel-images-private does.TestRegionalBrowserLocale(4 subtests),TestRegionalBrowserTimezone,TestBrowserLocationRuntimeUpdate,TestBrowserTimezoneFollowsLocaltimeandTestBrowserLocationCapabilities(check mode) pass.TestRegionalBrowserLocationfails on the cleaned stock image as described above.go build ./...,go vet ./e2e,git diff --check.