-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[v2] Consolidate apiHost & host for RabbitMQ scaler #1115
[v2] Consolidate apiHost & host for RabbitMQ scaler #1115
Conversation
423a5c2
to
b013ec5
Compare
@tomkerkhove @zroubalik can you please take a look? Eventually, do we have a RabbitMQ expert? |
since this is a breaking change for v2, can you also update the CHANGELOG |
Good point! And our migration guide in the docs as well please. |
Looks like we only need a PR for it to https://github.com/kedacore/keda-docs |
@holyketzer @tbickford could you please take a look on this? |
Yeah, I will do in the evening |
@tomkerkhove do you think we need |
Docs update: kedacore/keda-docs#253 |
@@ -167,7 +158,7 @@ func (s *rabbitMQScaler) IsActive(ctx context.Context) (bool, error) { | |||
} | |||
|
|||
func (s *rabbitMQScaler) getQueueMessages() (int, error) { | |||
if s.metadata.includeUnacked { | |||
if s.metadata.protocol == httpProtocol { |
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.
With this change, if http
protocol is used, unacked
messages are always included and it is no longer optional as it was before. Am I missing anything?
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.
Hm, I think this name was confusing. From what I understand the HTTP protocol (apiHost
) was used only when includeUnacked==True
otherwise this parameter was unused (amqp case):
includeUnacked bool // if true uses HTTP API and requires apiHost, if false uses AMQP and requires host
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've done it, I think it's much more userfriendly to just provide host
than provide host
and partial information from it
closes kedacore#711 Signed-off-by: Tomek Urbaszek <tomasz.urbaszek@polidea.com>
Signed-off-by: Tomek Urbaszek <tomasz.urbaszek@polidea.com>
Signed-off-by: Tomek Urbaszek <tomasz.urbaszek@polidea.com>
Signed-off-by: Tomek Urbaszek <tomasz.urbaszek@polidea.com>
Signed-off-by: Tomek Urbaszek <tomasz.urbaszek@polidea.com>
d17cc8a
to
f01a7fc
Compare
I think
|
Then using s single uri is the simplest thing I think.
The protocol which is defined by a schema of the host can be determined automatically. And as long as the schema is provided (probably always) we should be able to figure it out for users. If we agree to have |
I would prefer to keep it because if you don't use a literal value in the scaler metadata you have to go check somewhere else. From a ops/management team I prefer not to have to do that. |
That's a good point |
f01a7fc
to
1a0a60a
Compare
Removed the last commit, please take a look at the code as well as the related docs PR: kedacore/keda-docs#253 |
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!
Signed-off-by: Tomek Urbaszek tomasz.urbaszek@polidea.com
Consolidate apiHost & host for RabbitMQ scaler
Checklist
Relates to #711