Create a new common method to parse parameter from config #5228
Create a new common method to parse parameter from config #5228zroubalik merged 5 commits intokedacore:mainfrom
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
JorTurFer
left a comment
There was a problem hiding this comment.
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? |
|
@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 |
e0ef4df to
93a14bd
Compare
|
@zroubalik could you help to give it another review when you have time? |
zroubalik
left a comment
There was a problem hiding this comment.
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:
convertStringToTypetakes in 'raw' value of pameter as string and convert to whatever types we wantChecklist
convertStringToTypemethod)Relates to #5037