868 B · 26 lines · Created 6mo ago
123456789101112131415161718192021222324252627commit 645f0175dfb59df39480cd171647875a91faec3bAuthor: oppiliappan <me@oppi.li>Date: Tue Apr 21 16:21:57 2026 +0100
knotserver: fix ingesting empty pulls Signed-off-by: oppiliappan <me@oppi.li>
diff --git a/flake.lock b/flake.lockindex 6570b0b3e..ea4a23613 100644Binary files a/flake.lock and b/flake.lock differdiff --git a/knotserver/ingester.go b/knotserver/ingester.goindex 41fdc27bb..daa041667 100644--- a/knotserver/ingester.go+++ b/knotserver/ingester.go@@ -181,6 +181,10 @@ func (h *Knot) fetchLatestSubmission(ctx context.Context, did, rkey string, reco return nil, fmt.Errorf("failed to resolve PR owner handle: %w", err) } + if len(record.Rounds) == 0 {+ return nil, fmt.Errorf("failed to fetch latest submission, no rounds in record")+ }+ roundNumber := len(record.Rounds) - 1 round := record.Rounds[roundNumber]