Skip to content

Conversation

@hzxuzhonghu
Copy link
Member

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #

Special notes for you're reviewer:

Does this PR introduce a user-facing change?:


)

var kmeshStartType StartType
var kmeshExitType StartType
Copy link
Member

Choose a reason for hiding this comment

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

Add comments about when to use kmeshExitType and when to use kmeshStartType, it is also very confusing that they are both of type StartType, maybe we need better naming.

Copy link
Member Author

Choose a reason for hiding this comment

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

kmeshStartType is used during bootsttap

kmeshExitType is used during exit, to indicate whether keep bpf prog/maps or not

Previously one var is used to indicate both, confusing to me

kmeshExitType = Restart
bpfLoader.Stop()
assert.Equal(t, Restart, GetStartType(), "set kmesh close status:Restart failed")
assert.Equal(t, Restart, GetExitType(), "set kmesh close status:Restart failed")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
assert.Equal(t, Restart, GetExitType(), "set kmesh close status:Restart failed")
assert.Equal(t, Restart, GetExitType(), "set kmesh exit type to Restart failed")

@codecov
Copy link

codecov bot commented Sep 2, 2024

Codecov Report

Attention: Patch coverage is 70.83333% with 7 lines in your changes missing coverage. Please review.

Project coverage is 52.88%. Comparing base (e3762f2) to head (daf352a).
Report is 79 commits behind head on main.

Files with missing lines Patch % Lines
pkg/bpf/bpf.go 75.00% 3 Missing and 1 partial ⚠️
pkg/bpf/bpf_restart.go 62.50% 2 Missing and 1 partial ⚠️
Files with missing lines Coverage Δ
pkg/bpf/bpf_restart.go 62.50% <62.50%> (-2.62%) ⬇️
pkg/bpf/bpf.go 41.81% <75.00%> (ø)

... and 14 files with indirect coverage changes


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 eb8306b...daf352a. Read the comment docs.

Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
@supercharge-xsy
Copy link
Contributor

/lgtm
/approve

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: supercharge-xsy

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

@kmesh-bot kmesh-bot merged commit 0d8daf2 into kmesh-net:main Sep 11, 2024
@hzxuzhonghu hzxuzhonghu deleted the start-type branch September 11, 2024 02:22
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.

4 participants