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

Fix MCP pause case and re-organize drain controller package #803

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

SchSeba
Copy link
Collaborator

@SchSeba SchSeba commented Nov 7, 2024

No description provided.

Copy link

github-actions bot commented Nov 7, 2024

Thanks for your PR,
To run vendors CIs, Maintainers can use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs, Maintainers can use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@coveralls
Copy link

coveralls commented Nov 7, 2024

Pull Request Test Coverage Report for Build 11935829798

Details

  • 143 of 231 (61.9%) changed or added relevant lines in 5 files are covered.
  • 34 unchanged lines in 3 files lost coverage.
  • Overall coverage decreased (-0.1%) to 46.876%

Changes Missing Coverage Covered Lines Changed/Added Lines %
controllers/drain_controller.go 13 14 92.86%
pkg/platforms/openshift/openshift.go 0 9 0.0%
controllers/drain_controller_helper.go 128 206 62.14%
Files with Coverage Reduction New Missed Lines %
controllers/drain_controller.go 4 77.68%
controllers/generic_network_controller.go 5 74.38%
controllers/helper.go 25 60.67%
Totals Coverage Status
Change from base Build 11931554664: -0.1%
Covered Lines: 7119
Relevant Lines: 15187

💛 - Coveralls

@SchSeba SchSeba force-pushed the drain_improve branch 2 times, most recently from 260e9f5 to 22f6efa Compare November 12, 2024 09:09
Copy link
Member

@zeeke zeeke left a comment

Choose a reason for hiding this comment

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

Just a few minor comments, otherwise LGTM

@@ -1,330 +0,0 @@
/*
Copy link
Member

Choose a reason for hiding this comment

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

Why remove this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this was related to the device plugin one I rebase this PR

@@ -250,93 +169,17 @@ func (dr *DrainReconcile) getObject(ctx context.Context, req ctrl.Request, objec
return true, nil
}

func (dr *DrainReconcile) ensureAnnotationExists(ctx context.Context, object client.Object, key string) (string, error) {
func (dr *DrainReconcile) ensureAnnotationExists(ctx context.Context, object client.Object, key string) (string, bool, error) {
value, exist := object.GetAnnotations()[key]
if !exist {
err := utils.AnnotateObject(ctx, object, constants.NodeStateDrainAnnotationCurrent, constants.DrainIdle, dr.Client)
Copy link
Member

Choose a reason for hiding this comment

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

this should be

err := utils.AnnotateObject(ctx, object, key, constants.DrainIdle, dr.Client)

right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

right nice catch!

Copy link
Collaborator

@ykulazhenkov ykulazhenkov left a comment

Choose a reason for hiding this comment

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

I checked the PR and I don't have meaningful comments. I think we are good to merge it when comments from Andrea are addressed.

Copy link
Member

@zeeke zeeke left a comment

Choose a reason for hiding this comment

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

LGTM!

@SchSeba SchSeba merged commit f819a2b into k8snetworkplumbingwg:master Nov 26, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants