From a6d40c78963d837e54b99b90f06d1a798db71d9e Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Tue, 9 Jun 2026 13:08:02 +0000 Subject: [PATCH] exporter: don't use errgroup.WithContext() the returned context is a child of the one we pass, except that it cancel itself when 1) a function ran with g.Go() returns an error or 2) when g.Wait() gets called. Now, none of these two situations could happen, so remove one level of context chaining for semplification. --- fs/exporter/fs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/exporter/fs.go b/fs/exporter/fs.go index 3d86313..4772c39 100644 --- a/fs/exporter/fs.go +++ b/fs/exporter/fs.go @@ -87,7 +87,8 @@ type dirPerm struct { func (p *FSExporter) Export(ctx context.Context, records <-chan *connectors.Record, results chan<- *connectors.Result) (ret error) { defer close(results) - g, ctx := errgroup.WithContext(ctx) + + var g errgroup.Group g.SetLimit(p.opts.MaxConcurrency) dirPerms := make([]dirPerm, 0, 1024)