Fix timeout bug introduced in commit 9c6f735d.

This bug would cause POST hooks triggered for large repositories to
silently fail.

We need the update context to have the principal (which is tied to
the HTTP request), but not the cancellation (which is also tied to
the HTTP request and is triggered once the request is done either way).
This commit is contained in:
Catherine
2025-12-16 14:41:52 +00:00
parent 937aadc5d3
commit 79407ba406

View File

@@ -770,7 +770,7 @@ func postPage(w http.ResponseWriter, r *http.Request) error {
result := UpdateFromRepository(ctx, webRoot, repoURL, auth.branch)
resultChan <- result
observeSiteUpdate("webhook", &result)
}(r.Context())
}(context.WithoutCancel(r.Context()))
var result UpdateResult
select {