Skip to content

middleware: Stop extracting object pool repo

James Liu requested to merge jliu-remove-extract-repo-casting into master

Addresses !6747 (comment 1881469291)

f6aa35a2 (middleware: Log nested Repository fields) modified the gRPC middleware such that gitalypb.Repository fields which were nested in a request message were properly extracted for logging purposes. This was accomplished by using the MethodInfo.TargetRepo() helper to extract the appropriate field.

That change had the by-product of duplicating the repository data for object pool-scoped requests. This happened because object pool-scoped requests were handled by the old interface casting method in addition to the TargetRepo() helper.

Remove the interface casting as well as the associated objectPool field in the RequestInfo struct. All of the repository data are already captured in the Repository field of the struct anyway.

Edited by James Liu

Merge request reports