-
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
Metrics API Scaler support different formats #5347
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: |
Do we have any update on this please? |
a951086
to
d8a1406
Compare
It seems like I have messed up the history, because I pulled the changes from kedacore:main and then tried to add DCO. I'll fix it asap |
4800a4b
to
724b63e
Compare
Hey. Hope you are well. Could you please review my code? I think it's pretty much ready. |
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.
There are test failures:
Test failures:
TestGetValueFromResponse: github.com/kedacore/keda/v2/pkg/scalers
TestGetValueFromResponse/json:_string: github.com/kedacore/keda/v2/pkg/scalers
metrics_api_scaler_test.go:155: Expected 64, got 64
TestGetValueFromResponse/json:_{}.[].{}: github.com/kedacore/keda/v2/pkg/scalers
metrics_api_scaler_test.go:155: Expected 32, got 32
TestGetValueFromResponse/yaml:_integer: github.com/kedacore/keda/v2/pkg/scalers
metrics_api_scaler_test.go:151: Expected success but got error: yaml: mapping values are not allowed in this context
metrics_api_scaler_test.go:155: Expected 2.43, got 0
TestGetValueFromResponse/yaml:_string: github.com/kedacore/keda/v2/pkg/scalers
metrics_api_scaler_test.go:151: Expected success but got error: yaml: mapping values are not allowed in this context
metrics_api_scaler_test.go:155: Expected 64, got 0
TestGetValueFromResponse/yaml:_{}.[].{}: github.com/kedacore/keda/v2/pkg/scalers
metrics_api_scaler_test.go:151: Expected success but got error: yaml: mapping values are not allowed in this context
metrics_api_scaler_test.go:155: Expected 32, got 0
This should be also covered by e2e tests:
https://github.com/kedacore/keda/blob/main/tests/scalers/metrics_api/metrics_api_test.go
Thanks!
I have fixed the unit tests. Will get e2e done soon too |
Signed-off-by: Friedrich Albert Kyuri <friedrichak42@gmail.com>
Signed-off-by: Friedrich Albert Kyuri <friedrichak42@gmail.com>
Signed-off-by: Friedrich Albert Kyuri <friedrichak42@gmail.com>
…x []interface edge case for value_by_path Signed-off-by: Friedrich Albert Kyuri <friedrichak42@gmail.com>
611a92b
to
c59af14
Compare
Signed-off-by: Friedrich Albert Kyuri <friedrichak42@gmail.com>
Signed-off-by: Friedrich Albert Kyuri <friedrichak42@gmail.com>
/run-e2e metrics_api |
The tests seem to pass. Shall I also document this change in keda-docs? |
Documentation is done as well. You can check it here: |
I believe that it can be merged if you don't have any additional comments. |
Signed-off-by: Murr Kyuri <39532283+Friedrich42@users.noreply.github.com>
Co-authored-by: Jan Wozniak <wozniak.jan@gmail.com> Signed-off-by: Murr Kyuri <39532283+Friedrich42@users.noreply.github.com>
Signed-off-by: Murr Kyuri <39532283+Friedrich42@users.noreply.github.com>
…ormat field to ensure backwards compatibility Signed-off-by: Friedrich Albert Kyuri <friedrichak42@gmail.com>
@wozniakjan I've addressed most of the points. What do you think we should do about that? |
I didn't realize the incompatibility, thanks for the thorough testing and you got me convinced to go with Now FOSSA tests appear to be failing, let me go through the repo to see if there is any info regarding these
|
I don't think it's actually failing; just need to restart it; itself report is clean |
Signed-off-by: Friedrich Albert Kyuri <friedrichak42@gmail.com>
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
(not sure if approval from me is sufficient, maybe @kedacore/keda-contributors will need to approve as well)
@zroubalik this one is ready to go. Thanks! |
/run-e2e metrics |
Provide a description of what has been changed
Checklist
Fixes #2633