Skip to content

Enforce UTF-8 encoding for errors coming from the Gitaly

Vasilii Iakliushin requested to merge 421563_fix_encoding_error into master

What does this MR do and why?

Contributes to #421563 (closed)

Problem

Errors returned from Gitaly are encoded in ASCII. If the error message contains non-ASCII characters, then it returns an encoding error.

Solution

Encode Gitaly error messages in UTF-8.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screen Screenshot_2023-08-14_at_17.54.10

How to set up and validate locally

  • Create a new project.
  • Go to Settings > Repository > Push rules > Require expression in commit messages and configure the following regular expression: ^(¯\\_\(ツ\)_\/¯).
  • Try to make a new commit via Edit single file and specify commit message not matching the expression (anything besides ¯\_(ツ)_/¯). Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Vasilii Iakliushin

Merge request reports