-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update plugin ordering to latest Sonobuoy version #1753
Conversation
7b74436
to
bf9a98d
Compare
logrus.WithField("plugin", p.GetName()).Info("Running plugin") | ||
go aggr.RunAndMonitorPlugin(context.Background(), time.Duration(cfg.TimeoutSeconds)*time.Second, p, client, nodes.Items, cfg.AdvertiseAddress, certs[p.GetName()], aggregatorPod, progressPort, pluginResultsDir) | ||
for _, pluginGroup := range getOrderedPlugins(plugins) { | ||
var waitGroup sync.WaitGroup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 to using a WaitGroup. As someone new to Go I'm really happy to see you explored the options and found this. It really simplifies the logic.
290c212
to
fa312c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm testing this manually on my side too with some tweaks/nits/questions already made on the PR
Signed-off-by: Andrew Yunt <[email protected]>
I tried this out manually with a few cases and it worked great. Normal runs without order, worked. Edited one plugin to have order 99, launched one then the other. Modified both to have order 99, launched in parallel again. We may tweak this logic over time, but I think having this basic I already see us being able to use this and make query logic its own plugin and set its order to be high so that it gets run last. This will further simplify the core sonobuoy logic and maybe make it easier to customize too. |
What this PR does / why we need it:
Plugins should be able to run in a predetermined order. Adds order key to sonobuoy-config (lower number has a higher priority)
Which issue(s) this PR fixes