Loading
Fix Cells receive-pack server-first handshake
What does this MR do and why?
Contributes to #874
Problem
Cells pushes keep a receive-pack request idle while the client's pre-push hook runs (for example Git LFS uploads). Cloudflare closes the idle connection after about 15 seconds and the push fails.
Solution
Split the SSH-over-HTTP receive-pack into two requests:
- Send a command-less request (
0000body) and relay its ref advertisement to the client. - Wait for the client to start sending, then open the streaming request and relay its response, skipping the repeated advertisement.
No request is open toward the cell while the client is silent. This adds one short request per push (0.1–0.6 s against a GDK cell). Pull is unchanged.
References
How to set up and validate locally
go test -mod=mod ./internal/command/githttp/... ./internal/pktline/...- Optionally push to a GDK cell with an LFS or pre-push delay.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Vasilii Iakliushin