-
Notifications
You must be signed in to change notification settings - Fork 277
Modify bookbuyer demo to trip circuit breaker #1184
Conversation
demo/cmd/bookbuyer/bookbuyer.go
Outdated
@@ -16,15 +18,17 @@ import ( | |||
|
|||
const ( | |||
participantName = "bookbuyer" | |||
numConnections = 15 |
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.
It would be nice to move this out into an env var (os.Getenv
) or a CLI param to the bookbuyer
binary -- default it to 1
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 is actually interesting - if you merge it like this (before you introduce os.Getenv
we'd probably have lower flakyness, which TBH might be a good thing at this stage of the project.
This would run 15 parallel tests. One of them succeeding and notifying ci/maestro that it succeeded would be sufficient for the entire test to be successful (even if the rest of the tests / goroutines fail).
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 would suggest making the env change so that the tests are reliable with defaults. Backpressure is experimental and not enabled by default, so there shouldn't be a need to make concurrent connections. This might have an impact on how the output is rendered, and how success/failures are handled for individual goroutines by maestro.go
.
One of them succeeding and notifying ci/maestro that it succeeded would be sufficient for the entire test to be successful (even if the rest of the tests / goroutines fail).
This is not true, if there are any failures those should be caught because it shouldn't fail at all when the backpressure policy is not applied.
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 do you mean by flakiness?
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 introduce this feature with minimal impact on the CI, please introduce an env variable to configure numConnections
. This will give us better control to fine tune the CI if things go wrong. When backpressure testing is integrated as a part of the CI suite, we can increase numConnections
and use that as the default.
demo/cmd/bookbuyer/bookbuyer.go
Outdated
@@ -16,15 +18,17 @@ import ( | |||
|
|||
const ( | |||
participantName = "bookbuyer" | |||
numConnections = 15 |
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 would suggest making the env change so that the tests are reliable with defaults. Backpressure is experimental and not enabled by default, so there shouldn't be a need to make concurrent connections. This might have an impact on how the output is rendered, and how success/failures are handled for individual goroutines by maestro.go
.
One of them succeeding and notifying ci/maestro that it succeeded would be sufficient for the entire test to be successful (even if the rest of the tests / goroutines fail).
This is not true, if there are any failures those should be caught because it shouldn't fail at all when the backpressure policy is not applied.
@shashankram Would it cause issues to have |
I think keeping it concurrent while leaving the default connection as 1 should be okay because of |
b7acadc
to
26d150a
Compare
26d150a
to
26f8d64
Compare
c0860c6
to
129ecd3
Compare
0ac9cdf
to
129ecd3
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.
This looks great - we will continue to iterate!
ref #1376 |
Modify the bookbuyer demo to spin up several concurrent goroutines that buy books (configured with an env variable) and apply the CRD to see changes in Grafana and the logs.