-
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
Add IBM MQ scaler e2e test #5854
Conversation
Signed-off-by: ayoyu <khaliayoub9@gmail.com>
…caler Signed-off-by: ayoyu <khaliayoub9@gmail.com>
Signed-off-by: ayoyu <khaliayoub9@gmail.com>
/run-e2e ibmmq |
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.
great, thanks a lot! Do you think you can also add a simple unit test for the fix you included?
Yes I will add it. |
/run-e2e ibmmq |
Signed-off-by: ayoyu <khaliayoub9@gmail.com>
a960f8d
to
90923a5
Compare
Test added for |
Signed-off-by: ayoyu <khaliayoub9@gmail.com>
/run-e2e ibmmq |
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
* Add e2e test for ibmmq scaler Signed-off-by: ayoyu <khaliayoub9@gmail.com> * Add error handling for missing command response parameters in ibmmq scaler Signed-off-by: ayoyu <khaliayoub9@gmail.com> * Remove embedded nil error Signed-off-by: ayoyu <khaliayoub9@gmail.com> * Fix deprecated nodeAffinity keys in ibmmq helm chart Signed-off-by: ayoyu <khaliayoub9@gmail.com> * Add getQueueDepthViaHTTP tests Signed-off-by: ayoyu <khaliayoub9@gmail.com> --------- Signed-off-by: ayoyu <khaliayoub9@gmail.com> Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com> Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com> Signed-off-by: uucloud <uucloud@qq.com>
Description of what has been changed:
commandResponse[0].parameters
field is missing in case of an error as discussed in this comment Add e2e test for IBM MQ Scaler #1287 (comment) . Reference about the response body format (JSON schema): https://www.ibm.com/docs/en/ibm-mq/9.3?topic=adminactionqmgrqmgrnamemqsc-post-json-formatted-command#q133340___responseformat__title__1For example when querying the current queue depth of a non existing queue:
Example from the operator log with the new error handling:
2024-06-02T16:18:50Z INFO Detected resource targeted for scaling {"controller": "scaledobject", "controllerGroup": "keda.sh", "controllerKind": "ScaledObject", "ScaledObject": {"name":"ibmmq-consumer","namespace":"ibmmq-test-ns"}, "namespace": "ibmmq-test-ns", "name": "ibmmq-consumer", "reconcileID": "c064a17e-7cd1-4a1e-ba90-c3dc8f4b4a6d", "resource": "apps/v1.Deployment", "name": "ibmmq-consumer"} +2024-06-02T16:18:51Z ERROR scale_handler error getting scale decision {"scaledObject.Namespace": "ibmmq-test-ns", "scaledObject.Name": "ibmmq-consumer", "scaler": "IBMMQScaler", "error": "error inspecting IBM MQ queue depth: failed to get the current queue depth parameter, reason: AMQ8147E: IBM MQ object FAKE.QUEUE not found."} github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).getScalerState /workspace/pkg/scaling/scale_handler.go:780 github.com/kedacore/keda/v2/pkg/scaling.(*scaleHandler).getScaledObjectState.func1 /workspace/pkg/scaling/scale_handler.go:633
Checklist
Fixes #1287