-
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
Create a new common method to parse parameter from config #5228
Create a new common method to parse parameter from config #5228
Conversation
Thank you for your contribution! 🙏 We will review your PR as soon as possible. While you are waiting, make sure to:
Learn more about: |
ea51ecd
to
27c1c70
Compare
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.
This looks really nice!
Why did you added in aziure_log_analytics_scaler.go file? We should move it to scaler.go as it's something shared, or to utils package inside scalers.
I'd add also a check for detecting if the parameters has been set in multiple places (eg: metadat and auth) to at least raise a warning (I think that error is better but just in case...) WDYT @kedacore/keda-core-contributors ?
27c1c70
to
6e6f16c
Compare
@JorTurFer I think |
That's perfect! Could you add a validation to ensure that the same key isn't read from different sources at same time? cloud that check be an overkill? |
@JorTurFer is it a validation that we are looking at? From my understanding, validation will reject/ fail the new object while what I have in mind is just throwing out warning |
Yeah, I don't have troubles just with a warning at this moment, but I guess that notifying to users somehow that for instance, the key |
6e6f16c
to
8711f2d
Compare
@JorTurFer I have made some changes that throw errors when users set values in more than 1 place. Could you help to take a look when you have some time? |
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.
LGTM!
WDYT @zroubalik ?
@dttung2905 , static checks are failing due some style issue: https://github.com/kedacore/keda/actions/runs/7187276659/job/19574505804?pr=5228 |
@JorTurFer thanks for pointing that out. I have fixed it and everything passed |
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.
e0ef4df
to
93a14bd
Compare
@zroubalik could you help to give it another review when you have time? |
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.
Looking good, let's resolve the Changelog and merge this
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
Signed-off-by: dttung2905 <ttdao.2015@accountancy.smu.edu.sg>
93a14bd
to
aed7512
Compare
I just realised one of my commit is dropped when I did the last rebase 🤦 . The commit was to address the feedback from @zroubalik #5228 (review). Hence, the current PR still only accept I managed to recover the lost commit. Will author an PR shortly |
Hi team,
This is the first steps in a two-step refactor process. We will first create a new util function to parse parameter from config . Then we move each scalers to use the new method
Assumption:
convertStringToType
takes in 'raw' value of pameter as string and convert to whatever types we wantChecklist
convertStringToType
method)Relates to #5037