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

Add IBM MQ scaler e2e test #5854

Merged
merged 6 commits into from
Jun 25, 2024
Merged

Add IBM MQ scaler e2e test #5854

merged 6 commits into from
Jun 25, 2024

Conversation

ayoyu
Copy link
Contributor

@ayoyu ayoyu commented Jun 2, 2024

Description of what has been changed:

{
  "commandResponse": [{
    "completionCode": 2,
    "reasonCode": 2085,
    "message": ["AMQ8147E: IBM MQ object bar not found."]
  }],
  "overallReasonCode": 3008,
  "overallCompletionCode": 2
}

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
  • Fix an embedded nil error by removing it

Checklist

  • I have verified that my change is according to the deprecations & breaking changes policy
  • Tests have been added
  • Changelog has been updated and is aligned with our changelog requirements
  • A PR is opened to update our Helm chart (repo) (if applicable, ie. when deployment manifests are modified)
  • A PR is opened to update the documentation on (repo) (if applicable)
  • Commits are signed with Developer Certificate of Origin (DCO - learn more)

Fixes #1287

ayoyu added 3 commits June 3, 2024 00:31
Signed-off-by: ayoyu <khaliayoub9@gmail.com>
…caler

Signed-off-by: ayoyu <khaliayoub9@gmail.com>
Signed-off-by: ayoyu <khaliayoub9@gmail.com>
@ayoyu ayoyu requested a review from a team as a code owner June 2, 2024 23:22
@zroubalik
Copy link
Member

zroubalik commented Jun 3, 2024

/run-e2e ibmmq
Update: You can check the progress here

Copy link
Member

@zroubalik zroubalik left a 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?

@ayoyu
Copy link
Contributor Author

ayoyu commented Jun 3, 2024

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.

@zroubalik
Copy link
Member

zroubalik commented Jun 4, 2024

/run-e2e ibmmq
Update: You can check the progress here

Signed-off-by: ayoyu <khaliayoub9@gmail.com>
@ayoyu ayoyu force-pushed the main branch 2 times, most recently from a960f8d to 90923a5 Compare June 6, 2024 21:27
@ayoyu
Copy link
Contributor Author

ayoyu commented Jun 6, 2024

great, thanks a lot! Do you think you can also add a simple unit test for the fix you included?

Test added for getQueueDepthViaHTTP related to the fix.

Signed-off-by: ayoyu <khaliayoub9@gmail.com>
@zroubalik
Copy link
Member

zroubalik commented Jun 24, 2024

/run-e2e ibmmq
Update: You can check the progress here

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
@zroubalik zroubalik merged commit 13f309a into kedacore:main Jun 25, 2024
17 checks passed
uucloud pushed a commit to uucloud/keda that referenced this pull request Jul 11, 2024
* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add e2e test for IBM MQ Scaler
2 participants