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

cleanup: change *kubeclient.Clientset to kubeclient.Interface in unregister module #5594

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

wulemao
Copy link
Contributor

@wulemao wulemao commented Sep 23, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

cleanup: change *kubeclient.Clientset to kubeclient.Interface in unregister module

  • Improved Abstraction: By using the interface, we enhance the code's flexibility, making it easier to swap out implementations or mock dependencies for testing.
  • Easier Testing: Interfaces facilitate unit testing by allowing the use of mock clients, thereby improving test coverage and reliability.
  • Code Maintainability: This change promotes better software design principles, making the codebase easier to understand and maintain.

Which issue(s) this PR fixes:

Part of #5380

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 23, 2024
@karmada-bot
Copy link
Collaborator

Welcome @wulemao! It looks like this is your first PR to karmada-io/karmada 🎉

@karmada-bot karmada-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 23, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.58%. Comparing base (07c6cb4) to head (e0017b6).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5594   +/-   ##
=======================================
  Coverage   41.58%   41.58%           
=======================================
  Files         655      655           
  Lines       55753    55753           
=======================================
  Hits        23186    23186           
  Misses      31062    31062           
  Partials     1505     1505           
Flag Coverage Δ
unittests 41.58% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

…gister module

Signed-off-by: wulemao <1194736083@qq.com>
@karmada-bot karmada-bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 29, 2024
@wulemao wulemao changed the title support preserving resource in member cluster when executing karmadactl unjoin cleanup: change *kubeclient.Clientset to kubeclient.Interface in unregister module Oct 29, 2024
@chaosi-zju
Copy link
Member

/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2024
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 29, 2024
@chaosi-zju
Copy link
Member

/retest

@karmada-bot karmada-bot merged commit 6c6281f into karmada-io:master Oct 29, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants