From 3397a011a3bbbdac2f7299ea4f869cd71b2d0a22 Mon Sep 17 00:00:00 2001 From: garethgeorge Date: Mon, 18 Nov 2024 00:37:48 -0800 Subject: [PATCH] fix: allow 'run command' tasks to proceed in parallel to other repo operations --- internal/orchestrator/repo/repo.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/orchestrator/repo/repo.go b/internal/orchestrator/repo/repo.go index 14d7bc06..be085299 100644 --- a/internal/orchestrator/repo/repo.go +++ b/internal/orchestrator/repo/repo.go @@ -388,10 +388,9 @@ func (r *RepoOrchestrator) AddTags(ctx context.Context, snapshotIDs []string, ta return nil } -// RunCommand runs a command in the repo's environment. Output is buffered and sent to the onProgress callback in batches. +// RunCommand runs a command in the repo's environment. +// NOTE: this function does not lock the repo. func (r *RepoOrchestrator) RunCommand(ctx context.Context, command string, writer io.Writer) error { - r.mu.Lock() - defer r.mu.Unlock() ctx, flush := forwardResticLogs(ctx) defer flush()