Skip to content
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

feat: use client.Client instead of K8sClient in finalizer. #1183

Merged
merged 2 commits into from
Dec 22, 2024

Conversation

drivebyer
Copy link
Collaborator

  • Eliminated the K8sClient field from the Reconciler struct in Redis-related controller files, including redis_controller.go, redis_controller_suite_test.go, and redisreplication_controller.go, as it was not utilized.
  • Updated finalizer handling functions to remove K8sClient parameters, simplifying the function signatures and improving code clarity.
  • Adjusted related test cases to reflect these changes, ensuring consistency across the codebase.

This refactor enhances maintainability by streamlining the code and removing unnecessary dependencies.

Description

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • Tests have been added/modified and all tests pass.
  • Functionality/bugs have been confirmed to be unchanged or fixed.
  • I have performed a self-review of my own code.
  • Documentation has been updated or added where necessary.

Additional Context

- Eliminated the K8sClient field from the Reconciler struct in Redis-related controller files, including redis_controller.go, redis_controller_suite_test.go, and redisreplication_controller.go, as it was not utilized.
- Updated finalizer handling functions to remove K8sClient parameters, simplifying the function signatures and improving code clarity.
- Adjusted related test cases to reflect these changes, ensuring consistency across the codebase.

This refactor enhances maintainability by streamlining the code and removing unnecessary dependencies.

Signed-off-by: drivebyer <wuyangmuc@gmail.com>
@drivebyer drivebyer added the enhancement New feature or request label Dec 22, 2024
Signed-off-by: drivebyer <wuyangmuc@gmail.com>
Copy link

codecov bot commented Dec 22, 2024

Codecov Report

Attention: Patch coverage is 6.38298% with 44 lines in your changes missing coverage. Please review.

Project coverage is 29.30%. Comparing base (60ef5a2) to head (a856765).
Report is 13 commits behind head on master.

Files with missing lines Patch % Lines
pkg/k8sutils/finalizer.go 0.00% 42 Missing ⚠️
main.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1183      +/-   ##
==========================================
- Coverage   30.20%   29.30%   -0.90%     
==========================================
  Files          55       56       +1     
  Lines        6294     6469     +175     
==========================================
- Hits         1901     1896       -5     
- Misses       4200     4399     +199     
+ Partials      193      174      -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drivebyer drivebyer merged commit 81296c7 into OT-CONTAINER-KIT:master Dec 22, 2024
17 of 19 checks passed
@drivebyer drivebyer deleted the dynamic-client branch December 22, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant