From 254224c182e56978aeed418ce89550e1e1cd00f8 Mon Sep 17 00:00:00 2001 From: Nicolas De Loof Date: Fri, 6 Dec 2024 14:39:21 +0100 Subject: [PATCH] first watch action for a file event wins Signed-off-by: Nicolas De Loof --- pkg/compose/watch.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/compose/watch.go b/pkg/compose/watch.go index ae3ddf797c5..fc501a330a9 100644 --- a/pkg/compose/watch.go +++ b/pkg/compose/watch.go @@ -371,7 +371,10 @@ func batchDebounceEvents(ctx context.Context, clock clockwork.Clock, delay time. flushEvents() return } - seen[e.HostPath] = e + if _, ok := seen[e.HostPath]; !ok { + // already know updated path, first rule in watch configuration wins + seen[e.HostPath] = e + } t.Reset(delay) } }