istio / old_mixer_repo

Deprecated home of Istio's Mixer and its adapters, now in istio/istio's mixer dir
https://github.com/istio/istio/tree/master/mixer
Apache License 2.0
67 stars 93 forks source link

Support reporting errors in daemons/go routines started by adapters #1075

Open ZackButcher opened 7 years ago

ZackButcher commented 7 years ago

We expect adapter authors to use adapter.Env to start any go routines, including long-lived "daemon" go routines. However, we have no way for these jobs to return errors. We need to build out a way to communicate errors to the Mixer framework.

ZackButcher commented 7 years ago

A likely solution is to have a chan<- error embedded in the Env that can be used to push errors in go routines/daemons upstream. From there Mixer framework can use those values to make decisions.

geeknoid commented 7 years ago

How do you expect errors from daemons to be used by Mixer? Seems very adapter-specific behavior, doesn't it?

ZackButcher commented 7 years ago

AFAIK we're planning on eventually supporting more sophisticated things like removing adapters that are causing errors automatically, right? If so, we want errors from go routines/daemons that the adapter starts to feed into that system as well, not just the runtime return errors.

geeknoid commented 7 years ago

Hmmm. I think we'll deal specifically with adapters that crash, not those that merely return errors. In that context, by forcing adapters to use Env for scheduling goroutines, we already have the protection in place for us to detect failures in adapter goroutines and handle them appropriately.

So I think we've got all the support we need/want already.