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

Introduce RemoveFailedPods strategy #610

Merged
merged 1 commit into from
Aug 30, 2021

Conversation

a7i
Copy link
Contributor

@a7i a7i commented Jul 29, 2021

Closes issue #596

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 29, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @a7i. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jul 29, 2021
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
@a7i a7i marked this pull request as ready for review July 30, 2021 19:41
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 30, 2021
Copy link
Contributor

@damemi damemi left a comment

Choose a reason for hiding this comment

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

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 2, 2021
Copy link
Contributor

@damemi damemi left a comment

Choose a reason for hiding this comment

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

looks pretty thorough, a couple notes but fundamentally solid imo

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
pkg/descheduler/strategies/failedpods.go Outdated Show resolved Hide resolved
pkg/descheduler/strategies/failedpods.go Outdated Show resolved Hide resolved
pkg/descheduler/strategies/failedpods.go Outdated Show resolved Hide resolved
pkg/descheduler/strategies/failedpods.go Outdated Show resolved Hide resolved
@a7i a7i requested a review from damemi August 17, 2021 02:38
@a7i
Copy link
Contributor Author

a7i commented Aug 18, 2021

/assign @seanmalloy

Copy link
Contributor

@damemi damemi left a comment

Choose a reason for hiding this comment

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

This looks good to squash, then I can approve

One nit though, which I'd like your input on, is maybe the new StrategyParam validator should be in its own package? It's minor but it would be nice to keep the strategies package to strategy code.

I was also not really sure about the way it wraps the "common" params inside another struct for the new strategy, but I suppose that's the best way to accomplish that (with the common params embedded). Hopefully we can start moving other strategies to use this function too and clean up their duped code

@a7i
Copy link
Contributor Author

a7i commented Aug 20, 2021

I was also not really sure about the way it wraps the "common" params inside another struct for the new strategy, but I suppose that's the best way to accomplish that (with the common params embedded). Hopefully we can start moving other strategies to use this function too and clean up their duped code

Ok, I can do that. something like pkg/descheduler/internal/validators/? (hence internal to reduce public API surface).

As far as wrapping the common params, I don't have a clever idea. If it was just a validator, could use interface. But it's also a parser that returns the parsed params so the return type gets tricky.

@damemi
Copy link
Contributor

damemi commented Aug 20, 2021

@a7i maybe just pkg/descheduler/strategies/validation?

Copy link
Contributor

@damemi damemi left a comment

Choose a reason for hiding this comment

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

/approve
I think the validation package will have some room to evolve as we implement it in other strategies but it looks good now. Thanks @a7i

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a7i, damemi

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 23, 2021
Copy link
Contributor

@ingvagabund ingvagabund left a comment

Choose a reason for hiding this comment

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

Given all strategies use the same StrategyParameters type it makes sense to put all the validation under the same package as all the params are shared across multiple strategies. On the other hand each strategy accesses a subset of the parameters so some part of the validation needs to stay as close to each strategy as possible.

The rest looks good.

@ingvagabund
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Aug 30, 2021
@k8s-ci-robot k8s-ci-robot merged commit 04439c6 into kubernetes-sigs:master Aug 30, 2021
@a7i a7i deleted the failed-pods branch September 1, 2021 19:39
briend pushed a commit to briend/descheduler that referenced this pull request Feb 11, 2022
Introduce RemoveFailedPods strategy
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

None yet

6 participants