Skip to content
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

QueueName not correctly encoded in Solace PubSub+ Scaler #4936

Closed
sueltschi-sbb opened this issue Sep 1, 2023 · 3 comments · Fixed by #4940
Closed

QueueName not correctly encoded in Solace PubSub+ Scaler #4936

sueltschi-sbb opened this issue Sep 1, 2023 · 3 comments · Fixed by #4940
Labels
bug Something isn't working

Comments

@sueltschi-sbb
Copy link

Report

The 'queueName' Value in https://keda.sh/docs/2.11/scalers/solace-pub-sub/ isn't URL decoded in https://github.com/kedacore/keda/blob/main/pkg/scalers/solace_scaler.go#L248

This leads to problems when a queue name contains a slash (e.g. messages/large) because it leads to an invalid path when calling the SEMP Rest API resulting in a "400 Bad Request" response.

A workaround for now is to manually URL-encode the queueName value

Expected Behavior

The queueName should be correctly URL-encoded

Actual Behavior

Queue names containing a slash lead to "400 Bad Request" responses from the SEMP endpoint

Steps to Reproduce the Problem

  1. create a queue containing a slash in the name (e.g. 'messages/large')
  2. create a solace-event-queue trigger for this queue
  3. observe that the trigger fails to execute with a "400 Bad Request" message

Logs from KEDA operator

No response

KEDA Version

None

Kubernetes Version

None

Platform

Red Hat OpenShift

Scaler Details

No response

Anything else?

No response

@sueltschi-sbb sueltschi-sbb added the bug Something isn't working label Sep 1, 2023
@JorTurFer
Copy link
Member

Interesting. The scaler should encode the queue name automatically, but it looks like it's not doing it.
Are you willing to fix it? This is the code where the endpoint is calculated, we need to url encode the queue before generating the url: https://github.com/kedacore/keda/blob/main/pkg/scalers/solace_scaler.go#L248-L255

@sueltschi-sbb
Copy link
Author

Thank you @dttung2905 for fixing this so fast!

@JorTurFer
Copy link
Member

@sueltschi-sbb , we aim to cut a release at the end of the month. You can expect the fix there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants