From 0f61b4150f69bfee656d0398f8b4125a66a9512f Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Thu, 19 Dec 2024 21:05:23 +0100 Subject: pkg/covermerger: propagate context cancellation The problem is the deadlock happening on GCS storage error. GCS client establishes the connection when it has enough data to write. It is approximately 16M. The error happens on io.Writer access in the middle of the merge. This error terminates errgroup goroutine. Other goroutines remain blocked. This commit propagates termination signal to other goroutines. --- pkg/cover/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/cover') diff --git a/pkg/cover/file.go b/pkg/cover/file.go index 2939935b9..a0561dfe7 100644 --- a/pkg/cover/file.go +++ b/pkg/cover/file.go @@ -79,7 +79,7 @@ func GetMergeResult(c context.Context, ns, repo, forCommit, sourceCommit, filePa } ch := make(chan *covermerger.FileMergeResult, 1) - if err := covermerger.MergeCSVData(config, csvReader, ch); err != nil { + if err := covermerger.MergeCSVData(c, config, csvReader, ch); err != nil { return nil, fmt.Errorf("error merging coverage: %w", err) } -- cgit mrf-deployment