Conversation
Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: bwplotka <bwplotka@gmail.com>
Signed-off-by: bwplotka <bwplotka@gmail.com>
from
return e2emonitoring.NewInstrumentedRunnable(env, name).WithPorts(ports, "http").Init(e2e.StartOptions{
Image: o.image,
Command: e2e.NewCommand("sidecar", e2e.BuildKingpinArgs(args)...),
Readiness: e2e.NewHTTPReadinessProbe("http", "/-/ready", 200, 200),
User: strconv.Itoa(os.Getuid()),
})
to
return e2emonitoring.AsInstrumented(env.Runnable(name).WithPorts(ports).Init(e2e.StartOptions{
Image: o.image,
Command: e2e.NewCommand("sidecar", e2e.BuildKingpinArgs(args)...),
Readiness: e2e.NewHTTPReadinessProbe("http", "/-/ready", 200, 200),
User: strconv.Itoa(os.Getuid()),
}), "http")
Signed-off-by: bwplotka <bwplotka@gmail.com>
saswatamcode
left a comment
There was a problem hiding this comment.
Thanks! This looks awesome! 🌟
One minor comment.
There was a problem hiding this comment.
cool refactor, I think it makes sense to split in different packages according with different responsibilities, as you did here :)
regarding breaking the current API - is being backwards compatible something we would pay attention to? or once this is merged and a new tag is created, those changes will be communicated in the release?
I left some suggestions
Correct, plus we are not v1.x, yet so we can change things. |
Co-authored-by: Jéssica Lins <jessicaalins@gmail.com>
Signed-off-by: bwplotka <bwplotka@gmail.com>
| @@ -264,11 +256,3 @@ func (r *instrumentedRunnable) WaitRemovedMetric(metricName string, opts ...Metr | |||
|
|
|||
| return errors.Newf("the metric %s is still exported by %s", metricName, r.Name()) | |||
| } | |||
|
|
|||
| func NewErrInstrumentedRunnable(name string, err error) InstrumentedRunnable { | |||
There was a problem hiding this comment.
What's the replacement for this now? Trying to upgrade the version on the Thanos side
There was a problem hiding this comment.
It's InstrumentedRunnable{Runnable: e2e.NewError... (:
| } | ||
|
|
||
| func (s *Service) GetMonitoringRunnable() e2e.InstrumentedRunnable { | ||
| return s.p.InstrumentedRunnable |
There was a problem hiding this comment.
Removing this breaks the meta monitoring E2E test so probably we need to add it back.
NOTE: This breaks API, but it should be now more consistent, easier to use and easier to extend.
I tried different approaches, but I found that splitting extensions to different packages (e.g profiling and monitoring) and simplifying will work the best. Let me know what you think!
Essentially this replaces definition like this:
with
Not a big deal from usage, but much more cleaner when we start adding other extension to runnables like profiling.