DockerCLI/cli-plugins/manager
CrazyMax e14f5fc1a7
revert "improve plugins discovery performance"
This reverts commit 62f2358b99.

Spawning a goroutine for each iteration in the loop when listing
plugins is racy unfortunately. `plugins` slice is protected with
a mutex so not sure why it fails.

I tried using a channel to collect the plugins instead of a slice
to guarantee that they will be appended to the list in the order
they are processed but no dice.

I also tried without errgroup package and simply use sync.WaitGroup
but same. I have also created an extra channel to receive errors
from the goroutines but racy too.

I think the change in this function is not related to the race
condition but newPlugin is. So revert in the meantime :(

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-03-31 16:20:42 +02:00
..
candidate.go Use golang.org/x/sys/execabs 2021-01-26 17:18:04 +00:00
candidate_test.go Always enable experimental features 2020-10-02 15:59:42 +02:00
cobra.go load plugin command stubs when required 2023-03-28 06:16:55 +02:00
error.go Update some uses of errors.Cause() to errors.Is() 2020-05-10 19:56:35 +02:00
error_test.go cli-plugins/manager: TestPluginError: don't use yaml.Marshal 2022-11-17 13:17:51 +01:00
manager.go revert "improve plugins discovery performance" 2023-03-31 16:20:42 +02:00
manager_test.go format go with gofumpt (with -lang=1.19) 2022-09-30 19:14:36 +02:00
manager_unix.go gofmt with go1.17 2022-03-26 20:21:00 +01:00
manager_windows.go Search Windows CLI plugins also in ProgramFiles 2019-03-20 11:45:03 -07:00
metadata.go Always enable experimental features 2020-10-02 15:59:42 +02:00
plugin.go format code with gofumpt 2022-09-30 11:59:11 +02:00
suffix_unix.go format code with gofumpt 2022-09-30 11:59:11 +02:00
suffix_windows.go Check for `.exe` case insensitively 2019-01-30 13:45:26 +00:00