-
Notifications
You must be signed in to change notification settings - Fork 1.3k
add DeliverGetRate, PublishedToDeliveredRatio and ExpectedQueueConsumptionTime trigger modes to RabbitMQ scaler #6933
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
Conversation
…bitMQ scaler Signed-off-by: Wojciech Moczulski <[email protected]>
Signed-off-by: Wojciech Moczulski <[email protected]>
Signed-off-by: Wojciech Moczulski <[email protected]>
Signed-off-by: Wojciech Moczulski <[email protected]>
…to the user Signed-off-by: Wojciech Moczulski <[email protected]>
|
Could you add some e2e tests under /test/rabbitmq? |
Will do, once I'll get a hold on some free time. BTW it seems that I'll have to slightly extend |
|
Currently, there is no contribution guide, but we plan to add one soon. The Docker image is written in Go and is designed to be simple and easy to use. https://github.com/kedacore/test-tools/tree/main/e2e/images/rabbitmq |
Signed-off-by: Wojciech Moczulski <[email protected]>
4159be7 to
4a39cb6
Compare
zroubalik
left a comment
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.
Thanks a lot for the contribution, this is really great. A couple of nits from my side:
- e2e test would be really great to have
- please create a new issue with the problem description and refrence in the changelog
- in the documentation PR could you please add a new paragraph with an explanation of all trigger modes we have, ie when to use what - it doesn't have to be super complex, but something along the description you put here in the PR, see the comment there: https://github.com/kedacore/keda-docs/pull/1601/files#r2300363424
… interval - add E2E tests for DeliverGetRate, PublishedToDeliveredRatio and ExpectedQueueConsumptionTime trigger modes Signed-off-by: Wojciech Moczulski <[email protected]>
- updated some output messages Signed-off-by: Wojciech Moczulski <[email protected]>
Signed-off-by: Wojciech Moczulski <[email protected]>
|
Semgrep found 6
Semgrep found a possible database connection string built with string concatenation. Check for proper encoding/escaping of components to prevent parse errors and injection vulnerabilities. |
E2E tests have been added. Note however, that they'll work only with updated
Done (#7071).
Done. |
…ght previously in bulk substitution Signed-off-by: Wojciech Moczulski <[email protected]>
…ght previously in bulk substitution Signed-off-by: Wojciech Moczulski <[email protected]>
Signed-off-by: Wojciech Moczulski <[email protected]>
Signed-off-by: Wojciech Moczulski <[email protected]>
Signed-off-by: Wojciech Moczulski <[email protected]>
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.
Pull Request Overview
This PR adds three new trigger modes to the RabbitMQ scaler: DeliverGetRate, PublishedToDeliveredRatio, and ExpectedQueueConsumptionTime. These new modes provide more granular scaling capabilities based on message delivery rates and queue consumption patterns.
- Updates RabbitMQ scaler to support delivery rate monitoring and ratio-based scaling
- Adds comprehensive test coverage for the new trigger modes with dedicated test files
- Improves error messages and code maintainability throughout the scaler implementation
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/scalers/rabbitmq_scaler.go | Core implementation of new trigger modes and updated scaler logic |
| pkg/scalers/rabbitmq_scaler_test.go | Updated unit tests with new trigger mode test data |
| tests/scalers/rabbitmq/rabbitmq_helper.go | Enhanced helper functions for message publishing/consuming with rate control |
| tests/scalers/rabbitmq/rabbitmq_queue_http_*_test.go | Integration tests for each new trigger mode |
| CHANGELOG.md | Documentation of the new feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
/run-e2e rabbit |
|
/run-e2e rabbit |
|
tests timeout when setting up strimzi maybe related to #6929? |
Signed-off-by: Jan Wozniak <[email protected]>
|
/run-e2e rabbit |
|
all tests passed, lgtm |
Signed-off-by: Jan Wozniak <[email protected]>
|
/run-e2e rabbit |
|
@zroubalik, @wozniakjan, |
|
Thanks for the heads up, I think that my colleagues missed the docs part, sorry :( Could you rebase docs and apply the change also to v2.19? |
Introduced three additional trigger modes for RabbitMQ scaler, as proposed in #7071:
DeliverGetRate, which will activate, when given messages delivery rate will be reachedPublishedToDeliveredRatio, which will activate, when scaler hits certain level of published to delivered messages ratioExpectedQueueConsumptionTime, which will be activated when the total estimated waiting time for delivery of all messages available in the queue at a given moment (with the current capacity of consumers) reaches the indicated value.Checklist
Documentation update: kedacore/keda-docs#1601
Additional references: