You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a GitRepo is updated such that a path to a bundle changes, but
resources overlap between the old and new paths, there was a risk of
obsolete bundles being cleaned up after newer bundles had been created.
This would happen intermittently due to a race condition, and cause
deletion of resources from the newer bundle, leading to the GitRepo
status appearing as _Modified_.
To remedy this, `fleet apply` now deletes obsolete bundles synchronously
before writing new ones, that last step happening asynchronously as it
previously did.
// 1. Goroutines will be launched, honouring the concurrency limit, and eventually block trying to write to `bundlesChan`.
121
127
// 2. The main function will read from `bundlesChan`, hence unblocking the goroutines. This will continue to read from `bundlesChan` until it is closed.
122
128
// 3. We use another goroutine to wait for all goroutines to finish, then close `bundlesChan`, finally unblocking the main function.
123
-
bundlesChan:=make(chan*fleet.Bundle)
129
+
130
+
bundlesChan:=make(chan*bundleWithOpts)
124
131
eg, ctx:=errgroup.WithContext(pctx)
125
132
eg.SetLimit(bundleCreationMaxConcurrency+1) // extra goroutine for WalkDir loop
// 1. Goroutines will be launched, honouring the concurrency limit, and eventually block trying to write to `bundlesChan`.
223
240
// 2. The main function will read from `bundlesChan`, hence unblocking the goroutines. This will continue to read from `bundlesChan` until it is closed.
224
241
// 3. We use another goroutine to wait for all goroutines to finish, then close `bundlesChan`, finally unblocking the main function.
225
-
bundlesChan:=make(chan*fleet.Bundle)
242
+
bundlesChan:=make(chan*bundleWithOpts)
226
243
eg, ctx:=errgroup.WithContext(pctx)
227
244
eg.SetLimit(bundleCreationMaxConcurrency+1) // extra goroutine for WalkDir loop
0 commit comments