-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitserver: protobuf: relax ArchiveRequest path fields to be bytes
instead of string
#61970
Conversation
6e6456b
to
05332a3
Compare
…nstead of `string` commit-id:582a4b96
05332a3
to
b4adc04
Compare
The backport to
To backport this PR manually, you can either: Via the sg toolUse the sg backport -r 5.3.9104 -p 61970 Via your terminalTo backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-5.3.9104 5.3.9104
# Navigate to the new working tree
cd .worktrees/backport-5.3.9104
# Create a new branch
git switch --create backport-61970-to-5.3.9104
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 6a0c465fbd73943cd08e37ced457e232a40c521b
# Push it to GitHub
git push --set-upstream origin backport-61970-to-5.3.9104
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.3.9104 If you encouter conflict, first resolve the conflict and stage all files, then run the commands below: git cherry-pick --continue
# Push it to GitHub
git push --set-upstream origin backport-61970-to-5.3.9104
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-5.3.9104
Once the pull request has been created, please ensure the following:
|
On customer instances and on sourcegraph.com, we get the following errors like the following from the gRPC internal error reporter:
https://cloudlogging.app.goo.gl/mLTBtcFd7w6SgBii9
This error comes from the gitserver gRPC clients when they tries to send an ArchiveRequest
sourcegraph/internal/gitserver/v1/gitserver.proto
Lines 673 to 684 in 22d9370
In protobuf, all
string
fields must be utf-8 encoded. However, the UNIX specification says that filepaths can contain any byte sequence without NULL or/
, which includes non-utf8 encoded strings.So, in order to pass this information along correctly - we need to change the type for
paths
inArchiveRequest
fromstring
tobytes
- which allows for arbitrary byte sequences.Test plan
Existing unit tests