Skip to content
Snippets Groups Projects
Commit bd1b9fa0 authored by Patrick Steinhardt's avatar Patrick Steinhardt
Browse files

repository: Implement new `SetFullPath()` RPC

Since quite some time, we have tried to get rid of calls which modify
the on-disk gitconfig file. For one these include calls which add or
remove remotes, which are soon to be removed from Gitaly now that Rails
doesn't call them anymore. On the other hand, this also includes calls
which modify the gitconfig directly. There are currently two upstream
callers of those RPCs:

    - The first usecase is to set up JWT credentials for `FetchRemote()`
      calls. Those credentials are passed via HTTP headers, which is in
      fact already supported by `FetchRemote` without having to manually
      write them into the gitconfig. Those are thus easy to replace.

    - The second usecase is to set "gitlab.fullpath": this key simply
      records the repository's path in GitLab such that it's easy to see
      for admins what repository this is. This has been implemented to
      bridge the gap between the old storage layout and our new hashed
      storages.

This commit addresses the second usecase by introducing a new RPC
`SetFullPath()`. Instead of allowing callers to modify the gitconfig
arbitrarily, this will only allow callers to explicitly set
"gitlab.fullpath". With this in place, we can eventually remove
`AddConfig()` and `RemoveConfig()` given that they're not required
anymore.

Changelog: added
parent bf55b6fc
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment