New ๐ŸŒŠ wave for @helm

Commit 47c8619a

47c8619aa4ebMerged

alexchspb <[email protected]> ยท 1 year ago ยท 1 file ยท ~1 modified

Description

Update values.go

Fix concurrent map writes

Details

Commit
47c8619aa4eb
Parent
9bd36b364e11

pkg/release/values.gomodifiedView file

@@ -222,6 +222,7 @@
222222 }
223223
224224 func (rel *config) BuildValues(ctx context.Context, dir, templater string) error {
225+ var mu sync.Mutex
225226 vals := rel.Values()
226227
227228 wg := parallel.NewWaitGroup()
@@ -248,7 +249,9 @@
248249 switch {
249250 case !v.Strict && errors.Is(ErrValuesNotExist, err):
250251 l.WithError(err).Warn("skipping values...")
252+ mu.Lock()
251253 toDeleteMap[v] = true
254+ mu.Unlock()
252255 case err != nil:
253256 l.WithError(err).Error("failed to build values")
254257