Skip to content

Add internal gitserver exec proxy route

Administrator requested to merge 7812-poc into master

Created by: efritz

Add an internal proxy route to hit gitserver with a repository ID rather than a name. Implements #7812 .

❯ curl http://localhost:3090/.internal/git/5/exec -X POST -d '{"args": ["log", "--pretty=%H %P", "-10"]}' -i
HTTP/1.1 200 OK
Content-Type: application/json
Content-Type: text/plain; charset=utf-8
Date: Thu, 16 Jan 2020 19:46:42 GMT
Trailer: X-Exec-Exit-Status, X-Exec-Stderr, X-Exec-Error
Vary: Accept-Encoding
Transfer-Encoding: chunked

333f01cef0d61f9ef05ada3d94e00e69c8d5cdda 49d8fa7cc9aa91da3b51ae1aacca787e97ec6019 06342cf74fff55134a5d60b41508ca26cc89c3ac
06342cf74fff55134a5d60b41508ca26cc89c3ac c333d152b1e40ed06c25788ba34d76d68c69a28e
c333d152b1e40ed06c25788ba34d76d68c69a28e 1b4c82166660c12d742dedffa1cabea1ffe21a69
49d8fa7cc9aa91da3b51ae1aacca787e97ec6019 1b4c82166660c12d742dedffa1cabea1ffe21a69 6453c2869cca599d901c83abd4a14e43ebea277f
6453c2869cca599d901c83abd4a14e43ebea277f 1b4c82166660c12d742dedffa1cabea1ffe21a69
1b4c82166660c12d742dedffa1cabea1ffe21a69 55450579111f95e3722cb93dec62fe9e847d6130 0dc0c2165f0699c1bb34fb8d2fc55bc10c58331e
0dc0c2165f0699c1bb34fb8d2fc55bc10c58331e 55450579111f95e3722cb93dec62fe9e847d6130
55450579111f95e3722cb93dec62fe9e847d6130 82e1269dd254a62979496b60d30d313b6259af64 8ff800430e3e4719a6902714283d9220bcb3a84c
8ff800430e3e4719a6902714283d9220bcb3a84c 82e1269dd254a62979496b60d30d313b6259af64
82e1269dd254a62979496b60d30d313b6259af64 82ce871c27ca8919bcdb97d69bcf461499171b27 82cc0ac61ce4097b55dd5709375d9e87b18360eb
X-Exec-Error:
X-Exec-Exit-Status: 0
X-Exec-Stderr:

If this direction looks ok to @sourcegraph/core-services I will add tests/tracing and do whatever suggested refactoring you have. If not, I'll start from scratch with whatever direction seems more appropriate.

See issue for context about design choices.

Merge request reports

Loading