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

Filter out unhealthy workloads #695

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

hzxuzhonghu
Copy link
Member

@hzxuzhonghu hzxuzhonghu commented Aug 6, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Which issue(s) this PR fixes:
Fixes #693

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


Copy link

codecov bot commented Aug 6, 2024

Codecov Report

Attention: Patch coverage is 26.08696% with 17 lines in your changes missing coverage. Please review.

Project coverage is 53.23%. Comparing base (9bef054) to head (c5b6f8d).
Report is 96 commits behind head on main.

Files with missing lines Patch % Lines
pkg/controller/workload/workload_processor.go 26.08% 15 Missing and 2 partials ⚠️
Files with missing lines Coverage Δ
pkg/controller/workload/workload_processor.go 66.83% <26.08%> (-1.97%) ⬇️

... and 9 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 b7ebf49...c5b6f8d. Read the comment docs.

@hzxuzhonghu hzxuzhonghu force-pushed the filter-out-unhealthy branch from 8847ebd to 55c5094 Compare August 7, 2024 01:55
@LiZhenCheng9527
Copy link
Collaborator

/lgtm

@kmesh-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

@@ -400,6 +400,11 @@ func (p *Processor) handleWorkload(workload *workloadapi.Workload) error {

deletedServices, newServices = p.WorkloadCache.AddOrUpdateWorkload(workload)

// Exclude the unhealthy workload, which means the workload is not ready
if workload.Status == workloadapi.WorkloadStatus_UNHEALTHY {
Copy link
Member Author

Choose a reason for hiding this comment

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

This is not correct, say if the workload turns to unhealthy from healthy. It will still exist in the bpf map

Copy link
Member Author

Choose a reason for hiding this comment

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

This fix depends on some thing in #783, so will continue after that merged

@hzxuzhonghu hzxuzhonghu changed the title Filter out unhealthy workloads WIP: Filter out unhealthy workloads Aug 19, 2024
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
@kmesh-bot kmesh-bot added size/M and removed size/S labels Sep 6, 2024
@hzxuzhonghu hzxuzhonghu changed the title WIP: Filter out unhealthy workloads Filter out unhealthy workloads Sep 6, 2024
@hzxuzhonghu
Copy link
Member Author

@LiZhenCheng9527 Can you take another look

@LiZhenCheng9527
Copy link
Collaborator

/lgtm

@kmesh-bot kmesh-bot added the lgtm label Sep 11, 2024
@kmesh-bot kmesh-bot merged commit b238317 into kmesh-net:main Sep 11, 2024
9 checks passed
@hzxuzhonghu hzxuzhonghu deleted the filter-out-unhealthy branch September 11, 2024 01:57
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.

Should ignore unhealthy workload status in backend map
3 participants