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
Showing
- internal/gitaly/service/repository/fullpath.go 43 additions, 0 deletionsinternal/gitaly/service/repository/fullpath.go
- internal/gitaly/service/repository/fullpath_test.go 107 additions, 0 deletionsinternal/gitaly/service/repository/fullpath_test.go
- proto/go/gitalypb/repository-service.pb.go 545 additions, 406 deletionsproto/go/gitalypb/repository-service.pb.go
- proto/go/gitalypb/repository-service_grpc.pb.go 44 additions, 0 deletionsproto/go/gitalypb/repository-service_grpc.pb.go
- proto/repository-service.proto 21 additions, 0 deletionsproto/repository-service.proto
- ruby/proto/gitaly/repository-service_pb.rb 8 additions, 0 deletionsruby/proto/gitaly/repository-service_pb.rb
- ruby/proto/gitaly/repository-service_services_pb.rb 5 additions, 0 deletionsruby/proto/gitaly/repository-service_services_pb.rb
Please register or sign in to comment