Skip to content

Commit 9388569

Browse files
committed
Increase processing timeout
Calculating diffs on promotion pull requests like [1] fails since the context is timing out and processing is aborted. This is evident from logs. Error getting manifests for app ..., revision ...: rpc error: code = DeadlineExceeded desc = context deadline exceeded" Error generating diff for component ...: rpc error: code = DeadlineExceeded desc = context deadline exceeded" Handling of PR event failed: err=getting diff information: rpc error: code = DeadlineExceeded desc = context deadline exceeded\n" ... Increasing the timeout is a short-term fix to mitigate the issue and allow users to get the diff while additional investigation is done to figure out how we can address this better long-term. [1] commercetools/k8s-gitops#998
1 parent e695d4c commit 9388569

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/pkg/githubapi/github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ func ReciveWebhook(r *http.Request, mainGhClientCache *lru.Cache[string, GhClien
365365
func handleEvent(eventPayloadInterface interface{}, mainGhClientCache *lru.Cache[string, GhClientPair], prApproverGhClientCache *lru.Cache[string, GhClientPair], r *http.Request, payload []byte) {
366366
// We don't use the request context as it might have a short deadline and we don't want to stop event handling based on that
367367
// But we do want to stop the event handling after a certain point, so:
368-
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
368+
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
369369
defer cancel()
370370
var mainGithubClientPair GhClientPair
371371
var approverGithubClientPair GhClientPair

0 commit comments

Comments
 (0)