Skip to content

Change GetRawChanges RPC to use bytes

Paul Okstad (ex-GitLab) requested to merge po-raw-changes-encoding into master

What does this MR do?

This change discontinues use of a deprecated protobuf field use in the GetRawChanges RPC. These deprecated fields introduced a potential bug since the assumed all data sent through them would be UTF-8 encoded, which is not necessarily true. Instead, new fields that use the correct encoding scheme will be used. These new fields are exposed as raw bytes in the protobuf library (see relevant change: gitaly-proto!294 (merged)).

Closes gitaly#1470 (closed)

Very similar to https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/26880

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

This is a low risk change. The existing test coverage should be sufficient. We may want a sanity check to verify it handles invalid UTF-8 characters, but this is probably overkill (see relevant discussion: gitaly#1470 (comment 134919265)).

Edited by Zeger-Jan van de Weg

Merge request reports