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

optimize: used unified context in controller #5298

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

xovoxy
Copy link
Contributor

@xovoxy xovoxy commented Aug 5, 2024

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
I found that many methods in the controller did not use a unified context, so I optimized the methods in the controller that I saw. If you have any other additions, please let me know.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Aug 5, 2024
@karmada-bot karmada-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 5, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 5, 2024

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

Codecov Report

Attention: Patch coverage is 15.74344% with 289 lines in your changes missing coverage. Please review.

Project coverage is 28.39%. Comparing base (789c29f) to head (38ee277).

Files Patch % Lines
.../controllers/multiclusterservice/mcs_controller.go 0.00% 41 Missing ⚠️
pkg/controllers/mcs/service_export_controller.go 0.00% 31 Missing ⚠️
...ontrollers/federatedhpa/federatedhpa_controller.go 0.00% 25 Missing ⚠️
...clusterservice/endpointslice_collect_controller.go 0.00% 22 Missing ⚠️
...controllers/unifiedauth/unified_auth_controller.go 9.52% 16 Missing and 3 partials ⚠️
...ers/binding/cluster_resource_binding_controller.go 0.00% 15 Missing ⚠️
pkg/controllers/execution/execution_controller.go 0.00% 14 Missing ⚠️
...lusterservice/endpointslice_dispatch_controller.go 0.00% 14 Missing ⚠️
...ependenciesdistributor/dependencies_distributor.go 6.66% 14 Missing ⚠️
pkg/controllers/mcs/service_import_controller.go 0.00% 13 Missing ⚠️
... and 21 more

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5298   +/-   ##
=======================================
  Coverage   28.38%   28.39%           
=======================================
  Files         632      632           
  Lines       43798    43801    +3     
=======================================
+ Hits        12434    12436    +2     
- Misses      30460    30461    +1     
  Partials      904      904           
Flag Coverage Δ
unittests 28.39% <15.74%> (+<0.01%) ⬆️

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.

Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang left a comment

Choose a reason for hiding this comment

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

Thanks~
lgtm
/cc @whitewindmills @chaunceyjiang

@chaunceyjiang
Copy link
Member

/assign

Copy link
Member

@whitewindmills whitewindmills left a comment

Choose a reason for hiding this comment

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

lgtm

@XiShanYongYe-Chang
Copy link
Member

Hi @xovoxy, here is a conflict with the master branch, can you help fix it?

@karmada-bot karmada-bot added do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 6, 2024
@karmada-bot karmada-bot removed the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Aug 6, 2024
@karmada-bot karmada-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Aug 6, 2024
Copy link
Member

@chaunceyjiang chaunceyjiang left a comment

Choose a reason for hiding this comment

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

Thanks~

/lgtm

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

@XiShanYongYe-Chang XiShanYongYe-Chang 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: XiShanYongYe-Chang

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 Aug 6, 2024
@karmada-bot karmada-bot merged commit c66b2b8 into karmada-io:master Aug 6, 2024
12 checks passed
@xovoxy xovoxy deleted the unified-ctx branch August 6, 2024 07:41
@RainbowMango RainbowMango added this to the v1.11 milestone Aug 31, 2024
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/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants