-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: Make watermill settings configurable #1297
Conversation
I suspect we might want to start with a lower value... do we want to wire this in with the viper configuration? |
I'm gonna make this configurable. Let it as WIP until I add it |
beb29f1
to
acfd59f
Compare
This adds configuration options for our watermill implementation. For now we only have a `go-channel` driver, which is what we've been using until now. This is also the default. The first configuration settings this adds for the aforementioned driver as the following: * `router_close_timeout`: per the watermill docs this determines how long router should work for handlers when closing. * `buffer_size`: determines the buffer size for the golang channel the driver is using. By allowing for setting the buffer size, we allow for paralellization of request handling of events. We were not setting this before and thus our event handling was serial. We should also configure the `router_close_timeout` to be slightly lower than the pod's termination grace period in our deployment. A separate PR will make that setting configurable.
acfd59f
to
374caf8
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.
just a question, but looks good. A smoke test also went fine.
@@ -107,3 +107,8 @@ github: | |||
# [*] for all events. It can also be a list such as [push,branch_protection_rule]. | |||
# Please check complete list on https://docs.github.com/es/webhooks-and-events/webhooks/webhook-events-and-payloads | |||
events: ["*"] | |||
|
|||
events: |
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.
Do we need to have these in the config.yaml? Or are they more of an illustrative example?
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.
(All the values are the defaults)
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.
We don't need to. But explicit is better than implicit
This adds configuration options for our watermill implementation. For now we only
have a
go-channel
driver, which is what we've been using until now. This isalso the default.
The first configuration settings this adds for the aforementioned driver as the following:
router_close_timeout
: per the watermill docs this determines how long router should work for handlers when closing.buffer_size
: determines the buffer size for the golang channel the driver is using.By allowing for setting the buffer size, we allow for paralellization of
request handling of events. We were not setting this before and thus
our event handling was serial.
We should also configure the
router_close_timeout
to be slightly lower thanthe pod's termination grace period in our deployment. A separate PR will make
that setting configurable.