Ensure errors.css is interpreted as UTF-8 encoding
What does this MR do and why?
Since
gitlab-foss!19096 (merged),
we've inlined the errors.css
by directly including the Sprockets
assets into the HAML. This worked fine as long as the CSS file
remained as a plain ASCII file. However, the switch to the new CSS
pipeline with
!144479 (merged) appears
to have introduced a single UTF-8 character. Since Sprockets loads the
asset via File.binread
(https://github.com/rails/sprockets/blob/d1dcf7075c468522e1cb6f93ae547d8d7fdcfbcb/lib/sprockets/asset.rb#L99), the contents of this UTF-8 file is forced as
ASCII-8BIT. When this ASCII-8BIT string is combined with other UTF-8
characters, such as Chinese characters, the encoding fails with a 500
error: incompatible character encodings: ASCII-8BIT and UTF-8 (Encoding::CompatibilityError)
.
To work around this issue, we force the encoding to UTF-8 to ensure the error page can render.
Merge request reports
Activity
assigned to @stanhu
changed milestone to %16.10
added bugfunctional typebug labels
requested review from @engwan and @tachyons-gitlab
added 1 commit
- b936a1d3 - Ensure errors.css is interpreted as UTF-8 encoding
1 Warning You've made some app changes, but didn't add any tests.
That's OK as long as you're refactoring existing code,
but please consider adding any of the maintenancepipelines, maintenancerefactor, maintenanceworkflow, documentation, QA labels.Reviewer roulette
Category Reviewer Maintainer backend @akotte
(UTC+5.5, 13.5 hours ahead of author)
@cablett
(UTC+13, 21 hours ahead of author)
frontend @apennells
(UTC-5, 3 hours ahead of author)
@jerasmus
(UTC+1, 9 hours ahead of author)
~"Authentication" Reviewer review is optional for ~"Authentication" @tachyons-gitlab
(UTC+5.5, 13.5 hours ahead of author)
Please check reviewer's status!
Please refer to documentation page for guidance on how you can benefit from the Reviewer Roulette, or use the GitLab Review Workload Dashboard to find other available reviewers.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by Ghost User- Resolved by Stan Hu
- Resolved by Stan Hu
@engwan
, thanks for approving this merge request.This is the first time the merge request has been approved. To ensure we don't only run predictive pipelines, and we don't break
master
, a new pipeline will be started shortly.Please wait for the pipeline to start before resolving this discussion and set auto-merge for the new pipeline. See merging a merge request for more details.
added pipeline:mr-approved label
removed review request for @engwan
mentioned in merge request !145355 (closed)
added Pick into auto-deploy priority1 severity1 labels
mentioned in incident gitlab-com/gl-infra/production#17627 (closed)