Clarify metadata usage in documentation
When new joiners start working on Gitaly, a common piece of advice to understand the Request -> Response journey is to look at the tests.
This can cause some confusion when observing the flow of structerr
metadata. In many test cases, such as write_ref_test.go we observe the metadata as a part of the protobuf message. This is converted in the tests using WithInterceptedMetadata and structerr_interceptors.go within the Gitaly test server.
In a regular flow outside of the tests, the metadata is purely used for logging purposes. For beginners this might not be immediately intuitive so appropriate solutions might be:
- Use an alternative method to propagate metadata. gRPC header/trailer is a good candidate.
- Make this evident in our beginners guide.
- Align metadata usage closer to its real intention and observe the logs in such tests where the metadata is relevant.
Edited by Sohan Dhanak