1
0
Fork 0
mirror of https://github.com/imjasonh/kontain.me synced 2026-07-07 00:32:28 +00:00
kontain.me/cmd/infinite-go/test.sh
Jason Hall c90342181d fix upload-pack negotiation for stateless-RPC
Three related bugs in the git smart-HTTP upload-pack handler surfaced as
'bad band #78', 60s 504 hangs, and "expected ACK/NAK, got '?PACK'" when
fetching after previous pulls.

- Don't advertise no-done; we don't implement the ACK ready handshake.
- With multi_ack_detailed, don't emit per-round NAKs — only the final
  one after 'done'. Per-round NAKs make the client treat the first as
  the transition to sideband pack data, then choke on the second.
- Break out of the negotiation loop when a round reads no content
  (client closed without 'done') so we don't spin on EOF.
- Only emit pack data when 'done' was actually received. Non-final
  rounds get just NAK so HTTP keep-alive doesn't desync the next round.

Also trigger null_resource.test on the ko_build image digest so tests
re-run on every deploy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-13 21:54:40 -04:00

27 lines
693 B
Bash
Executable file

#!/usr/bin/env bash
set -eux
# go-get discovery returns a meta tag pointing at the module's git URL.
curl -fsSL "https://infinite-go.kontain.me/?go-get=1" | grep -F 'name="go-import"'
# It also serves a real git repo, so clone+pull produces new content.
dir=$(mktemp -d)
trap 'rm -rf "$dir"' EXIT
git clone https://infinite-go.kontain.me/ "$dir/repo"
cd "$dir/repo"
test -f go.mod
test -f pulltime.go
before=$(git rev-parse HEAD)
git pull
after=$(git rev-parse HEAD)
if [ "$before" = "$after" ]; then
echo "expected a new commit, but HEAD didn't move ($before)"
exit 1
fi
GOPROXY=direct go get infinite-git.kontain.me@latest
GOPROXY=direct go get infinite-git.kontain.me@latest