-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[chore]: Expand e2e testbed #27251
[chore]: Expand e2e testbed #27251
Conversation
eb146a1
to
810156e
Compare
810156e
to
23978db
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.
What's the rationale for implementing this as a connector rather than a processor?
8431b17
to
78f4946
Compare
@djaglowski turns out we don't need to add a new mock component right now. I tweaked mockbackend to propagate the errors back to our data sender (with |
6f7c633
to
4632ccb
Compare
4632ccb
to
50efc64
Compare
Please address CI failures |
@djaglowski CI's green! Please review. |
@TylerHelmuth does the changes look good to you? |
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.
LGTM, but I am not very familiar with this testbed. I'd like someone else to approve as well
testbed/testbed/load_generator.go
Outdated
for { | ||
if err := traceSender.ConsumeTraces(context.Background(), traceData); err != nil { | ||
if consumererror.IsPermanent(err) { | ||
if lg.prevErr == nil || lg.prevErr.Error() != err.Error() { |
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.
Can you add a comment explaining the meaning of the conditions on this line?
testbed/testbed/mock_backend.go
Outdated
DroppedLogs []plog.Logs | ||
|
||
// decision to return permanent/non-permanent errors | ||
decision int |
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.
This notion of a "decision" is very generic. I also don't think a mandatory integer is an appropriate way to configure test cases. Finally, I think this kind of logic should not dominate the codebase of a simple and more widely used function.
To that end, I suggest the following:
- Use an options pattern to optionally pass this configuration to
NewMockBackend
. - Instead of saving an int and switching on it. Just save the appropriate function here. (Default always returns nil.) Whether or not the error is permanent can be ascertained from the returned error.
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.
@djaglowski I have updated to use function instead of integer and removed the mandatory integer.
Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
fa6385d
to
51a8fa7
Compare
51a8fa7
to
88b7b1d
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.
LGTM
@TylerHelmuth @djaglowski can we merge this one? I've rebased it to main and CI's green. |
Related issue: open-telemetry#20552 Tweak the mock-backend to do following: - Receives data from the receiver. - Returns errors randomly to our receiver, which attempts to resend/drop the data. This is helpful when we're required to test random behaviors of the collector and ensure reliable data delivery. This is my initial PR to expand the testbed. This will help my further efforts to expand the testbed. Myself and @omrozowicz-splunk plan on adding `sending_queue` support to the testbed and expanding the testing capabilities. --------- Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
Related issue: open-telemetry#20552 Tweak the mock-backend to do following: - Receives data from the receiver. - Returns errors randomly to our receiver, which attempts to resend/drop the data. This is helpful when we're required to test random behaviors of the collector and ensure reliable data delivery. This is my initial PR to expand the testbed. This will help my further efforts to expand the testbed. Myself and @omrozowicz-splunk plan on adding `sending_queue` support to the testbed and expanding the testing capabilities. --------- Co-authored-by: Daniel Jaglowski <jaglows3@gmail.com>
Related issue: #20552
Tweak the mock-backend to do following:
This is helpful when we're required to test random behaviors of the collector and ensure reliable data delivery.
This is my initial PR to expand the testbed. This will help my further efforts to expand the testbed.
Myself and @omrozowicz-splunk plan on adding
sending_queue
support to the testbed and expanding the testing capabilities.