Skip to content

Fix argument list too long in manage controller#711

Merged
kmesh-bot merged 1 commit intokmesh-net:mainfrom
tacslon:fix/mng
Oct 8, 2024
Merged

Fix argument list too long in manage controller#711
kmesh-bot merged 1 commit intokmesh-net:mainfrom
tacslon:fix/mng

Conversation

@tacslon
Copy link
Copy Markdown
Contributor

@tacslon tacslon commented Aug 9, 2024

What type of PR is this?

/kind cleanup
What this PR does / why we need it:
Fix argument list too long in manage controller in #679
Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.16%. Comparing base (764f121) to head (fdca0a7).
Report is 28 commits behind head on main.

Files with missing lines Coverage Δ
pkg/controller/manage/manage_controller.go 55.06% <100.00%> (-0.74%) ⬇️
pkg/utils/enroll.go 94.44% <100.00%> (+0.21%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9634e1...fdca0a7. Read the comment docs.

Copy link
Copy Markdown
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

An alternatrive maybe make these functions as a method of KmeshManageController, tehn you donot need to pass these args

@tacslon
Copy link
Copy Markdown
Contributor Author

tacslon commented Aug 13, 2024

An alternatrive maybe make these functions as a method of KmeshManageController, tehn you donot need to pass these args

This seems to be more reasonable, please make a review @hzxuzhonghu

queue.AddRateLimited(QueueItem{podName: pod.Name, podNs: pod.Namespace, action: ActionAddAnnotation})
_ = linkXdp(nspath, xdpProgFd, mode)
kmc.queue.AddRateLimited(QueueItem{podName: pod.Name, podNs: pod.Namespace, action: ActionAddAnnotation})
_ = linkXdp(nspath, kmc.xdpProgFd, kmc.mode)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why handle this error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You mean why NOT handle this error? Because error is handled in linkXdp

Signed-off-by: talon <tianmuyang@huawei.com>
@tacslon
Copy link
Copy Markdown
Contributor Author

tacslon commented Sep 30, 2024

@hzxuzhonghu Please review

Copy link
Copy Markdown
Member

@hzxuzhonghu hzxuzhonghu left a comment

Choose a reason for hiding this comment

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

/lgtm

@kmesh-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hzxuzhonghu

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

The pull request process is described here

Details 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

@kmesh-bot kmesh-bot merged commit 973cbc6 into kmesh-net:main Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants