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

Refactor IBM MQ scaler and remove and deprecate variables #6034

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

rickbrouwer
Copy link
Contributor

@rickbrouwer rickbrouwer commented Aug 5, 2024

  • The queueManager parameter is currently checked to see if it's filled, but it's not used elsewhere in the code. This unused code is removed.
  • The parameter tlsDisabled (as mentioned in the documentation) / tls (as mentioned in the code) will be announced as being deprecated in a further release. All other scalers use the parameter unsafeSsl. To maintain consistency between other scalers, we are making changes, as unsafeSsl already handles this functionality. tls will still be supported. When both variables are filled in, an error message is logged and returned. If only tls is filled in, its value will be assigned to unsafeSsl. A deprecation info message will be logged. My proposal is to tag the tls parameter with deprecated=use unsafeSsl instead in version 2.18 and remove the deprecated code.
  • Refactor the scaler to match the new metadata guidelines.

Checklist

Fixes #6033
Docs: 1445
Related: 5797

@JorTurFer
Copy link
Member

JorTurFer commented Aug 5, 2024

Hello
Thanks for the improvement! We can remove unused parameters but we can't remove the used ones without following the deprecation policy
To remove the parameter tls we have to support it + the new one, printing a deprecation warning when it's used (+ the deprecation announce, etc...).

Could you update the PR to align it with our deprecation policy? I think that unifying is always better

@wozniakjan
Copy link
Member

would it be possible to also refactor the scaler to match the new metadata guidelines as outlined by #5797 and #5676? No worries if not, just thought it might make sense to do that if it doesn't bring too much trouble.

@rickbrouwer rickbrouwer marked this pull request as draft August 5, 2024 18:50
@rickbrouwer
Copy link
Contributor Author

would it be possible to also refactor the scaler to match the new metadata guidelines as outlined by #5797 and #5676? No worries if not, just thought it might make sense to do that if it doesn't bring too much trouble.

I think that is possible. I will work on it and get back to you as soon as possible.

@rickbrouwer rickbrouwer changed the title refactor: Remove unused variables in IBM MQ scaler Refactor IBM MQ scaler and remove and deprecate variables Aug 12, 2024
@rickbrouwer rickbrouwer marked this pull request as ready for review August 13, 2024 06:38
@rickbrouwer
Copy link
Contributor Author

Hello Thanks for the improvement! We can remove unused parameters but we can't remove the used ones without following the deprecation policy To remove the parameter tls we have to support it + the new one, printing a deprecation warning when it's used (+ the deprecation announce, etc...).

Could you update the PR to align it with our deprecation policy? I think that unifying is always better

Thanks. You are absolutely right! I have updated the PR. tls will still be supported now. When tls is filled in, a deprecation info message will be logged. My proposal is to tag the tls parameter with deprecated=use unsafeSsl instead (according to the new metadata guidelines) and remove the deprecated code in version 2.17. What do you think?

Copy link
Member

@wozniakjan wozniakjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the changes for IBM scaler look really good!

ptal @JorTurFer

@wozniakjan
Copy link
Member

ptal @kedacore/keda-core-contributors, I think this should be good to merge

@rickbrouwer rickbrouwer marked this pull request as draft August 19, 2024 14:41
@rickbrouwer
Copy link
Contributor Author

ptal @kedacore/keda-core-contributors, I think this should be good to merge

I forgot the usernameFromEnv and the passwordFromEnv. I will fix this tomorrow.

CHANGELOG.md Outdated Show resolved Hide resolved
@JorTurFer
Copy link
Member

LGTM, just an small nit

pkg/scalers/ibmmq_scaler.go Outdated Show resolved Hide resolved
pkg/scalers/ibmmq_scaler.go Outdated Show resolved Hide resolved
Copy link
Member

@JorTurFer JorTurFer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! ❤️

@JorTurFer
Copy link
Member

JorTurFer commented Aug 20, 2024

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

@JorTurFer JorTurFer merged commit 03041f4 into kedacore:main Aug 20, 2024
19 checks passed
fira42073 pushed a commit to fira42073/keda that referenced this pull request Aug 25, 2024
JorTurFer pushed a commit to JorTurFer/keda that referenced this pull request Oct 7, 2024
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.

Remove unused variables in IBM MQ scaler
4 participants