-
Notifications
You must be signed in to change notification settings - Fork 541
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 ImageStreamService loop to remove use of continue
and go to statements
#2531
Comments
hi, can i pick this up? |
Improve readability and maintainability of findTagSha in ImageStreamService - Flattened nested loop structures for better readability. - Extracted complex logic into private helper methods. - Replaced continue statements with conditional logic. - Enhanced error handling for clearer exception messages. This refactor is in line with our goal to simplify complex methods and improve the overall code quality in the ImageStreamService class. Resolves eclipse-jkube#2531
…dTagSha Related to eclipse-jkube#2531 + Make retries and retry timeout configurable via new constructor + Add tests covering functionality for finding latest tag SHA in ImageStreamStatus received from OpenShift Api server. + Minor changes in old tests to use Kubernetes MockServer instead of mockito to mock OpenShiftClient Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…dTagSha Related to #2531 + Make retries and retry timeout configurable via new constructor + Add tests covering functionality for finding latest tag SHA in ImageStreamStatus received from OpenShift Api server. + Minor changes in old tests to use Kubernetes MockServer instead of mockito to mock OpenShiftClient Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Improve readability and maintainability of findTagSha in ImageStreamService - Flattened nested loop structures for better readability. - Extracted complex logic into private helper methods. - Replaced continue statements with conditional logic. - Enhanced error handling for clearer exception messages. This refactor is in line with our goal to simplify complex methods and improve the overall code quality in the ImageStreamService class. Resolves eclipse-jkube#2531
@Swaminathan11 : There is already a PR to fix this issue #2547 You can try picking up some other good first issue that's not assigned to anyone. |
Hello @rohanKanojia, I'm writing to follow up on PR #2547, which has been approved but not yet merged. Could you please let me know if there's anything more required from my side to proceed with the merge? Any additional information or steps I need to be aware of would be very helpful. Thanks for your assistance! Best regards, Thomas |
@724thomas : We usually require 2 approvals in order to merge pull requests. I'll try to ping my colleague to review your pull request this week. |
Thank you for the update. Have a great week! |
Improve readability and maintainability of findTagSha in ImageStreamService - Flattened nested loop structures for better readability. - Extracted complex logic into private helper methods. - Replaced continue statements with conditional logic. - Enhanced error handling for clearer exception messages. This refactor is in line with our goal to simplify complex methods and improve the overall code quality in the ImageStreamService class. Resolves #2531
Component
JKube Kit
Task description
Description
This loop in ImageStreamService needs some minor refactoring. It uses multiple
continue
and even go-to statement. Perhaps it's a remnant of legacy code that was ported from Fabric8 Maven Plugin.https://github.com/eclipse/jkube/blob/275dc11e9bd0a268aac94f112ac2c443960d957b/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/openshift/ImageStreamService.java#L178-L209
Refactor this loop not to use
continue
statements.Expected Behavior
Loop should not contain any
continue
statementsAcceptance Criteria
continue
statements on line 190, 194, 198The text was updated successfully, but these errors were encountered: