-
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
add top to job requests api #4326
Conversation
Signed-off-by: Shayki Abramczyk <shayki5@gmail.com>
Signed-off-by: Shayki Abramczyk <shayki5@gmail.com>
Signed-off-by: Shayki Abramczyk <shayki5@gmail.com>
Hi @shayki5 |
Hi @JorTurFer, thank you for your quick response! |
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.
I agree with @JorTurFer, we should add a property for this :) Thanks for the contribution!
Signed-off-by: Shayki Abramczyk <shayki5@gmail.com>
@zroubalik @JorTurFer I'm not familiar with go but I tried to add it as a parameter, can you review please? thank you! |
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! Could you add this new field to the parsing tests?
As we are adding a new parameter, a PR to docs is also required explaining the new parameter. This is the file you need to edit https://github.com/kedacore/keda-docs/blob/main/content/docs/2.10/scalers/azure-pipelines.md
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Shayki Abramczyk <shayki5@gmail.com>
@JorTurFer Sure, thank you so much for the parsing test, I added it. |
Signed-off-by: Shayki Abramczyk <shayki5@gmail.com>
I didn't add the parsing test, I just suggested a change in the code to follow the sytle xD You still need to add a case here https://github.com/kedacore/keda/blob/main/pkg/scalers/azure_pipelines_scaler_test.go#L26 |
Signed-off-by: Shayki Abramczyk <shayki.abramczyk@tipalti.com>
Oh sorry, my bad, this is what happens that today is the first day for you to write go ;) I just followed the |
I think that we should cover 3 cases, empty (already covered xD), correctly provided and incorrectly provided. I mean, in case of empty we don't have anything to test, but we should test that if a correct value is set we don't raise any error and in case of wrong value set, we raise an error. |
I understand, I tried to look in the existing tests but couldn't figure out how can I implement those tests :( |
You can check how this case (activationTargetPipelinesQueueLength malformed) is added: https://github.com/kedacore/keda/blob/main/pkg/scalers/azure_pipelines_scaler_test.go#L41-L42 Basically, you need to provide the scaler values (you can take this line as base) including the new parameter, in one case wrongly (for example, setting "a" instead of a number) and other case correctly. If you check the line options, there is a boolean to specify if the case should raise an error or not. The wrong case should have true in that field because it should raise an error, the correct case should have false because not error should be raised |
Thank you so much for your explanation! I added something, can you check..? |
/run-e2e pipeline* |
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! Thanks for the improvement.
Please update the changelog (The comment I wrote) and also the test (the malformed case should raise an error, that's why the boolean has to be true)
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Shayki Abramczyk <shayki5@gmail.com>
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Shayki Abramczyk <shayki5@gmail.com>
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Signed-off-by: Shayki Abramczyk <shayki5@gmail.com>
Fixed :) thank you so much!! |
/run-e2e pipeline* |
Thanks for the contribution! |
Your prompt response and coordination are greatly appreciated! |
Most probably this week |
Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Co-authored-by: Shayki Abramczyk <shayki.abramczyk@tipalti.com>
Provide a description of what has been changed
Checklist
Fixes #4324